@@ -71,17 +71,28 @@ class FilteringDeviceDPL
7171
7272 void finaliseCCDB (of::ConcreteDataMatcher matcher, void * obj)
7373 {
74+ bool rebuildMasks = false ;
7475 if (matcher == of::ConcreteDataMatcher (header::gDataOriginMID , " BAD_CHANNELS" , 0 )) {
7576 LOG (info) << " Update MID_BAD_CHANNELS" ;
76- auto * badChannels = static_cast <std::vector<ColumnData>*>(obj);
77- mMasksHandler .switchOffChannels (*badChannels);
77+ mBadChannels = *static_cast <std::vector<ColumnData>*>(obj);
78+ rebuildMasks = true ;
79+ } else if (matcher == of::ConcreteDataMatcher (header::gDataOriginMID , " REJECTLIST" , 0 )) {
80+ LOG (info) << " Update MID_REJECTLIST" ;
81+ mRejectList = *static_cast <std::vector<ColumnData>*>(obj);
82+ rebuildMasks = true ;
83+ }
84+ if (rebuildMasks) {
85+ mMasksHandler .clear ();
86+ mMasksHandler .switchOffChannels (mBadChannels );
87+ mMasksHandler .switchOffChannels (mRejectList );
7888 }
7989 }
8090
8191 void run (of::ProcessingContext& pc)
8292 {
8393 // Triggers finalizeCCDB
8494 pc.inputs ().get <std::vector<ColumnData>*>(" mid_bad_channels" );
95+ pc.inputs ().get <std::vector<ColumnData>*>(" mid_rejectlist" );
8596
8697 auto data = specs::getData (pc, " mid_filter_in" , EventType::Standard);
8798 auto inROFRecords = specs::getRofs (pc, " mid_filter_in" , EventType::Standard);
@@ -125,13 +136,16 @@ class FilteringDeviceDPL
125136 bool mUseMC {false };
126137 std::vector<of::Output> mOutputs ;
127138 std::function<void (size_t , size_t , const o2::dataformats::MCTruthContainer<MCLabel>*, o2::dataformats::MCTruthContainer<MCLabel>&, const ColumnData& col)> mFillLabels {[](size_t , size_t , const o2::dataformats::MCTruthContainer<MCLabel>*, o2::dataformats::MCTruthContainer<MCLabel>&, const ColumnData&) {}};
139+ std::vector<ColumnData> mBadChannels {};
140+ std::vector<ColumnData> mRejectList {};
128141};
129142
130143of::DataProcessorSpec getFilteringSpec (bool useMC, std::string_view inDesc, std::string_view outDesc)
131144{
132145
133146 auto inputSpecs = specs::buildInputSpecs (" mid_filter_in" , inDesc, useMC);
134147 inputSpecs.emplace_back (" mid_bad_channels" , header::gDataOriginMID , " BAD_CHANNELS" , 0 , of::Lifetime::Condition, of::ccdbParamSpec (" MID/Calib/BadChannels" ));
148+ inputSpecs.emplace_back (" mid_rejectlist" , header::gDataOriginMID , " REJECTLIST" , 0 , of::Lifetime::Condition, of::ccdbParamSpec (" MID/Calib/RejectList" ));
135149
136150 auto outputSpecs = specs::buildStandardOutputSpecs (" mid_filter_out" , outDesc, useMC);
137151
0 commit comments