Skip to content

Commit 31abdae

Browse files
shahor02ehellbar
authored andcommitted
Repair raw tf part counters / headers (#15405)
* Repair raw tf part counters / headers Can be disabled by --ignore-repair-headers. * By default do not store FLP/DISTSUBTIMEFRAME in the rawTF * Fix payloadIndex, ignore writing DistSTF by default, extra verbose output * Ignore stored DistSTF by default
1 parent be499e8 commit 31abdae

7 files changed

Lines changed: 117 additions & 23 deletions

File tree

Detectors/Raw/TFReaderDD/include/TFReaderDD/SubTimeFrameFile.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <vector>
2222

2323
#include <Headers/DataHeader.h>
24+
#include "Framework/DataSpecUtils.h"
25+
#include "Framework/OutputSpec.h"
2426
#include "Framework/Logger.h"
2527

2628
namespace o2
@@ -151,13 +153,13 @@ struct SubTimeFrameFileMeta {
151153
///
152154
std::uint64_t mWriteTimeMs;
153155

154-
auto getTimePoint()
156+
auto getTimePoint() const
155157
{
156158
using namespace std::chrono;
157159
return time_point<system_clock, milliseconds>{milliseconds{mWriteTimeMs}};
158160
}
159161

160-
std::string getTimeString()
162+
std::string getTimeString() const
161163
{
162164
using namespace std::chrono;
163165
std::time_t lTime = system_clock::to_time_t(getTimePoint());
@@ -167,6 +169,11 @@ struct SubTimeFrameFileMeta {
167169
return lTimeStream.str();
168170
}
169171

172+
const std::string info() const
173+
{
174+
return fmt::format("Size in file: {} Time: {} Version: {}", mStfSizeInFile, getTimeString(), mStfFileVersion);
175+
}
176+
170177
SubTimeFrameFileMeta(const std::uint64_t pStfSize)
171178
: SubTimeFrameFileMeta()
172179
{
@@ -220,6 +227,11 @@ struct SubTimeFrameFileDataIndex {
220227
static_assert(sizeof(DataIndexElem) == 48,
221228
"DataIndexElem changed -> Binary compatibility is lost!");
222229
}
230+
231+
const std::string info() const
232+
{
233+
return fmt::format("DH: {} Cnt:{} Size:{} Offset:{}", o2::framework::DataSpecUtils::describe(o2::framework::OutputSpec{mDataOrigin, mDataDescription, mSubSpecification}), mDataBlockCnt, mSize, mOffset);
234+
}
223235
};
224236

225237
SubTimeFrameFileDataIndex() = default;
@@ -240,6 +252,8 @@ struct SubTimeFrameFileDataIndex {
240252
return sizeof(o2::header::DataHeader) + (sizeof(DataIndexElem) * mDataIndex.size());
241253
}
242254

255+
const std::vector<DataIndexElem>& getDataIndex() const { return mDataIndex; }
256+
243257
friend std::ostream& operator<<(std::ostream& pStream, const SubTimeFrameFileDataIndex& pIndex);
244258

245259
private:

Detectors/Raw/TFReaderDD/include/TFReaderDD/SubTimeFrameFileReader.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ class SubTimeFrameFileReader
4646
public:
4747

4848
SubTimeFrameFileReader() = delete;
49-
SubTimeFrameFileReader(const std::string& pFileName, o2::detectors::DetID::mask_t detMask);
49+
SubTimeFrameFileReader(const std::string& pFileName, o2::detectors::DetID::mask_t detMask, int verb, bool sup0xccdb, bool repaireHeaders, bool rejectDistSTF);
5050
~SubTimeFrameFileReader();
5151

5252
/// Read a single TF from the file
53-
std::unique_ptr<MessagesPerRoute> read(fair::mq::Device* device, const std::vector<o2f::OutputRoute>& outputRoutes, const std::string& rawChannel, size_t slice, bool sup0xccdb, int verbosity);
53+
std::unique_ptr<MessagesPerRoute> read(fair::mq::Device* device, const std::vector<o2f::OutputRoute>& outputRoutes, const std::string& rawChannel, size_t slice);
5454

5555
/// Tell the current position of the file
5656
inline std::uint64_t position() const { return mFileMapOffset; }
@@ -76,6 +76,13 @@ class SubTimeFrameFileReader
7676
std::uint64_t mFileMapOffset = 0;
7777
std::uint64_t mFileSize = 0;
7878

79+
int mVerbosity = 0;
80+
bool mSup0xccdb = true;
81+
bool mRepaireHeaders = true;
82+
bool mRejectDistSTF = true;
83+
84+
const std::string describeHeader(const o2::header::DataHeader& hd, bool full = false) const;
85+
7986
// helper to make sure written chunks are buffered, only allow pointers
8087
template <typename pointer,
8188
typename = std::enable_if_t<std::is_pointer<pointer>::value>>

Detectors/Raw/TFReaderDD/src/RawTFDumpSpec.cxx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class RawTFDump : public Task
9797
bool mCreateRunEnvDir = true;
9898
bool mAcceptCurrentTF = false;
9999
bool mRejectDEADBEEF = false;
100+
bool mRejectDistSTF = true;
100101
int mVerbose = 0;
101102
std::vector<uint32_t> mTFOrbits{}; // 1st orbits of TF accumulated in current file
102103
o2::framework::DataTakingContext mDataTakingContext{};
@@ -185,6 +186,7 @@ void RawTFDump::init(InitContext& ic)
185186
mWriteTF = false;
186187
mStoreMetaFile = false;
187188
}
189+
mRejectDistSTF = !ic.options().get<bool>("include-dist-stf");
188190
mRejectDEADBEEF = !ic.options().get<bool>("include-deadbeef");
189191
mCreateRunEnvDir = !ic.options().get<bool>("ignore-partition-run-dir");
190192
mMinFileSize = ic.options().get<int64_t>("min-file-size");
@@ -253,6 +255,7 @@ void RawTFDump::run(ProcessingContext& pc)
253255
try {
254256
size_t lTFSizeInFile = getTFSizeInFile();
255257
SubTimeFrameFileMeta lTFFileMeta(lTFSizeInFile);
258+
lTFFileMeta.mWriteTimeMs = mTimingInfo.creation;
256259

257260
mFile << lTFFileMeta; // Write DataHeader + SubTimeFrameFileMeta
258261
mFile << mTFDataIndex; // Write DataHeader + SubTimeFrameFileDataIndex
@@ -263,6 +266,10 @@ void RawTFDump::run(ProcessingContext& pc)
263266
const auto& dataPtr = mTFData[lEntry + part];
264267
DataHeader hdToWrite = *reinterpret_cast<const DataHeader*>(dataPtr.first); // make a local DataHeader copy to clear flagsNextHeader bit
265268
hdToWrite.flagsNextHeader = 0;
269+
hdToWrite.splitPayloadIndex = part;
270+
if (mVerbose > 2) {
271+
LOGP(info, "Writing part:{}/{} of {} | TFCounter:{} part{}/{}", part, lCnt, DataSpecUtils::describe(OutputSpec{hdToWrite.dataOrigin, hdToWrite.dataDescription, hdToWrite.subSpecification}), hdToWrite.firstTForbit, hdToWrite.splitPayloadIndex, hdToWrite.splitPayloadParts);
272+
}
266273
buffered_write(reinterpret_cast<const char*>(&hdToWrite), sizeof(DataHeader));
267274
buffered_write(dataPtr.second, hdToWrite.payloadSize);
268275
}
@@ -517,7 +524,11 @@ void RawTFDump::prepareTFForWriting(ProcessingContext& pc)
517524
LOGP(error, "Failed to extract header");
518525
continue;
519526
}
520-
if (dh->subSpecification == 0xdeadbeef && mRejectDEADBEEF) {
527+
if ((dh->subSpecification == 0xdeadbeef && mRejectDEADBEEF) ||
528+
(dh->dataOrigin == o2::header::gDataOriginFLP && dh->dataDescription == o2::header::gDataDescriptionDISTSTF && mRejectDistSTF)) {
529+
if (mVerbose > 2) {
530+
LOGP(info, "Rejecting {}", DataSpecUtils::describe(OutputSpec{dh->dataOrigin, dh->dataDescription, dh->subSpecification}));
531+
}
521532
continue;
522533
}
523534
const auto lHdrDataSize = sizeof(DataHeader) + dh->payloadSize;
@@ -531,9 +542,10 @@ void RawTFDump::prepareTFForWriting(ProcessingContext& pc)
531542
lCnt++;
532543
mTFData.push_back({ref.header, ref.payload});
533544
if (mVerbose > 2) {
534-
LOGP(info, "{}, part: {} of {}, payload {}, 1stTFOrbit: {} TF: {}",
545+
const auto* dph = DataRefUtils::getHeader<DataProcessingHeader*>(ref);
546+
LOGP(info, "{}, part: {} of {}, payload {}, 1stTFOrbit: {} TF: {}, creation: {} | counter:{} size:{} entry:{}",
535547
DataSpecUtils::describe(OutputSpec{dh->dataOrigin, dh->dataDescription, dh->subSpecification}),
536-
dh->splitPayloadIndex, dh->splitPayloadParts, dh->payloadSize, dh->firstTForbit, dh->tfCounter);
548+
dh->splitPayloadIndex, dh->splitPayloadParts, dh->payloadSize, dh->firstTForbit, dh->tfCounter, dph ? dph->creation : -1UL, lCnt, lSize, lEntry);
537549
}
538550
}
539551

@@ -548,7 +560,7 @@ void RawTFDump::prepareTFForWriting(ProcessingContext& pc)
548560

549561
OutputSpec spec{eq.mDataOrigin, eq.mDataDescription, eq.mSubSpecification};
550562
if (mVerbose > 1) {
551-
LOGP(info, "{} : {} parts of size {} | offset: {}", DataSpecUtils::describe(spec), lCnt, lSize, lCurrOff);
563+
LOGP(info, "{} : {} parts of size {} entry {}| offset: {}", DataSpecUtils::describe(spec), lCnt, lSize, lEntry, lCurrOff);
552564
}
553565
mTFDataIndex.AddStfElement(eq, lCnt, lCurrOff, lSize);
554566
lCurrOff += lSize;
@@ -577,6 +589,7 @@ DataProcessorSpec getRawTFDumpSpec(const std::string& inpconfig, const std::stri
577589
AlgorithmSpec{adaptFromTask<RawTFDump>(trigger)},
578590
Options{
579591
{"include-deadbeef", VariantType::Bool, false, {"Include DPL-generated 0xdeadbeef subspecs for missing data"}},
592+
{"include-dist-stf", VariantType::Bool, false, {"Include FLP/DISTSUBTIMEFRAME input"}},
580593
{"exclude-trigger-specs", VariantType::String, "", {"Ignore trigger seen in these inputs of triggerspec"}},
581594
{"max-dump-rate", VariantType::Float, 0.f, {"%-age of TFs to dump. W/o external trigger: random(>0) or periodic(<0) rejection, with: max limit"}},
582595
{"rate-est-conf-limit", VariantType::Float, 0.05f, {"quantile for the lowest rate estimate confidence limit"}},

Detectors/Raw/TFReaderDD/src/SubTimeFrameFileReader.cxx

Lines changed: 61 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ namespace o2f = o2::framework;
4545
/// SubTimeFrameFileReader
4646
////////////////////////////////////////////////////////////////////////////////
4747

48-
SubTimeFrameFileReader::SubTimeFrameFileReader(const std::string& pFileName, o2::detectors::DetID::mask_t detMask)
49-
: mFileName(pFileName)
48+
SubTimeFrameFileReader::SubTimeFrameFileReader(const std::string& pFileName, o2::detectors::DetID::mask_t detMask, int verb, bool sup0xccdb, bool repaireHeaders, bool rejectDistSTF)
49+
: mFileName(pFileName), mVerbosity(verb), mSup0xccdb(sup0xccdb), mRepaireHeaders(repaireHeaders), mRejectDistSTF(rejectDistSTF)
5050
{
5151
mFileMap.open(mFileName);
5252
if (!mFileMap.is_open()) {
@@ -178,13 +178,21 @@ Stack SubTimeFrameFileReader::getHeaderStack(std::size_t& pOrigsize)
178178
return Stack(lStackMem);
179179
}
180180

181+
const std::string SubTimeFrameFileReader::describeHeader(const o2::header::DataHeader& hd, bool full) const
182+
{
183+
std::string res = fmt::format("{}", o2f::DataSpecUtils::describe(o2::framework::OutputSpec{hd.dataOrigin, hd.dataDescription, hd.subSpecification}));
184+
if (full) {
185+
res += fmt::format(" part:{}/{} sz:{} TF:{} Orb:{} Run:{}", hd.splitPayloadIndex, hd.splitPayloadParts, hd.payloadSize, hd.tfCounter, hd.firstTForbit, hd.runNumber);
186+
}
187+
return res;
188+
}
189+
181190
std::uint32_t sRunNumber = 0; // TODO: add id to files metadata
182191
std::uint32_t sFirstTForbit = 0; // TODO: add id to files metadata
183192
std::uint64_t sCreationTime = 0;
184193
std::mutex stfMtx;
185194

186-
std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device* device, const std::vector<o2f::OutputRoute>& outputRoutes,
187-
const std::string& rawChannel, size_t slice, bool sup0xccdb, int verbosity)
195+
std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device* device, const std::vector<o2f::OutputRoute>& outputRoutes, const std::string& rawChannel, size_t slice)
188196
{
189197
std::unique_ptr<MessagesPerRoute> messagesPerRoute = std::make_unique<MessagesPerRoute>();
190198
auto& msgMap = *messagesPerRoute.get();
@@ -252,10 +260,15 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
252260
return nullptr;
253261
}
254262
lStfMetaDataHdr = o2::header::DataHeader::Get(lMetaHdrStack.first());
255-
LOGP(debug, "read filemeta, pos = {}, size = {}", position(), sizeof(SubTimeFrameFileMeta));
263+
if (mVerbosity > 0) {
264+
LOGP(info, "read filemeta, pos = {}, size = {}", position(), sizeof(SubTimeFrameFileMeta));
265+
}
256266
if (!read_advance(&lStfFileMeta, sizeof(SubTimeFrameFileMeta))) {
257267
return nullptr;
258268
}
269+
if (mVerbosity > 0) {
270+
LOGP(info, "TFMeta : {}", lStfFileMeta.info());
271+
}
259272
if (lStfFileMeta.mWriteTimeMs == 0 && creationFallBack != 0) {
260273
if (!creation0Notified) {
261274
creation0Notified = true;
@@ -319,6 +332,7 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
319332

320333
std::int64_t lLeftToRead = lStfDataSize;
321334
STFHeader stfHeader{tfID, -1u, -1u};
335+
DataHeader prevHeader;
322336
// read <hdrStack + data> pairs
323337
while (lLeftToRead > 0) {
324338
// allocate and read the Headers
@@ -335,6 +349,25 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
335349
return nullptr;
336350
}
337351
DataHeader locDataHeader(*lDataHeader);
352+
353+
if (mRepaireHeaders) {
354+
if (locDataHeader == prevHeader) {
355+
if (prevHeader.tfCounter == locDataHeader.tfCounter && (prevHeader.splitPayloadIndex + 1) != locDataHeader.splitPayloadIndex) {
356+
if (mVerbosity > 3) {
357+
LOGP(warn, "Repairing wrong part index for {} to {}", describeHeader(locDataHeader, true), (prevHeader.splitPayloadIndex + 1) % prevHeader.splitPayloadParts);
358+
}
359+
locDataHeader.splitPayloadIndex = (++prevHeader.splitPayloadIndex) % prevHeader.splitPayloadParts;
360+
}
361+
} else { // new header
362+
if (locDataHeader.splitPayloadIndex != 0) {
363+
if (mVerbosity > 2) {
364+
LOGP(warn, "Repairing wrong part index for new {} to {}", describeHeader(locDataHeader, true), (prevHeader.splitPayloadIndex + 1) % prevHeader.splitPayloadParts);
365+
}
366+
locDataHeader.splitPayloadIndex = 0;
367+
}
368+
}
369+
prevHeader = locDataHeader;
370+
}
338371
// sanity check
339372
if (int(locDataHeader.firstTForbit) == -1) {
340373
if (!negativeOrbitNotified) {
@@ -350,6 +383,18 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
350383
}
351384
locDataHeader.runNumber = runNumberFallBack;
352385
}
386+
const std::uint64_t lDataSize = locDataHeader.payloadSize;
387+
388+
if (locDataHeader.dataOrigin == o2::header::gDataOriginFLP && locDataHeader.dataDescription == o2::header::gDataDescriptionDISTSTF && mRejectDistSTF) {
389+
if (mVerbosity > 0) {
390+
LOGP(warn, "Ignoring stored {}", describeHeader(locDataHeader));
391+
}
392+
if (!ignore_nbytes(lDataSize)) {
393+
return nullptr;
394+
}
395+
lLeftToRead -= (lDataHeaderStackSize + lDataSize); // update the counter
396+
continue;
397+
}
353398
o2::header::Stack headerStack{locDataHeader, o2f::DataProcessingHeader{tfID, 1, lStfFileMeta.mWriteTimeMs}};
354399
if (stfHeader.runNumber == -1) {
355400
stfHeader.id = locDataHeader.tfCounter;
@@ -359,8 +404,6 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
359404
sRunNumber = stfHeader.runNumber;
360405
sFirstTForbit = stfHeader.firstOrbit;
361406
}
362-
363-
const std::uint64_t lDataSize = locDataHeader.payloadSize;
364407
// do we accept these data?
365408
auto detOrigStatus = mDetOrigMap.find(locDataHeader.dataOrigin);
366409
if (detOrigStatus != mDetOrigMap.end() && !detOrigStatus->second) { // this is a detector data and we don't want to read it
@@ -403,17 +446,20 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
403446
if (!read_advance(lDataMsg->GetData(), lDataSize)) {
404447
return nullptr;
405448
}
406-
if (verbosity > 0) {
407-
if (verbosity > 1 || locDataHeader.splitPayloadIndex == 0) {
449+
if (mVerbosity > 0) {
450+
if (mVerbosity > 1 || locDataHeader.splitPayloadIndex == 0) {
408451
printStack(headerStack);
409-
if (o2::raw::RDHUtils::checkRDH(lDataMsg->GetData()) && verbosity > 2) {
452+
if (o2::raw::RDHUtils::checkRDH(lDataMsg->GetData()) && mVerbosity > 2) {
410453
o2::raw::RDHUtils::printRDH(lDataMsg->GetData());
411454
}
412455
}
413456
}
414457
#ifdef _RUN_TIMING_MEASUREMENT_
415458
addPartSW.Start(false);
416459
#endif
460+
if (mVerbosity > 2) {
461+
LOGP(info, "addPart {} to {} | HdrSize:{} DataSize:{}", describeHeader(locDataHeader, true), fmqChannel, lHdrStackMsg->GetSize(), lDataMsg->GetSize());
462+
}
417463
addPart(std::move(lHdrStackMsg), std::move(lDataMsg), fmqChannel);
418464
#ifdef _RUN_TIMING_MEASUREMENT_
419465
addPartSW.Stop();
@@ -435,7 +481,7 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
435481
}
436482

437483
unsigned stfSS[2] = {0, 0xccdb};
438-
for (int iss = 0; iss < (sup0xccdb ? 1 : 2); iss++) {
484+
for (int iss = 0; iss < (mSup0xccdb ? 1 : 2); iss++) {
439485
o2::header::DataHeader stfDistDataHeader(o2::header::gDataDescriptionDISTSTF, o2::header::gDataOriginFLP, stfSS[iss], sizeof(STFHeader), 0, 1);
440486
stfDistDataHeader.payloadSerializationMethod = o2::header::gSerializationMethodNone;
441487
stfDistDataHeader.firstTForbit = stfHeader.firstOrbit;
@@ -445,7 +491,7 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
445491
if (!fmqChannel.empty()) { // no output channel
446492
auto fmqFactory = device->GetChannel(fmqChannel, 0).Transport();
447493
o2::header::Stack headerStackSTF{stfDistDataHeader, o2f::DataProcessingHeader{tfID, 1, lStfFileMeta.mWriteTimeMs}};
448-
if (verbosity > 0) {
494+
if (mVerbosity > 0) {
449495
printStack(headerStackSTF);
450496
}
451497
auto hdMessageSTF = fmqFactory->CreateMessage(headerStackSTF.size(), fair::mq::Alignment{64});
@@ -455,6 +501,9 @@ std::unique_ptr<MessagesPerRoute> SubTimeFrameFileReader::read(fair::mq::Device*
455501
#ifdef _RUN_TIMING_MEASUREMENT_
456502
addPartSW.Start(false);
457503
#endif
504+
if (mVerbosity > 2) {
505+
LOGP(info, "addPart forced {} to {} | HdrSize:{} DataSize:{}", describeHeader(stfDistDataHeader, true), fmqChannel, hdMessageSTF->GetSize(), plMessageSTF->GetSize());
506+
}
458507
addPart(std::move(hdMessageSTF), std::move(plMessageSTF), fmqChannel);
459508
#ifdef _RUN_TIMING_MEASUREMENT_
460509
addPartSW.Stop();

Detectors/Raw/TFReaderDD/src/TFReaderSpec.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ void TFReaderSpec::init(o2f::InitContext& ic)
118118
mInput.maxTFsPerFile = mInput.maxTFsPerFile > 0 ? mInput.maxTFsPerFile : 0x7fffffff;
119119
mInput.maxTFCache = std::max(1, ic.options().get<int>("max-cached-tf"));
120120
mInput.maxFileCache = std::max(1, ic.options().get<int>("max-cached-files"));
121+
mInput.repairHeaders = !ic.options().get<bool>("ignore-repair-headers");
122+
mInput.rejectDistSTF = !ic.options().get<bool>("read-dist-stf");
123+
121124
if (!mInput.fileRunTimeSpans.empty()) {
122125
loadRunTimeSpans(mInput.fileRunTimeSpans);
123126
}
@@ -263,7 +266,11 @@ void TFReaderSpec::run(o2f::ProcessingContext& ctx)
263266
setTimingInfo(*tfPtr.get());
264267
size_t nparts = 0, dataSize = 0;
265268
if (mInput.sendDummyForMissing) {
269+
int cntAck = 0;
266270
for (auto& msgIt : *tfPtr.get()) { // complete with empty output for the specs which were requested but were not seen in the data
271+
if (mInput.verbosity > 0) {
272+
LOGP(info, "acknowledgeOutput {}", cntAck++);
273+
}
267274
acknowledgeOutput(*msgIt.second.get(), true);
268275
}
269276
addMissingParts(*tfPtr.get());
@@ -409,7 +416,7 @@ void TFReaderSpec::TFBuilder()
409416
}
410417

411418
LOG(info) << "Processing file " << tfFileName;
412-
SubTimeFrameFileReader reader(tfFileName, mInput.detMask);
419+
SubTimeFrameFileReader reader(tfFileName, mInput.detMask, mInput.verbosity, mInput.sup0xccdb, mInput.repairHeaders, mInput.rejectDistSTF);
413420
size_t locID = 0;
414421
// try
415422
{
@@ -421,7 +428,7 @@ void TFReaderSpec::TFBuilder()
421428
std::this_thread::sleep_for(sleepTime);
422429
continue;
423430
}
424-
auto tf = reader.read(mDevice, mOutputRoutes, mInput.rawChannelConfig, mAccTFCounter, mInput.sup0xccdb, mInput.verbosity);
431+
auto tf = reader.read(mDevice, mOutputRoutes, mInput.rawChannelConfig, mAccTFCounter);
425432
bool acceptTF = true;
426433
if (tf) {
427434
if (mRunTimeRanges.size()) {
@@ -675,6 +682,8 @@ o2f::DataProcessorSpec o2::rawdd::getTFReaderSpec(o2::rawdd::TFReaderInp& rinp)
675682
}
676683
spec.options.emplace_back(o2f::ConfigParamSpec{"select-tf-ids", o2f::VariantType::String, "", {"comma-separated list TF IDs to inject (from cumulative counter of TFs seen)"}});
677684
spec.options.emplace_back(o2f::ConfigParamSpec{"fetch-failure-threshold", o2f::VariantType::Float, 0.f, {"Fatil if too many failures( >0: fraction, <0: abs number, 0: no threshold)"}});
685+
spec.options.emplace_back(o2f::ConfigParamSpec{"ignore-repair-headers", o2f::VariantType::Bool, false, {"do not check/repair headers"}});
686+
spec.options.emplace_back(o2f::ConfigParamSpec{"read-dist-stf", o2f::VariantType::Bool, false, {"do not ignore stored FLP/DISTSUBTIMEFRAME (will clash with injected one)"}});
678687
spec.options.emplace_back(o2f::ConfigParamSpec{"max-tf", o2f::VariantType::Int, -1, {"max TF ID to process (<= 0 : infinite)"}});
679688
spec.options.emplace_back(o2f::ConfigParamSpec{"max-tf-per-file", o2f::VariantType::Int, -1, {"max TFs to process per raw-tf file (<= 0 : infinite)"}});
680689
spec.options.emplace_back(o2f::ConfigParamSpec{"max-cached-tf", o2f::VariantType::Int, 3, {"max TFs to cache in memory"}});

Detectors/Raw/TFReaderDD/src/TFReaderSpec.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct TFReaderInp {
4949
bool sendDummyForMissing = true;
5050
bool sup0xccdb = false;
5151
bool invertIRFramesSelection = false;
52+
bool repairHeaders = true;
53+
bool rejectDistSTF = true;
5254
std::vector<o2::header::DataHeader> hdVec;
5355
std::vector<int> tfIDs{};
5456
};

0 commit comments

Comments
 (0)