Skip to content

Commit 3bcb8a4

Browse files
committed
TPC: adjust log severities and messages, add additional logs to IDC/CMV distribute devices
1 parent e30a9ae commit 3bcb8a4

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

Detectors/TPC/workflow/include/TPCWorkflow/TPCDistributeCMVSpec.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class TPCDistributeCMVSpec : public o2::framework::Task
149149
// check which buffer to use for current incoming data
150150
const bool currentBuffer = (tf > mTFEnd[mBuffer]) ? !mBuffer : mBuffer;
151151
if (mTFStart[currentBuffer] > tf) {
152-
LOGP(detail, "All CRUs for current TF {} already received. Skipping this TF", tf);
152+
LOGP(warning, "Current TF {} is older than start of currentBuffer {}. Skipping this TF", tf, mTFStart[currentBuffer]);
153153
return;
154154
}
155155

@@ -166,6 +166,7 @@ class TPCDistributeCMVSpec : public o2::framework::Task
166166
}
167167

168168
if (mProcessedCRU[currentBuffer][relTF] == mCRUs.size()) {
169+
LOGP(warning, "All CRUs for current TF {} (relTF {}) already received. Skipping this TF", tf, relTF);
169170
return;
170171
}
171172

@@ -194,6 +195,7 @@ class TPCDistributeCMVSpec : public o2::framework::Task
194195
}
195196

196197
if (mProcessedCRUs[currentBuffer][relTF][cru]) {
198+
LOGP(warning, "CRU {} for current TF {} (relTF {}) already processed. Skipping ...", cru, tf, relTF);
197199
continue;
198200
}
199201
// count total number of processed CRUs for given TF
@@ -388,15 +390,15 @@ class TPCDistributeCMVSpec : public o2::framework::Task
388390

389391
// if the last buffer has a smaller time range than expected, flush its remaining uncompleted TFs
390392
if ((mTFStart[currentBuffer] > mTFStart[!currentBuffer]) && (relTF > mNTFsDataDrop)) {
391-
LOGP(warning, "Checking last buffer from {} to {}", mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size());
393+
LOGP(warning, "Checking last buffer from relTF {} to {}", mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size());
392394
const unsigned int lastLane = (currentOutLane == 0) ? (mOutLanes - 1) : (currentOutLane - 1);
393395
checkMissingData(pc, !currentBuffer, mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size(), lastLane);
394-
LOGP(detail, "All empty TFs for TF {} for current buffer filled with dummy and sent. Clearing buffer", tf);
396+
LOGP(warning, "All empty TFs of last buffer [{}, {}] filled with dummy and sent, triggered by data from TF {} (relTF {}). Clearing buffer", mTFStart[!currentBuffer], mTFEnd[!currentBuffer], tf, relTF);
395397
finishInterval(pc, lastLane, !currentBuffer, tf);
396398
}
397399

398400
const int tfEndCheck = std::clamp(static_cast<int>(relTF) - mNTFsDataDrop, 0, static_cast<int>(mProcessedCRU[currentBuffer].size()));
399-
LOGP(detail, "Checking current buffer from {} to {}", mStartNTFsDataDrop[currentBuffer], tfEndCheck);
401+
LOGP(detail, "Checking current buffer from relTF {} to {}", mStartNTFsDataDrop[currentBuffer], tfEndCheck);
400402
checkMissingData(pc, currentBuffer, mStartNTFsDataDrop[currentBuffer], tfEndCheck, currentOutLane);
401403
mStartNTFsDataDrop[currentBuffer] = tfEndCheck;
402404
}
@@ -406,7 +408,7 @@ class TPCDistributeCMVSpec : public o2::framework::Task
406408
{
407409
for (int iTF = startTF; iTF < endTF; ++iTF) {
408410
if (mProcessedCRU[currentBuffer][iTF] != mCRUs.size()) {
409-
LOGP(warning, "CRUs for lane {} rel. TF: {} curr TF {} are missing! Processed {} CRUs out of {}", outLane, iTF, mTFStart[currentBuffer] + static_cast<long>(iTF) * mNTFsBuffer, mProcessedCRU[currentBuffer][iTF], mCRUs.size());
411+
LOGP(warning, "CRUs for lane {} rel. TF: {} curr TF {} are missing! Processed {} CRUs out of {}", outLane, iTF, mTFStart[currentBuffer] + static_cast<long>(iTF) * mNTFsBuffer + mNTFsBuffer - 1, mProcessedCRU[currentBuffer][iTF], mCRUs.size());
410412
++mProcessedTFs[currentBuffer];
411413
mProcessedCRU[currentBuffer][iTF] = mCRUs.size();
412414

@@ -440,7 +442,7 @@ class TPCDistributeCMVSpec : public o2::framework::Task
440442
}
441443
}
442444

443-
LOGP(detail, "All TFs {} for current buffer received. Clearing buffer", tf);
445+
LOGP(info, "All TFs for buffer [{}, {}] received at data from TF {}. Clearing buffer", mTFStart[buffer], mTFEnd[buffer], tf);
444446
clearBuffer(buffer);
445447
mStartNTFsDataDrop[buffer] = 0;
446448
mSendOutputStartInfo[buffer] = true;

Detectors/TPC/workflow/include/TPCWorkflow/TPCDistributeIDCSpec.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class TPCDistributeIDCSpec : public o2::framework::Task
136136
// check which buffer to use for current incoming data
137137
const bool currentBuffer = (tf > mTFEnd[mBuffer]) ? !mBuffer : mBuffer;
138138
if (mTFStart[currentBuffer] > tf) {
139-
LOGP(info, "all CRUs for current TF {} already received. Skipping this TF", tf);
139+
LOGP(warning, "Current TF {} is older than start of currentBuffer {}. Skipping this TF", tf, mTFStart[currentBuffer]);
140140
return;
141141
}
142142

@@ -154,6 +154,7 @@ class TPCDistributeIDCSpec : public o2::framework::Task
154154
}
155155

