14#ifndef _ALICEO2_SUBTIMEFRAME_FILE_RAWDD_H_
15#define _ALICEO2_SUBTIMEFRAME_FILE_RAWDD_H_
102 return !(*
this ==
other);
107 return fmt::format(
"{}/{}/{}",
156 using namespace std::chrono;
157 return time_point<system_clock, milliseconds>{milliseconds{
mWriteTimeMs}};
162 using namespace std::chrono;
163 std::time_t lTime = system_clock::to_time_t(
getTimePoint());
165 std::stringstream lTimeStream;
166 lTimeStream << std::put_time(std::localtime(&lTime),
"%F %T");
167 return lTimeStream.str();
179 using namespace std::chrono;
180 mWriteTimeMs = time_point_cast<milliseconds>(system_clock::now()).time_since_epoch().count();
186std::ostream&
operator<<(std::ostream& pStream,
const SubTimeFrameFileMeta& pMeta);
210 const std::uint32_t pCnt,
211 const std::uint64_t pOff,
212 const std::uint64_t pSize)
221 "DataIndexElem changed -> Binary compatibility is lost!");
227 void clear() noexcept { mDataIndex.clear(); }
228 bool empty() const noexcept {
return mDataIndex.empty(); }
231 const std::uint32_t pCnt,
232 const std::uint64_t pOffset,
233 const std::uint64_t pSize)
235 mDataIndex.emplace_back(pEqDataId, pCnt, pOffset, pSize);
252 mDataIndex.size() *
sizeof(DataIndexElem));
259 std::vector<DataIndexElem> mDataIndex;
262std::ostream&
operator<<(std::ostream& pStream,
const SubTimeFrameFileDataIndex& pIndex);
270struct hash<
o2::header::DataOrigin> {
279 "DataOrigin must be 4B long (uint32_t itg[1])");
280 return std::hash<o2::header::DataOrigin::ItgType>{}(
a.itg[0]);
285struct hash<
o2::header::DataDescription> {
294 "DataDescription must be 16B long (uint64_t itg[2])");
296 return std::hash<o2::header::DataDescription::ItgType>{}(
a.itg[0]) ^
297 std::hash<o2::header::DataDescription::ItgType>{}(
a.itg[1]);
303template <
typename T,
typename... Rest>
307 seed ^= hasher(
v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
312struct hash<
o2::header::DataHeader> {
325struct hash<
o2::header::DataIdentifier> {
332 return std::hash<o2::header::DataDescription>{}(
a.dataDescription) ^
333 std::hash<o2::header::DataOrigin>{}(
a.dataOrigin);
338struct hash<
o2::rawdd::EquipmentIdentifier> {
345 return std::hash<o2::header::DataDescription>{}(
a.mDataDescription) ^
346 (std::hash<o2::header::DataOrigin>{}(
a.mDataOrigin) << 1) ^
Class for time synchronization of RawReader instances.
GLboolean GLboolean GLboolean GLboolean a
constexpr o2::header::DataOrigin gDataOriginFLP
constexpr o2::header::DataOrigin gDataOriginAny
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
void hash_combine(std::size_t &seed)
o2::header::DataDescription mDataDescription
EquipmentIdentifier(const o2::header::DataHeader &pDh) noexcept
o2::header::DataHeader::SubSpecificationType mSubSpecification
bool operator==(const EquipmentIdentifier &other) const noexcept
bool operator!=(const EquipmentIdentifier &other) const noexcept
EquipmentIdentifier(const o2::header::DataDescription &pDataDesc, const o2::header::DataOrigin &pDataOrig, const o2::header::DataHeader::SubSpecificationType &pSubSpec) noexcept
bool operator<(const EquipmentIdentifier &other) const noexcept
EquipmentIdentifier(const EquipmentIdentifier &pEid) noexcept
EquipmentIdentifier()=delete
o2::header::DataOrigin mDataOrigin
const std::string info() const
EquipmentIdentifier(const o2::header::DataIdentifier &pDataId, const o2::header::DataHeader::SubSpecificationType &pSubSpec) noexcept
o2::header::DataOrigin mDataOrigin
o2::header::DataHeader::SubSpecificationType mSubSpecification
subspecification (u64)
DataIndexElem(const EquipmentIdentifier &pId, const std::uint32_t pCnt, const std::uint64_t pOff, const std::uint64_t pSize)
std::uint64_t mSize
Total size of data blocks including headers.
std::uint64_t mOffset
Offset of data block (corresponding data header) relative to.
o2::header::DataDescription mDataDescription
Equipment Identifier: unrolled to pack better.
std::uint32_t mDataBlockCnt
Number of data blocks <data_header, data>
SubTimeFrameFileDataIndex.
bool empty() const noexcept
SubTimeFrameFileDataIndex()=default
std::uint64_t getSizeInFile() const
void AddStfElement(const EquipmentIdentifier &pEqDataId, const std::uint32_t pCnt, const std::uint64_t pOffset, const std::uint64_t pSize)
static const o2::header::DataDescription sDataDescFileStfDataIndex
SubTimeFrameFileDataIndex.
friend std::ostream & operator<<(std::ostream &pStream, const SubTimeFrameFileDataIndex &pIndex)
result_type operator()(argument_type const &a) const noexcept
std::uint64_t result_type
o2::rawdd::EquipmentIdentifier argument_type
VectorOfTObjectPtrs other