Skip to content

Commit 44ed71a

Browse files
authored
[QC-511] ITS: using nTriggers to calculate the ROF for the FHR task and fix the warning in Fee task (#577)
* ITS: using nTriggers to calculate the ROF for the FHR task * fix anonymous union errors in macOS
1 parent ebb755b commit 44ed71a

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

Modules/ITS/include/ITS/ITSFeeTask.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ITSFeeTask final : public TaskInterface
4545
uint64_t laneStatus : 56;
4646
uint16_t zero0 : 8;
4747
} laneBits;
48-
};
48+
} laneWord;
4949
union {
5050
uint64_t word1 = 0x0;
5151
struct {
@@ -54,7 +54,7 @@ class ITSFeeTask final : public TaskInterface
5454
uint8_t id : 8;
5555
uint64_t padding : 48;
5656
} indexBits;
57-
};
57+
} indexWord;
5858
};
5959

6060
public:

Modules/ITS/src/ITSFeeTask.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
169169

170170
if ((int)(rdh->stop) && it.size()) { //looking into the DDW0 from the closing packet
171171
auto const* ddw = reinterpret_cast<const GBTDiagnosticWord*>(it.data());
172-
uint64_t laneInfo = ddw->laneBits.laneStatus;
173-
uint8_t flag1 = ddw->indexBits.flag1;
172+
uint64_t laneInfo = ddw->laneWord.laneBits.laneStatus;
173+
uint8_t flag1 = ddw->indexWord.indexBits.flag1;
174174

175175
for (int i = 0; i < 3; i++) {
176176
if (flag1 >> i & 0x1) {
177177
mFlag1Check->Fill(ifee, i);
178178
}
179179
}
180180

181-
uint8_t index = ddw->indexBits.index;
181+
uint8_t index = ddw->indexWord.indexBits.index;
182182
if (index != 0) {
183183
for (int i = 0; i < 4; i++) {
184184
if (index >> i & 0x1) {
@@ -187,7 +187,7 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
187187
}
188188
}
189189

190-
uint8_t id = ddw->indexBits.id;
190+
uint8_t id = ddw->indexWord.indexBits.id;
191191
if (id != 0xe4) {
192192
for (int i = 0; i < 8; i++) {
193193
if (id >> i & 0x1) {

Modules/ITS/src/ITSFhrTask.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
362362
mChipStaveEventHitCheck[lay]->Fill(chip, sta);
363363
}
364364
} else {
365-
if (pixels.size() > 0) {
365+
if (pixels.size() > 100) {
366366
mChipStaveEventHitCheck[lay]->Fill(mod + (ssta * (nHicPerStave[lay] / 2)), sta);
367367
}
368368
}
@@ -400,14 +400,14 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
400400
}
401401
if (ilayer < NLayerIB) {
402402
for (int ichip = 0 + (ilink * 3); ichip < (ilink * 3) + 3; ichip++) {
403-
if ((GBTLinkInfo->statistics.nPackets > 0) and (mHitNumberOfChip[ilayer][istave][0][0][ichip] >= 0)) {
404-
mChipStaveOccupancy[ilayer]->SetBinContent(ichip + 1, istave + 1, (mHitNumberOfChip[ilayer][istave][0][0][ichip]) / (GBTLinkInfo->statistics.nPackets * 1024. * 512.));
403+
if ((GBTLinkInfo->statistics.nTriggers > 0) and (mHitNumberOfChip[ilayer][istave][0][0][ichip] >= 0)) {
404+
mChipStaveOccupancy[ilayer]->SetBinContent(ichip + 1, istave + 1, (mHitNumberOfChip[ilayer][istave][0][0][ichip]) / (GBTLinkInfo->statistics.nTriggers * 1024. * 512.));
405405
std::unordered_map<unsigned int, int>::iterator iter;
406406
for (iter = mHitPixelID_Hash[ilayer][istave][0][0][ichip].begin(); iter != mHitPixelID_Hash[ilayer][istave][0][0][ichip].end(); iter++) {
407407
int pixelPos[2] = { (int)(iter->first / 1000) + (int)ichip * 1024, (int)(iter->first % 1000) };
408408
mStaveHitmap[ilayer][istave]->SetBinContent(pixelPos, (double)iter->second);
409409
double pixelOccupancy = (double)iter->second;
410-
pixelOccupancy /= GBTLinkInfo->statistics.nPackets;
410+
pixelOccupancy /= GBTLinkInfo->statistics.nTriggers;
411411
mOccupancyPlot[ilayer]->Fill(log10(pixelOccupancy));
412412
}
413413
}
@@ -418,7 +418,7 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
418418
double chipOccupancy = 0;
419419
for (int ichip = 0; ichip < nChipsPerHic[ilayer]; ichip++) {
420420
chipOccupancy += mHitNumberOfChip[ilayer][istave][isubstave][ihic][ichip];
421-
if ((GBTLinkInfo->statistics.nPackets > 0) and (mHitNumberOfChip[ilayer][istave][ilink][ihic][ichip] >= 0)) {
421+
if ((GBTLinkInfo->statistics.nTriggers > 0) and (mHitNumberOfChip[ilayer][istave][ilink][ihic][ichip] >= 0)) {
422422
if (mHitPixelID_Hash[ilayer][istave][ilink][ihic][ichip].size() == 0) {
423423
continue;
424424
}
@@ -432,12 +432,12 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
432432
int pixelPos[2] = { (ihic * ((nChipsPerHic[lay] / 2) * NCols)) + (nChipsPerHic[lay] / 2) * NCols - (ichip - 7) * NCols - ((int)iter->first / 1000) + 1, NRows + ((int)iter->first % 1000) + (1024 * isubstave) + 1 };
433433
mStaveHitmap[ilayer][istave]->SetBinContent(pixelPos, pixelOccupancy);
434434
}
435-
pixelOccupancy /= GBTLinkInfo->statistics.nPackets;
435+
pixelOccupancy /= GBTLinkInfo->statistics.nTriggers;
436436
mOccupancyPlot[ilayer]->Fill(log10(pixelOccupancy));
437437
}
438438
}
439439
}
440-
chipOccupancy = chipOccupancy / (GBTLinkInfo->statistics.nPackets * 1024. * 512.);
440+
chipOccupancy = chipOccupancy / (GBTLinkInfo->statistics.nTriggers * 1024. * 512.);
441441
if (chipOccupancy == 0) {
442442
continue;
443443
}

0 commit comments

Comments
 (0)