Skip to content

Commit d43b073

Browse files
committed
Create the inputs filter on the fly if it was not set externally
1 parent a8b684c commit d43b073

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ RawPixelDecoder<Mapping>::RawPixelDecoder()
4040
mTimerDecode.Stop();
4141
mTimerFetchData.Stop();
4242
mSelfName = o2::utils::Str::concat_string(Mapping::getName(), "Decoder");
43-
DPLRawParser<>::setCheckIncompleteHBF(false); // Disable incomplete HBF checking, see ErrPacketCounterJump check in GBTLink.cxx
44-
mInputFilter = {InputSpec{"filter", ConcreteDataTypeMatcher{Mapping::getOrigin(), o2::header::gDataDescriptionRawData}}}; // by default take all raw data
43+
DPLRawParser<>::setCheckIncompleteHBF(false); // Disable incomplete HBF checking, see ErrPacketCounterJump check in GBTLink.cxx
4544
}
4645

4746
///______________________________________________________________
@@ -235,6 +234,11 @@ void RawPixelDecoder<Mapping>::setupLinks(InputRecord& inputs)
235234
auto nLinks = mGBTLinks.size();
236235
auto origin = (mUserDataOrigin == o2::header::gDataOriginInvalid) ? mMAP.getOrigin() : mUserDataOrigin;
237236
auto datadesc = (mUserDataDescription == o2::header::gDataDescriptionInvalid) ? o2::header::gDataDescriptionRawData : mUserDataDescription;
237+
238+
if (mInputFilter.empty()) { // if no filter set externally, create a global one from imposed or default origin / description
239+
mInputFilter.emplace_back("filter", ConcreteDataTypeMatcher{origin, datadesc});
240+
}
241+
238242
// if we see requested data type input with 0xDEADBEEF subspec and 0 payload this means that the "delayed message"
239243
// mechanism created it in absence of real data from upstream. Processor should send empty output to not block the workflow
240244
{

0 commit comments

Comments
 (0)