156156
if (mProcessedCRU[currentBuffer][relTF] == mCRUs.size()) {
157+
LOGP(warning, "All CRUs for current TF {} (relTF {}) already received. Skipping this TF", tf, relTF);
157158
return;
158159
}
159160

@@ -181,6 +182,7 @@ class TPCDistributeIDCSpec : public o2::framework::Task
181182
}
182183

183184
if (mProcessedCRUs[currentBuffer][relTF][cru]) {
185+
LOGP(warning, "CRU {} for current TF {} (relTF {}) already processed. Skipping ...", cru, tf, relTF);
184186
continue;
185187
} else {
186188
// count total number of processed CRUs for given TF
@@ -291,19 +293,19 @@ class TPCDistributeIDCSpec : public o2::framework::Task
291293
void checkIntervalsForMissingData(o2::framework::ProcessingContext& pc, const bool currentBuffer, const long relTF, const unsigned int currentOutLane, const uint32_t tf)
292294
{
293295
if (!(mProcessedTotalData++ % mCheckEveryNData)) {
294-
LOGP(info, "Checking for dropped packages...");
296+
LOGP(detail, "Checking for dropped packages...");
295297

296298
// if last buffer has smaller time range check the whole last buffer
297299
if ((mTFStart[currentBuffer] > mTFStart[!currentBuffer]) && (relTF > mNTFsDataDrop)) {
298-
LOGP(warning, "checking last buffer from {} to {}", mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size());
300+
LOGP(warning, "Checking last buffer from relTF {} to {}", mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size());
299301
const unsigned int lastLane = (currentOutLane == 0) ? (mOutLanes - 1) : (currentOutLane - 1);
300302
checkMissingData(pc, !currentBuffer, mStartNTFsDataDrop[!currentBuffer], mProcessedCRU[!currentBuffer].size(), lastLane);
301-
LOGP(info, "All empty TFs for TF {} for current buffer filled with dummy and sent. Clearing buffer", tf);
303+
LOGP(warning, "All empty TFs of last buffer [{}, {}] filled with dummy and sent, triggered by data from TF {} (relTF {}). Clearing buffer", mTFStart[!currentBuffer], mTFEnd[!currentBuffer], tf, relTF);
302304
finishInterval(pc, lastLane, !currentBuffer, tf);
303305
}
304306

305307
const int tfEndCheck = std::clamp(static_cast<int>(relTF) - mNTFsDataDrop, 0, static_cast<int>(mProcessedCRU[currentBuffer].size()));
306-
LOGP(info, "checking current buffer from {} to {}", mStartNTFsDataDrop[currentBuffer], tfEndCheck);
308+
LOGP(detail, "Checking current buffer from relTF {} to {}", mStartNTFsDataDrop[currentBuffer], tfEndCheck);
307309
checkMissingData(pc, currentBuffer, mStartNTFsDataDrop[currentBuffer], tfEndCheck, currentOutLane);
308310
mStartNTFsDataDrop[currentBuffer] = tfEndCheck;
309311
}
@@ -313,7 +315,7 @@ class TPCDistributeIDCSpec : public o2::framework::Task
313315
{
314316
for (int iTF = startTF; iTF < endTF; ++iTF) {
315317
if (mProcessedCRU[currentBuffer][iTF] != mCRUs.size()) {
316-
LOGP(warning, "CRUs for lane {} rel. TF: {} curr TF {} are missing! Processed {} CRUs out of {}", outLane, iTF, mTFStart[currentBuffer] + iTF, mProcessedCRU[currentBuffer][iTF], mCRUs.size());
318+
LOGP(warning, "CRUs for lane {} rel. TF: {} curr TF {} are missing! Processed {} CRUs out of {}", outLane, iTF, mTFStart[currentBuffer] + static_cast<long>(iTF) * mNTFsBuffer + mNTFsBuffer - 1, mProcessedCRU[currentBuffer][iTF], mCRUs.size());
317319
++mProcessedTFs[currentBuffer];
318320
mProcessedCRU[currentBuffer][iTF] = mCRUs.size();
319321

@@ -341,7 +343,7 @@ class TPCDistributeIDCSpec : public o2::framework::Task
341343
}
342344
}
343345

344-
LOGP(info, "All TFs {} for current buffer received. Clearing buffer", tf);
346+
LOGP(info, "All TFs for buffer [{}, {}] received at data from TF {}. Clearing buffer", mTFStart[buffer], mTFEnd[buffer], tf);
345347
clearBuffer(buffer);
346348
mStartNTFsDataDrop[buffer] = 0;
347349
mSendOutputStartInfo[buffer] = true;

0 commit comments

Comments
 (0)