Skip to content

Commit 3e46ea5

Browse files
bazinskimartenole
authored andcommitted
TRD work around to keep old qc version compiling
1 parent 422df60 commit 3e46ea5

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

DataFormats/Detectors/TRD/include/DataFormatsTRD/RawDataStats.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum ParsingErrors {
8787
FEEIDBadSector, // RDH is in error, the FEEID.supermodule is not a valid value.
8888
DigitHCHeaderPreTriggerPhaseOOB, // pretrigger phase in Digit HC header has to be less than 12, it is not.
8989
HalfCRUBadBC, // saw a bc below the L0 trigger
90-
LastParsingError
90+
TRDLastParsingError // This is to keep QC happy until we can change it there as well.
9191
};
9292

9393
static std::unordered_map<int, std::string> ParsingErrorsString = {
@@ -146,7 +146,7 @@ static std::unordered_map<int, std::string> ParsingErrorsString = {
146146
{FEEIDBadSector, "FEEID Sector is not valid"},
147147
{DigitHCHeaderPreTriggerPhaseOOB, "Digit Half Chamber Header PreTriggerPhase is out of bounds"},
148148
{HalfCRUBadBC, "HalfCRU has a bad bunchcrossing"},
149-
{LastParsingError, "Last Parsing Error"}};
149+
{TRDLastParsingError, "Last Parsing Error"}};
150150

151151
//enumerations for the options, saves on having a long parameter list.
152152
enum OptionBits {
@@ -189,8 +189,8 @@ class TRDDataCountersPerTimeFrame
189189
std::array<uint16_t, o2::trd::constants::NSECTOR * 60> mLinkWords{}; // units of 256bits, read from the cru half chamber header
190190
std::array<uint16_t, o2::trd::constants::NSECTOR * 60> mLinkWordsRead{}; // units of 32 bits the data words read before dumping or finishing
191191
std::array<uint16_t, o2::trd::constants::NSECTOR * 60> mLinkWordsRejected{}; // units of 32 bits the data dumped due to some or other error
192-
std::array<uint16_t, LastParsingError> mParsingErrors{}; // errors in parsing, indexed by enum above of ParsingErrors
193-
std::array<uint32_t, o2::trd::constants::NSECTOR * 60 * LastParsingError + LastParsingError> mParsingErrorsByLink{}; // errors in parsing, indexed by enum above of ParsingErrors
192+
std::array<uint16_t, TRDLastParsingError> mParsingErrors{}; // errors in parsing, indexed by enum above of ParsingErrors
193+
std::array<uint32_t, o2::trd::constants::NSECTOR * 60 * TRDLastParsingError + TRDLastParsingError> mParsingErrorsByLink{}; // errors in parsing, indexed by enum above of ParsingErrors
194194
uint16_t mDigitsPerEvent; // average digits found per event in this timeframe, ignoring the no digit events where there is no calibration trigger.
195195
uint16_t mTrackletsPerEvent; // average tracklets found per event in this timeframe
196196
double mTimeTaken; // time taken to process the entire timeframe [ms].

Detectors/TRD/reconstruction/include/TRDReconstruction/EventRecord.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ class EventStorage
158158
if (hcid < 0) {
159159
detailGraphs = false;
160160
}
161-
if (error > LastParsingError) {
161+
if (error > TRDLastParsingError) {
162162
LOG(info) << "wrong error number to inc ParsingError in TrackletParsing : error" << error << " for hcid:" << hcid;
163163
} else {
164164
mTFStats.mParsingErrors[error]++;
165165
if (detailGraphs) { // sm=-1 is reserved for those errors where we dont know or cant know the underlying source.
166-
if (hcid * LastParsingError + error < o2::trd::constants::NCHAMBER * 2 * LastParsingError) {
166+
if (hcid * TRDLastParsingError + error < o2::trd::constants::NCHAMBER * 2 * TRDLastParsingError) {
167167
//prevent bounding errors
168-
mTFStats.mParsingErrorsByLink[hcid * LastParsingError + error]++;
168+
mTFStats.mParsingErrorsByLink[hcid * TRDLastParsingError + error]++;
169169
}
170170
}
171171
}

Detectors/TRD/reconstruction/src/TrackletsParser.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void TrackletsParser::incParsingError(int error, std::string message)
8989
layer = 0;
9090
}
9191
// error is too big ?
92-
if (mOptions[TRDGenerateStats] && error <= LastParsingError) {
92+
if (mOptions[TRDGenerateStats] && error <= TRDLastParsingError) {
9393
mEventRecords->incParsingError(error, hcid);
9494
}
9595
if (mOptions[TRDVerboseErrorsBit]) {

0 commit comments

Comments
 (0)