30#include <Common/Configuration.h>
31#include <TStopwatch.h>
41 LOGF(info,
"%sfile:%3d offs:%10zu size:%8d newSP:%d newTF:%d newHB:%d endHB:%d | Orbit %u TF %u",
52 ss <<
"Link " <<
origin.as<std::string>() <<
'/' <<
description.as<std::string>() <<
"/0x"
53 << std::hex << std::setw(8) << std::setfill(
'0') << subspec
54 <<
" RO: " << (continuousRO ?
"Cont" :
"Trig");
61 LOGF(info,
"%s %s FEE:0x%04x CRU:%4d Lnk:%3d EP:%d RDHv%d Src:%s | SPages:%4d Pages:%6d TFs:%6d with %6d HBF in %4d blocks (%d err)",
62 pref, describe(),
int(RDHUtils::getFEEID(rdhl)),
int(RDHUtils::getCRUID(rdhl)),
int(RDHUtils::getLinkID(rdhl)),
65 nSPages, nCRUPages, nTimeFrames, nHBFrames, int(blocks.size()), nErrors);
67 for (
int i = 0;
i < int(blocks.size());
i++) {
68 std::stringstream counts;
69 counts <<
'#' << std::setw(5) <<
i <<
" | ";
70 blocks[
i].print(counts.str());
80 if (nextBlock2Read >= 0) {
81 int sz = 0, nSP = 0, ibl = nextBlock2Read, nbl = blocks.size(), nblPart = 0;
83 while (ibl < nbl && (blocks[ibl].tfID == blocks[nextBlock2Read].tfID)) {
85 (sz + blocks[ibl].
size) > reader->mNominalSPageSize ||
86 (blocks[ibl - 1].offset + blocks[ibl - 1].size) < blocks[ibl].offset)) {
91 sz += blocks[ibl].size;
108 if (nextBlock2Read >= 0) {
109 int ibl = nextBlock2Read, nbl = blocks.size();
110 while (ibl < nbl && (blocks[ibl].
ir == blocks[nextBlock2Read].
ir)) {
111 sz += blocks[ibl].size;
123 if (nextBlock2Read < 0) {
126 int ibl = nextBlock2Read, nbl = blocks.size();
129 auto& blc = blocks[ibl];
130 if (blc.ir != blocks[nextBlock2Read].ir) {
135 memcpy(buff + sz, blc.dataCache.get(), blc.size);
137 auto fl = reader->mFiles[blc.fileID];
138 if (fseek(fl, blc.offset, SEEK_SET) || fread(buff + sz, 1, blc.size, fl) != blc.size) {
139 LOGF(
error,
"Failed to read for the %s a bloc:", describe());
142 }
else if (reader->mCacheData) {
143 blc.dataCache = std::make_unique<char[]>(blc.size);
144 memcpy(blc.dataCache.get(), buff + sz, blc.size);
149 nextBlock2Read = ibl;
150 return error ? 0 : sz;
158 if (nextBlock2Read < 0) {
161 int ibl = nextBlock2Read, nbl = blocks.size();
163 const auto& blc = blocks[ibl];
164 if (blc.ir.orbit != blocks[nextBlock2Read].ir.orbit) {
170 nextBlock2Read = ibl;
180 if (nextBlock2Read >= 0) {
181 int ibl = nextBlock2Read, nbl = blocks.size();
182 while (ibl < nbl && (blocks[ibl].tfID == blocks[nextBlock2Read].tfID)) {
183 sz += blocks[ibl].size;
195 if (nextBlock2Read < 0) {
198 int ibl0 = nextBlock2Read, nbl = blocks.size();
200 while (nextBlock2Read < nbl && (blocks[nextBlock2Read].tfID == blocks[ibl0].tfID)) {
201 auto szb = readNextHBF(buff + sz);
207 return error ? 0 : sz;
215 if (nextBlock2Read < 0) {
218 int ibl0 = nextBlock2Read, nbl = blocks.size();
220 while (nextBlock2Read < nbl && (blocks[nextBlock2Read].tfID == blocks[ibl0].tfID)) {
221 auto szb = skipNextHBF();
227 return error ? 0 : sz;
234 if (
tf < tfStartBlock.size()) {
235 nextBlock2Read = tfStartBlock[
tf].first;
237 LOG(warning) <<
"No TF " <<
tf <<
" for " << describe();
248 int ibl = nextBlock2Read, nbl = blocks.size(), nHB = 0;
249 if (nextBlock2Read >= 0) {
250 while (ibl < nbl && (blocks[ibl].tfID == blocks[nextBlock2Read].tfID)) {
265 if (nextBlock2Read < 0) {
268 int ibl = nextBlock2Read, nbl = blocks.size();
269 auto tfID = blocks[nextBlock2Read].tfID;
276 auto& blc = blocks[ibl];
277 if (ibl > nextBlock2Read && (blc.tfID != blocks[nextBlock2Read].tfID ||
279 (sz + blc.size) > reader->mNominalSPageSize ||
280 blocks[ibl - 1].offset + blocks[ibl - 1].size < blc.offset)) {
288 if (reader->mCacheData && blocks[nextBlock2Read].dataCache) {
289 memcpy(buff, blocks[nextBlock2Read].dataCache.get(), sz);
291 auto fl = reader->mFiles[blocks[nextBlock2Read].fileID];
292 if (fseek(fl, blocks[nextBlock2Read].
offset, SEEK_SET) || fread(buff, 1, sz, fl) != sz) {
293 LOGF(
error,
"Failed to read for the %s a bloc:", describe());
294 blocks[nextBlock2Read].print();
296 }
else if (reader->mCacheData) {
297 blocks[nextBlock2Read].dataCache = std::make_unique<char[]>(sz);
298 memcpy(blocks[nextBlock2Read].dataCache.get(), buff, sz);
302 nextBlock2Read = ibl;
303 return error ? 0 : sz;
310 size_t szMax = 0, szLast = 0;
311 for (
const auto& bl : blocks) {
313 if (szLast > szMax) {
320 return szLast > szMax ? szLast : szMax;
327 size_t szMax = 0, szLast = 0;
328 for (
const auto& bl : blocks) {
330 if (szLast > szMax) {
337 return szLast > szMax ? szLast : szMax;
345 bool newTF =
false, newHB =
false;
348 if (RDHUtils::getFEEID(rdh) != RDHUtils::getFEEID(rdhl)) {
349 LOGF(
error,
"Same SubSpec is found for %s with different RDH.feeId", describe());
350 LOGF(
error,
"old RDH assigned SubSpec=0x%-8d:", subspec);
352 LOGF(
error,
"new RDH assigned SubSpec=0x%-8d:", subspec);
354 throw std::runtime_error(
"Conflicting SubSpecs are provided");
358 auto ir = RDHUtils::getTriggerIR(rdh);
359 auto pageCnt = RDHUtils::getPageCounter(rdh);
362 auto triggerType = RDHUtils::getTriggerType(rdh);
368 continuousRO =
false;
371 if (reader->mCheckErrors & (0x1 <<
ErrNoSOX)) {
378 reader->imposeFirstTF(irOfSOX.orbit);
381 auto newTFCalc = reader->getTFAutodetect() !=
FirstTFDetection::Pending && (blocks.empty() || HBU.getTF(blocks.back().ir) != HBU.getTF(
ir));
385 if (newTFCalc != newTF && (reader->mCheckErrors & (0x1 <<
ErrMismatchTF))) {
390 if (reader->mPreferCalculatedTFStart) {
405 if (nCRUPages && (pageCnt != (RDHUtils::getPageCounter(rdhl) + 1))) {
407 <<
" old=" << int(pageCnt) <<
" new=" << int(RDHUtils::getPageCounter(rdhl));
413 if (reader->mCheckErrors) {
417 auto packetCounterL = RDHUtils::getPacketCounter(rdhl);
421 <<
" new=" << int(
packetCounter) <<
" old=" << int(packetCounterL);
438 if ((!newTF || !newHB || pageCnt != 0) &&
446 auto stop = RDHUtils::getStop(rdh);
447 auto hbIR = RDHUtils::getHeartBeatIR(rdh), hblIR = RDHUtils::getHeartBeatIR(rdhl);
449 if (reader->mCheckErrors) {
456 if (openHB && (reader->mCheckErrors & (0x1 <<
ErrHBFNoStop)) && cruDetector) {
461 if ((reader->mCheckErrors & (0x1 <<
ErrHBFJump)) &&
463 !( hbIR.orbit == hblIR.orbit + 1)) &&
466 <<
" is not incremented by 1 orbit wrt Old HB orbit/bc=" << hblIR.orbit <<
'/' << int(hblIR.bc);
481 LOG(
error) <<
"skipping RDH w/o newTF flag until TF start is found";
483 newTF = newSPage = newHB =
false;
486 if (newTF || newSPage || newHB) {
489 reader->imposeFirstTF(hbIR.orbit);
491 throw std::runtime_error(
"HBFUtil first orbit/bc autodetection cannot be done with first link from CRORC detector");
494 int nbl = blocks.size();
495 auto& bl = blocks.emplace_back(reader->mCurrentFileID, reader->mPosInFile);
497 bl.tfID = HBU.getTF(hbIR);
499 tfStartBlock.emplace_back(nbl, bl.tfID);
503 if (reader->mMultiLinkFile && !newSPage) {
521 blocks.back().size += RDHUtils::getOffsetToNext(rdh);
526 LOG(
error) <<
" ^^^Problem(s) was encountered at offset " << reader->mPosInFile <<
" of file " << reader->mCurrentFileID;
528 }
else if (reader->mVerbosity > 1) {
529 if (reader->mVerbosity > 2) {
534 LOG(info) <<
"--------------- reader tags: newTF: " << newTF <<
" newHBF/Trigger: " << newHB <<
" newSPage: " << newSPage;
544 if (!config.empty()) {
551int RawFileReader::getLinkLocalID(
const RDHAny& rdh,
int fileID)
554 auto orig = std::get<0>(mDataSpecs[fileID]);
556 LinkSpec_t spec = createSpec(orig, subspec);
557 auto entryMap = mLinkEntries.find(spec);
558 if (entryMap == mLinkEntries.end()) {
559 int n = mLinkEntries.size();
560 mLinkEntries[spec] =
n;
561 auto& lnk = mLinksData.emplace_back(rdh,
this);
562 lnk.subspec = subspec;
564 lnk.description = std::get<1>(mDataSpecs[fileID]);
566 lnk.cruDetector = std::get<2>(mDataSpecs[fileID]) ==
CRU;
569 return entryMap->second;
573bool RawFileReader::preprocessFile(
int ifl)
576 std::unique_ptr<char[]>
buffer = std::make_unique<char[]>(mBufferSize);
577 FILE* fl = mFiles[ifl];
578 mCurrentFileID = ifl;
579 LinkSpec_t specPrev = 0xffffffffffffffff;
581 mMultiLinkFile =
false;
582 fseek(fl, 0L, SEEK_END);
583 const auto fileSize = ftell(fl);
587 size_t nRDHread = 0, boffs;
588 bool readMore =
true;
589 while (readMore && (nr = fread(
buffer.get(), 1, mBufferSize, fl))) {
593 if ((mPosInFile + RDHUtils::getOffsetToNext(rdh)) > fileSize) {
594 LOGP(warning,
"File {} truncated current file pos {} + offsetToNext {} > fileSize {}", ifl, mPosInFile, RDHUtils::getOffsetToNext(rdh), fileSize);
599 LinkSpec_t spec = createSpec(std::get<0>(mDataSpecs[mCurrentFileID]),
RDHUtils::getSubSpec(rdh));
601 if (spec != specPrev) {
604 mMultiLinkFile =
true;
606 lID = getLinkLocalID(rdh, mCurrentFileID);
608 bool newSPage = lID != lIDPrev;
610 mLinksData[lID].preprocessCRUPage(rdh, newSPage);
612 LOG(
error) <<
"Corrupted data, abandoning processing";
613 mStopProcessing =
true;
617 if (mLinksData[lID].nTimeFrames && (mLinksData[lID].nTimeFrames - 1 > mMaxTFToRead)) {
618 mLinksData[lID].nTimeFrames--;
619 mLinksData[lID].blocks.pop_back();
620 if (mLinksData[lID].nHBFrames > 0) {
621 mLinksData[lID].nHBFrames--;
623 if (mLinksData[lID].nCRUPages > 0) {
624 mLinksData[lID].nCRUPages--;
630 boffs += RDHUtils::getOffsetToNext(rdh);
631 mPosInFile += RDHUtils::getOffsetToNext(rdh);
634 if (fseek(fl, mPosInFile, SEEK_SET)) {
642 LOGF(info,
"File %3d : %9li bytes scanned, %6d RDH read for %4d links from %s",
643 mCurrentFileID, mPosInFile, nRDHread,
int(mLinkEntries.size()), mFileNames[mCurrentFileID]);
651 for (
int i = 0;
i <
n;
i++) {
653 std::stringstream counts;
654 counts <<
"Lnk" << std::left << std::setw(4) <<
i <<
"| ";
655 link.print(verbose, counts.str());
662 mLinkEntries.clear();
665 for (
auto fl : mFiles) {
672 mMultiLinkFile =
false;
680 LOG(
error) <<
"Cannot add new files after initialization";
685 mFileBuffers.push_back(std::make_unique<
char[]>(mBufferSize));
686 auto inFile = fopen(sname.c_str(),
"rb");
688 LOG(
error) <<
"Failed to open input file " << sname;
691 setvbuf(inFile, mFileBuffers.back().get(), _IOFBF, mBufferSize);
694 LOG(
error) <<
"Invalid data origin " <<
origin.as<std::string>() <<
" for file " << sname;
698 LOG(
error) <<
"Invalid data description " << desc.
as<std::string>() <<
" for file " << sname;
705 mFileNames.push_back(sname);
706 mFiles.push_back(inFile);
707 mDataSpecs.emplace_back(
origin, desc,
t);
717 if (mCheckErrors & (0x1 <<
i)) {
718 LOGF(info,
"%s check for /%s/", (mCheckErrors & (0x1 <<
i)) ?
"perform" :
"ignore ",
ErrNames[
i].data());
721 if (mMaxTFToRead < 0xffffffff) {
722 LOGF(info,
"at most %u TF will be processed", mMaxTFToRead);
725 int nf = mFiles.size();
727 for (
int i = 0;
i < nf;
i++) {
728 if (preprocessFile(
i)) {
732 if (mStopProcessing) {
733 LOG(
error) <<
"Abandoning processing due to corrupted data";
736 mOrderedIDs.resize(mLinksData.size());
737 for (
int i = mLinksData.size();
i--;) {
739 if (mNTimeFrames < mLinksData[
i].nTimeFrames) {
740 mNTimeFrames = mLinksData[
i].nTimeFrames;
743 std::sort(mOrderedIDs.begin(), mOrderedIDs.end(),
744 [&links = mLinksData](
int a,
int b) { return links[a].spec < links[b].spec; });
746 size_t maxSP = 0, maxTF = 0;
748 LOGF(info,
"Summary of preprocessing:");
749 for (
int i = 0;
i < int(mLinksData.size());
i++) {
751 auto msp =
link.getLargestSuperPage();
752 auto mtf =
link.getLargestTF();
759 std::stringstream counts;
760 counts <<
"Lnk" << std::setw(4) << std::left <<
i <<
"| ";
761 link.print(mVerbosity, counts.str());
762 if (msp > mNominalSPageSize) {
763 LOGF(
debug,
" Attention: largest superpage %zu B exceeds expected %d B",
764 msp, mNominalSPageSize);
767 if (
link.blocks.front().ir.orbit < mOrbitMin) {
768 mOrbitMin =
link.blocks.front().ir.orbit;
770 if (
link.blocks.back().ir.orbit > mOrbitMax) {
771 mOrbitMax =
link.blocks.back().ir.orbit;
773 if (
link.tfStartBlock.empty() && !
link.blocks.empty()) {
774 link.tfStartBlock.emplace_back(0, 0);
778 link.describe(),
link.nTimeFrames, mNTimeFrames);
781 LOGF(info,
"First orbit: %u, Last orbit: %u", mOrbitMin, mOrbitMax);
782 LOGF(info,
"Largest super-page: %zu B, largest TF: %zu B", maxSP, maxTF);
784 LOGF(info,
"Detailed data format check was disabled");
794 constexpr int NGoodOrigins = 21;
795 constexpr std::array<o2h::DataOrigin, NGoodOrigins> goodOrigins{
801 for (
auto orgood : goodOrigins) {
802 if (ors == orgood.as<std::string>()) {
812 constexpr int NGoodDesc = 5;
813 constexpr std::array<o2h::DataDescription, NGoodDesc> goodDesc{
817 for (
auto dgood : goodDesc) {
818 if (ors == dgood.as<std::string>()) {
829 for (
const auto&
entry : inp) {
830 const auto& ordesc =
entry.first;
831 const auto& files =
entry.second;
838 for (
const auto& fnm : files) {
839 if (!
addFile(fnm, std::get<0>(ordesc), std::get<1>(ordesc), std::get<2>(ordesc))) {
840 throw std::runtime_error(
"wrong raw data file path or origin/description");
850 std::map<OrigDescCard, std::vector<std::string>>
entries;
852 if (confUri.empty()) {
853 throw std::runtime_error(
"Input configuration file is not provided");
855 std::string confFile = confUri;
858 if (confFile.rfind(
"file:", 0) != 0) {
859 confFile.insert(0,
"file:");
863 }
catch (std::string&
e) {
864 throw std::runtime_error(std::string(
"Failed to parse configuration ") + confFile +
" : " +
e);
867 std::unordered_map<std::string, int> detFilter;
876 std::string origStr, descStr, cardStr, defstr =
"defaults";
877 cfg.getOptionalValue<std::string>(defstr +
".dataOrigin", origStr, DEFDataOrigin.
as<std::string>());
880 throw std::runtime_error(std::string(
"Invalid default data origin ") + origStr);
882 cfg.getOptionalValue<std::string>(defstr +
".dataDescription", descStr, DEFDataDescription.
as<std::string>());
885 throw std::runtime_error(std::string(
"Invalid default data description ") + descStr);
887 auto defCardType = DEFCardType;
888 cfg.getOptionalValue<std::string>(defstr +
".readoutCard", cardStr, std::string{
CardNames[DEFCardType]});
894 throw std::runtime_error(std::string(
"Invalid default readout card ") + cardStr);
897 entries[{defDataOrigin, defDataDescription, defCardType}];
898 LOG(
debug) <<
"Setting default dataOrigin/Description/CardType " << defDataOrigin.as<std::string>() <<
'/' << defDataDescription.as<std::string>() <<
'/' <<
CardNames[defCardType];
900 for (
auto flsect : ConfigFileBrowser(&cfg,
"input-")) {
901 std::string flNameStr, defs{
""};
902 cfg.getOptionalValue<std::string>(flsect +
".dataOrigin", origStr, defDataOrigin.as<std::string>());
903 cfg.getOptionalValue<std::string>(flsect +
".dataDescription", descStr, defDataDescription.as<std::string>());
904 cfg.getOptionalValue<std::string>(flsect +
".filePath", flNameStr, defs);
905 cfg.getOptionalValue<std::string>(flsect +
".readoutCard", cardStr, std::string{
CardNames[
CRU]});
906 if (flNameStr.empty()) {
907 LOG(
debug) <<
"Skipping incomplete input " << flsect;
912 throw std::runtime_error(std::string(
"Invalid data origin ") + origStr +
" for " + flsect);
914 if (!detFilter.empty()) {
915 int& sdet = detFilter[dataOrigin.as<std::string>()];
917 if (sdet == 0 && verbose) {
918 LOG(info) <<
"discarding data of detector " << dataOrigin.as<std::string>();
926 throw std::runtime_error(std::string(
"Invalid data description ") + descStr +
" for " + flsect);
929 auto cardType = defCardType;
935 throw std::runtime_error(std::string(
"Invalid default readout card ") + cardStr +
" for " + flsect);
937 entries[{dataOrigin, dataDescription, cardType}].push_back(flNameStr);
938 LOG(
debug) <<
"adding file " << flNameStr <<
" to dataOrigin/Description " << dataOrigin.as<std::string>() <<
'/' << dataDescription.as<std::string>();
940 }
catch (std::string&
e) {
941 throw std::runtime_error(std::string(
"Aborting due to the exception: ") +
e);
950 throw std::runtime_error(
"reader was not expecting imposing first TF");
954 LOG(info) <<
"Imposed data-driven TF start";
956 hbu.printKeyValues();
header::DataOrigin origin
header::DataDescription description
Definition of the 32 Central Trigger System (CTS) Trigger Types defined in https://twiki....
std::vector< long > entries
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
char error[CURL_ERROR_SIZE]
Reader for (multiple) raw data files.
static const HBFUtils & Instance()
static void setValue(std::string const &mainkey, std::string const &subkey, T x)
static constexpr const char * getName(ID id)
names of defined detectors
int ID
Detector identifiers: continuous, starting from 0.
static constexpr ID Last
if extra detectors added, update this !!!
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
void printStat(bool verbose=false) const
static InputsMap parseInput(const std::string &confUri, const std::string &onlyDet={}, bool verbose=false)
void setDefaultDataDescription(const std::string &desc)
static std::string nochk_expl(ErrTypes e)
void setDefaultDataOrigin(const std::string &orig)
std::map< OrigDescCard, std::vector< std::string > > InputsMap
static constexpr std::string_view CardNames[]
void loadFromInputsMap(const InputsMap &inp)
static constexpr bool ErrCheckDefaults[]
static constexpr std::string_view ErrNamesShort[]
static o2::header::DataDescription getDataDescription(const std::string &ors)
static std::string nochk_opt(ErrTypes e)
const LinkData & getLink(int i) const
@ ErrWrongPacketCounterIncrement
@ ErrWrongPageCounterIncrement
void setDefaultReadoutCardType(ReadoutCardType t=CRU)
static o2::header::DataOrigin getDataOrigin(const std::string &ors)
RawFileReader(const std::string &config="", int verbosity=0, size_t buffsize=50 *1024UL, const std::string &onlyDet={})
void imposeFirstTF(uint32_t orbit)
static constexpr std::string_view ErrNames[]
bool addFile(const std::string &sname, o2::header::DataOrigin origin, o2::header::DataDescription desc, ReadoutCardType t=CRU)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
constexpr o2::header::DataOrigin gDataOriginPHS
constexpr o2::header::DataOrigin gDataOriginMFT
constexpr o2::header::DataOrigin gDataOriginMCH
constexpr o2::header::DataDescription gDataDescriptionInvalid
constexpr o2::header::DataOrigin gDataOriginCTP
constexpr o2::header::DataOrigin gDataOriginFLP
constexpr o2::header::DataOrigin gDataOriginTST
constexpr o2::header::DataDescription gDataDescriptionInfo
constexpr o2::header::DataOrigin gDataOriginHMP
constexpr o2::header::DataOrigin gDataOriginTPC
constexpr o2::header::DataOrigin gDataOriginFOC
constexpr o2::header::DataOrigin gDataOriginZDC
constexpr o2::header::DataDescription gDataDescriptionTracks
constexpr o2::header::DataOrigin gDataOriginInvalid
constexpr o2::header::DataDescription gDataDescriptionConfig
constexpr o2::header::DataOrigin gDataOriginMID
constexpr o2::header::DataOrigin gDataOriginFDD
constexpr o2::header::DataDescription gDataDescriptionRawData
constexpr o2::header::DataOrigin gDataOriginFT0
constexpr o2::header::DataOrigin gDataOriginTRD
constexpr o2::header::DataOrigin gDataOriginEMC
constexpr o2::header::DataOrigin gDataOriginTOF
constexpr o2::header::DataOrigin gDataOriginITS
constexpr o2::header::DataOrigin gDataOriginCPV
constexpr o2::header::DataDescription gDataDescriptionClusters
constexpr o2::header::DataOrigin gDataOriginFV0
std::unique_ptr< GPUReconstructionTimeframe > tf
int getNOrbitsPerTF() const
get IR corresponding to start of the HBF
static LinkSubSpec_t getSubSpec(uint16_t cru, uint8_t link, uint8_t endpoint, uint16_t feeId, o2::header::DAQID::ID srcid=o2::header::DAQID::INVALID)
static void printRDH(const RDHv4 &rdh)
static void dumpRDH(const H &rdh, NOTPTR(H))
static constexpr int getVersion()
get numeric version of the RDH
bool testFlag(uint8_t fl) const
void print(const std::string &pref="") const
uint16_t fileID
ir starting the block
bool preprocessCRUPage(const RDHAny &rdh, bool newSPage)
void print(bool verbose=false, const std::string &pref="") const
std::string describe() const
size_t readNextTF(char *buff)
size_t readNextSuperPage(char *buff, const PartStat *pstat=nullptr)
size_t getLargestSuperPage() const
size_t getLargestTF() const
size_t getNextTFSuperPagesStat(std::vector< PartStat > &parts) const
size_t readNextHBF(char *buff)
size_t getNextHBFSize() const
bool rewindToTF(uint32_t tf)
size_t getNextTFSize() const
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)