Skip to content

Commit 7397c7b

Browse files
noferinishahor02
authored andcommitted
fixes for PR 4645
1 parent d3dc311 commit 7397c7b

5 files changed

Lines changed: 8 additions & 17 deletions

File tree

DataFormats/Detectors/TOF/include/DataFormatsTOF/CTF.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct CTFHeader {
3535
uint32_t firstOrbit = 0; /// 1st orbit of TF
3636
uint16_t firstBC = 0; /// 1st BC of TF
3737

38-
ClassDefNV(CTFHeader, 2);
38+
ClassDefNV(CTFHeader, 1);
3939
};
4040

4141
/// Compressed but not yet entropy-encoded infos

Detectors/TOF/base/include/TOFBase/Digit.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ struct ReadoutWindowData {
116116
o2::dataformats::RangeReference<int, int> refDiagnostic;
117117

118118
// crate info for diagnostic patterns
119-
int mNdiaCrate[72] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
120-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
121-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
122-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
123-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
124-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
119+
int mNdiaCrate[72] = {0};
125120

126121
InteractionRecord mFirstIR{0, 0};
127122

Detectors/TOF/base/include/TOFBase/WindowFiller.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class WindowFiller
2828
struct PatternData {
2929
uint32_t pattern;
3030
int icrate;
31-
ulong row;
31+
unsigned long row;
3232

33-
PatternData(uint32_t patt = 0, int icr = 0, ulong rw = 0) : pattern(patt), icrate(icr), row(rw) {}
33+
PatternData(uint32_t patt = 0, int icr = 0, unsigned long rw = 0) : pattern(patt), icrate(icr), row(rw) {}
3434
};
3535

3636
WindowFiller() { initObj(); };
@@ -64,8 +64,7 @@ class WindowFiller
6464

6565
void clearCounts()
6666
{
67-
for (int i = 0; i < o2::tof::Geo::NCHANNELS; i++)
68-
mChannelCounts[i] = 0;
67+
memset(mChannelCounts, 0, o2::tof::Geo::NCHANNELS * sizeof(mChannelCounts[0]));
6968
}
7069

7170
std::vector<uint32_t>& getPatterns() { return mPatterns; }

Detectors/TOF/base/src/WindowFiller.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,22 +129,19 @@ void WindowFiller::fillOutputContainer(std::vector<Digit>& digits)
129129
int npatterns = 0;
130130

131131
// check if patterns are in the current row
132-
int ipatt = mCratePatterns.size() - 1;
133132
for (std::vector<PatternData>::reverse_iterator it = mCratePatterns.rbegin(); it != mCratePatterns.rend(); ++it) {
134133
if (it->row > mReadoutWindowCurrent)
135134
break;
136135

137136
if (it->row < mReadoutWindowCurrent) { // this should not happen
138137
LOG(ERROR) << "One pattern skipped because appears to occur early of the current row " << it->row << " < " << mReadoutWindowCurrent << " ?!";
139-
mCratePatterns.erase(mCratePatterns.begin() + ipatt);
140138
} else {
141139
mPatterns.push_back(it->pattern);
142140
info.addedDiagnostic(it->icrate);
143141

144-
mCratePatterns.erase(mCratePatterns.begin() + ipatt);
145142
npatterns++;
146143
}
147-
ipatt--;
144+
mCratePatterns.pop_back();
148145
}
149146

150147
info.setFirstEntryDia(firstPattern);

Detectors/TOF/workflow/src/CompressedDecodingTask.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ void CompressedDecodingTask::postData(ProcessingContext& pc)
9797
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "DIGITS", 0, Lifetime::Timeframe}, *alldigits);
9898
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "READOUTWINDOW", 0, Lifetime::Timeframe}, *row);
9999

100-
std::vector<uint32_t> patterns = mDecoder.getPatterns();
100+
std::vector<uint32_t>& patterns = mDecoder.getPatterns();
101101
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "PATTERNS", 0, Lifetime::Timeframe}, patterns);
102102

103-
std::vector<uint64_t> errors = mDecoder.getErrors();
103+
std::vector<uint64_t>& errors = mDecoder.getErrors();
104104
pc.outputs().snapshot(Output{o2::header::gDataOriginTOF, "ERRORS", 0, Lifetime::Timeframe}, errors);
105105

106106
// RS this is a hack to be removed once we have correct propagation of the firstTForbit by the framework

0 commit comments

Comments
 (0)