Skip to content

Commit 673f20c

Browse files
committed
[MCH] improved detection of TimeFrame start
1 parent 9da14e7 commit 673f20c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Detectors/MUON/MCH/Workflow/src/cru-page-reader-workflow.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,10 @@ class FileReaderTask
320320
}
321321

322322
if (mPrint) {
323-
std::cout << "Sending TF" << std::endl
323+
std::cout << "Sending TF " << orbitMin << " (previous " << mLastTForbit << " delta " << orbitMin-mLastTForbit << ")" << std::endl
324324
<< std::endl;
325325
}
326+
mLastTForbit = orbitMin;
326327
auto freefct = [](void* data, void* /*hint*/) { free(data); };
327328
pc.outputs().adoptChunk(Output{"RDT", "RAWDATA"}, outBuf, outSize, freefct, nullptr);
328329

@@ -448,7 +449,7 @@ class FileReaderTask
448449
// increment the total buffer size
449450
mTimeFrameSizes[feeID][linkID] += pageSize;
450451

451-
if ((triggerType & 0x800) != 0 && stopBit == 0 && pageCounter == 0 && bc == 0) {
452+
if ((triggerType & 0x800) != 0 && /*stopBit == 0 && pageCounter == 0 &&*/ bc == 0) {
452453
// This is the start of a new TimeFrame, so we need to push a new empty TimeFrame in the queue
453454
if (mPrint) {
454455
std::cout << "tfQueue.size(): " << tfQueue.size() << std::endl;
@@ -615,6 +616,7 @@ class FileReaderTask
615616
bool mFullTF; ///< send full time frames
616617
bool mSaveTF; ///< save individual time frames to file
617618
int mOverlap; ///< overlap between contiguous TimeFrames
619+
int mLastTForbit{ 0 };
618620
bool mPrint = false; ///< print debug messages
619621
o2::dataformats::TFIDInfo mTFIDInfo{}; // struct to modify output headers
620622

0 commit comments

Comments
 (0)