@@ -159,6 +159,7 @@ class BcSelectionModule
159159 int mTimeFrameStartBorderMargin = 300 ; // default value
160160 int mTimeFrameEndBorderMargin = 4000 ; // default value
161161 std::string strLPMProductionTag = " " ; // MC production tag to be retrieved from AO2D metadata
162+ std::string strPassName = " " ; // RecoPassName (for data) or AnchorPassName (for MC) from metadata
162163 bool isMC = false ;
163164
164165 TriggerAliases* aliases = nullptr ;
@@ -195,8 +196,9 @@ class BcSelectionModule
195196 return ;
196197 }
197198 }
198- strLPMProductionTag = metadataInfo.get (" LPMProductionTag" ); // to extract info from ccdb by the tag
199199 isMC = metadataInfo.isMC ();
200+ strLPMProductionTag = metadataInfo.get (" LPMProductionTag" ); // to extract info from ccdb by the tag
201+ strPassName = metadataInfo.get (isMC ? " AnchorPassName" : " RecoPassName" );
200202
201203 // add counter
202204 histos.add (" bcselection/hCounterInvalidBCTimestamp" , " " , o2::framework::kTH1D , {{1 , 0 ., 1 .}});
@@ -279,8 +281,15 @@ class BcSelectionModule
279281 // QC info
280282 std::map<std::string, std::string> metadata;
281283 metadata[" run" ] = Form (" %d" , run);
284+ metadata[" passName" ] = strPassName;
285+ LOGP (info, " accessing pass-specific rct object for run={} and passName={} from ccdb" , run, strPassName);
282286 ccdb->setFatalWhenNull (0 );
283287 mapRCT = ccdb->template getSpecific <std::map<uint64_t , uint32_t >>(" RCT/Flags/RunFlags" , ts, metadata);
288+ if (mapRCT == nullptr ) {
289+ LOGP (info, " pass-specific rct object missing... trying the latest" );
290+ metadata.erase (" passName" );
291+ mapRCT = ccdb->template getSpecific <std::map<uint64_t , uint32_t >>(" RCT/Flags/RunFlags" , ts, metadata);
292+ }
284293 ccdb->setFatalWhenNull (1 );
285294 if (mapRCT == nullptr ) {
286295 LOGP (info, " rct object missing... inserting dummy rct flags" );
0 commit comments