@@ -37,7 +37,7 @@ using namespace o2::framework;
3737namespace o2d = o2::dataformats;
3838
3939GRPGeomRequest::GRPGeomRequest (bool orbitResetTime, bool GRPECS, bool GRPLHCIF, bool GRPMagField, bool askMatLUT, GeomRequest geom, std::vector<o2::framework::InputSpec>& inputs, bool askOnce, bool needPropD, std::string detMaskString)
40- : askGRPECS(GRPECS), askGRPLHCIF(GRPLHCIF), askGRPMagField(GRPMagField), askMatLUT(askMatLUT), askTime(orbitResetTime), askOnceAllButField(askOnce), needPropagatorD(needPropD)
40+ : askGRPECS(GRPECS), askGRPLHCIF(GRPLHCIF), askGRPMagField(GRPMagField), askMatLUT(askMatLUT), askTime(orbitResetTime), askOnceAllButField(askOnce), needPropagatorD(needPropD), algDetMask(DetID::getMask(detMaskString))
4141{
4242 if (geom == Aligned) {
4343 askGeomAlign = true ;
@@ -48,7 +48,6 @@ GRPGeomRequest::GRPGeomRequest(bool orbitResetTime, bool GRPECS, bool GRPLHCIF,
4848 }
4949 if (geom == Alignments) {
5050 askAlignments = true ;
51- o2::detectors::DetID::mask_t algDetMask = DetID::getMask (detMaskString);
5251 for (auto id = DetID::First; id <= DetID::Last; id++) {
5352 if (algDetMask[id]) {
5453 std::string binding = fmt::format (" align{}" , DetID::getName (id));
@@ -164,6 +163,9 @@ bool GRPGeomHelper::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj)
164163 constexpr o2::header::DataDescription algDesc{" ALIGNMENT" };
165164 if (mRequest ->askAlignments && matcher.description == algDesc) {
166165 for (auto id = DetID::First; id <= DetID::Last; id++) {
166+ if (!mRequest ->algDetMask [id]) {
167+ continue ;
168+ }
167169 if (matcher.origin == DetID::getDataOrigin (id)) {
168170 LOG (info) << DetID::getName (id) << " alignment updated" ;
169171 mAlignments [id] = (std::vector<o2::detectors::AlignParam>*)obj;
@@ -233,9 +235,12 @@ void GRPGeomHelper::checkUpdates(ProcessingContext& pc)
233235 }
234236 if (mRequest ->askAlignments ) {
235237 for (auto id = DetID::First; id <= DetID::Last; id++) {
238+ if (!mRequest ->algDetMask [id]) {
239+ continue ;
240+ }
236241 std::string binding = fmt::format (" align{}" , DetID::getName (id));
237242 if (pc.inputs ().getPos (binding.c_str ()) < 0 ) {
238- return ;
243+ LOGP (fatal, " Alignment for detector {} was requested but no binding was found! " , id) ;
239244 } else {
240245 pc.inputs ().get <std::vector<o2::detectors::AlignParam>*>(binding);
241246 }
0 commit comments