Skip to content

Commit a48ba08

Browse files
committed
dec: two latency vars, rew-decoder accessing ccdb
1 parent e88df9a commit a48ba08

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

DataFormats/Detectors/CTP/include/DataFormatsCTP/TriggerOffsetsParam.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ namespace ctp
2424
struct TriggerOffsetsParam : public o2::conf::ConfigurableParamHelper<TriggerOffsetsParam> {
2525
static constexpr int MaxNDet = 32; // take with margin to account for possible changes / upgrades
2626
int64_t LM_L0 = 15;
27-
int64_t L0_L1 = 280;
27+
int64_t L0_L1_classes = 280; // trigger class latency
2828
int64_t globalInputsShift = 0; // Global shift of inps; customOffset[CTP] is global shift of classes
2929
int64_t customOffset[MaxNDet] = {};
30+
int64_t L0_L1_inputs = 281; // trigger input latency
3031
O2ParamDef(TriggerOffsetsParam, "TriggerOffsetsParam"); // boilerplate stuff + make principal key
3132
};
3233
} // namespace ctp

Detectors/CTP/reconstruction/src/RawDataDecoder.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int RawDataDecoder::addCTPDigit(uint32_t linkCRU, uint32_t orbit, gbtword80_t& d
8989
}
9090
} else if (linkCRU == o2::ctp::GBTLinkIDClassRec) {
9191
int32_t BCShiftCorrection = -o2::ctp::TriggerOffsetsParam::Instance().customOffset[o2::detectors::DetID::CTP];
92-
int32_t offset = BCShiftCorrection + o2::ctp::TriggerOffsetsParam::Instance().LM_L0 + o2::ctp::TriggerOffsetsParam::Instance().L0_L1 - 1;
92+
int32_t offset = BCShiftCorrection + o2::ctp::TriggerOffsetsParam::Instance().LM_L0 + o2::ctp::TriggerOffsetsParam::Instance().L0_L1_classes - 1;
9393
LOG(debug) << "tcr ir ori:" << ir;
9494
if ((ir.orbit <= mTFOrbit) && ((int32_t)ir.bc < offset)) {
9595
// LOG(warning) << "Loosing tclass:" << ir;
@@ -535,7 +535,7 @@ int RawDataDecoder::shiftInputs(std::map<o2::InteractionRecord, CTPDigit>& digit
535535
int nTwoIlost = 0;
536536
std::map<o2::InteractionRecord, CTPDigit> digitsMapShifted;
537537
auto L0shift = o2::ctp::TriggerOffsetsParam::Instance().LM_L0;
538-
auto L1shift = L0shift + o2::ctp::TriggerOffsetsParam::Instance().L0_L1 + 1;
538+
auto L1shift = L0shift + o2::ctp::TriggerOffsetsParam::Instance().L0_L1_inputs;
539539
for (auto const& dig : digitsMap) {
540540
auto inpmask = dig.second.CTPInputMask;
541541
auto inpmaskLM = inpmask & LMMASKInputs;

Detectors/CTP/workflow/src/RawDecoderSpec.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ o2::framework::DataProcessorSpec o2::ctp::reco_workflow::getRawDecoderSpec(bool
209209
std::vector<o2::framework::OutputSpec> outputs;
210210
if (digits) {
211211
inputs.emplace_back("ctpconfig", "CTP", "CTPCONFIG", 0, o2::framework::Lifetime::Condition, o2::framework::ccdbParamSpec("CTP/Config/Config", 1));
212+
inputs.emplace_back("trigoffset", "CTP", "Trig_Offset", 0, o2::framework::Lifetime::Condition, o2::framework::ccdbParamSpec("CTP/Config/TriggerOffsets"));
212213
outputs.emplace_back("CTP", "DIGITS", 0, o2::framework::Lifetime::Timeframe);
213214
}
214215
if (lumi) {

0 commit comments

Comments
 (0)