Skip to content

Commit 665d5fe

Browse files
committed
minor fix
1 parent 87390ee commit 665d5fe

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

Detectors/FIT/FT0/raw/include/FT0Raw/DataBlockFT0.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ class DataBlockPM : public DataBlockBase<DataBlockPM, RawHeaderPM, RawDataPM>
5555
// put here code for raw data checking
5656
void sanityCheck(bool& flag)
5757
{
58+
if (DataBlockWrapper<RawDataPM>::mNelements == 0) {
59+
flag = false;
60+
return;
61+
}
5862
if (DataBlockWrapper<RawDataPM>::mNelements % 2 == 0 && DataBlockWrapper<RawDataPM>::mData[DataBlockWrapper<RawDataPM>::mNelements - 1].channelID == 0) {
5963
DataBlockWrapper<RawDataPM>::mNelements--; //in case of half GBT-word filling
6064
}
@@ -105,4 +109,4 @@ class DataBlockTCMext : public DataBlockBase<DataBlockTCMext, RawHeaderTCMext, R
105109

106110
} // namespace ft0
107111
} // namespace o2
108-
#endif
112+
#endif

Detectors/FIT/FT0/reconstruction/include/FT0Reconstruction/CTFCoder.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@ void CTFCoder::decompress(const CompressedDigits& cd, VDIG& digitVec, VCHAN& cha
165165
//
166166
// rebuild digit
167167
// if (std::abs(chan.CFDTime) < Geometry::mTime_trg_gate) {
168-
if (chan.ChId < 4 * uint8_t(Geometry::NCellsA)) { // A side
169-
amplA += chan.QTCAmpl;
170-
timeA += chan.CFDTime;
171-
trig.nChanA++;
172-
173-
} else {
174-
amplC += chan.QTCAmpl;
175-
timeC += chan.CFDTime;
176-
trig.nChanC++;
177-
}
178-
// }
168+
if (chan.ChId < 4 * uint8_t(Geometry::NCellsA)) { // A side
169+
amplA += chan.QTCAmpl;
170+
timeA += chan.CFDTime;
171+
trig.nChanA++;
172+
173+
} else {
174+
amplC += chan.QTCAmpl;
175+
timeC += chan.CFDTime;
176+
trig.nChanC++;
177+
}
178+
// }
179179
}
180180
if (trig.nChanA) {
181181
trig.timeA = timeA / trig.nChanA;

0 commit comments

Comments
 (0)