Skip to content

Commit cc39dd7

Browse files
committed
STFDecoder fetches ITS/MFT Alpide params from CCDB
1 parent 0322127 commit cc39dd7

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,14 @@ template <class Mapping>
244244
void STFDecoder<Mapping>::updateTimeDependentParams(ProcessingContext& pc)
245245
{
246246
// we call these methods just to trigger finaliseCCDB callback
247-
pc.inputs().get<o2::itsmft::NoiseMap*>("noise");
248-
if (mDoClusters) {
249-
pc.inputs().get<o2::itsmft::TopologyDictionary*>("cldict");
247+
static bool initOnceDone = false;
248+
if (!initOnceDone) { // this params need to be queried only once
249+
initOnceDone = true;
250+
pc.inputs().get<o2::itsmft::NoiseMap*>("noise");
251+
if (mDoClusters) {
252+
pc.inputs().get<o2::itsmft::TopologyDictionary*>("cldict");
253+
pc.inputs().get<o2::itsmft::DPLAlpideParam<Mapping::getDetID()>*>("alppar");
254+
}
250255
}
251256
}
252257

@@ -259,12 +264,19 @@ void STFDecoder<Mapping>::finaliseCCDB(o2::framework::ConcreteDataMatcher& match
259264
if (mApplyNoiseMap) {
260265
AlpideCoder::setNoisyPixels((const NoiseMap*)obj);
261266
}
267+
return;
262268
}
263269
if (matcher == ConcreteDataMatcher(Mapping::getOrigin(), "CLUSDICT", 0)) {
264270
LOG(info) << Mapping::getName() << " cluster dictionary updated" << (!mUseClusterDictionary ? " but its using is disabled" : "");
265271
if (mUseClusterDictionary) {
266272
mClusterer->setDictionary((const TopologyDictionary*)obj);
267273
}
274+
return;
275+
}
276+
// Note: strictly speaking, for Configurable params we don't need finaliseCCDB check, the singletons are updated at the CCDB fetcher level
277+
if (matcher == ConcreteDataMatcher(Mapping::getOrigin(), "ALPIDEPARAM", 0)) {
278+
LOG(info) << "Alpide param updated";
279+
return;
268280
}
269281
}
270282

@@ -302,6 +314,7 @@ DataProcessorSpec getSTFDecoderSpec(const STFDecoderInp& inp)
302314
if (inp.doClusters) {
303315
inputs.emplace_back("cldict", inp.origin, "CLUSDICT", 0, Lifetime::Condition,
304316
o2::framework::ccdbParamSpec(fmt::format("{}/Calib/ClusterDictionary", inp.origin.as<std::string>())));
317+
inputs.emplace_back("alppar", inp.origin, "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec(fmt::format("{}/Config/AlpideParam", inp.origin.as<std::string>())));
305318
}
306319

307320
return DataProcessorSpec{

0 commit comments

Comments
 (0)