Skip to content
Snippets Groups Projects
Commit 3e381a52 authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Merge branch 'rm-follow-4119' into 'master'

Fix SourceID-based selection for empty input (follow !4119)

See merge request !4141
parents 4b5598fd 13cbd6ff
No related branches found
No related tags found
1 merge request!4141Fix SourceID-based selection for empty input (follow !4119)
Pipeline #5693822 passed
......@@ -18,8 +18,8 @@
namespace LHCb {
class SelectViewForHltSourceID : public Algorithm::Transformer<RawBank::View( RawBank::View const& )> {
Gaudi::Property<LHCb::Hlt::DAQ::SourceID> m_source_id{this, "SourceID", LHCb::Hlt::DAQ::SourceID::Hlt1};
mutable Gaudi::Accumulators::Counter<> m_selected_banks{this, "Number of selected banks"};
Gaudi::Property<LHCb::Hlt::DAQ::SourceID> m_source_id{this, "SourceID", LHCb::Hlt::DAQ::SourceID::Hlt1};
mutable Gaudi::Accumulators::BinomialCounter<> m_selected_banks{this, "Number of selected banks"};
public:
SelectViewForHltSourceID( const std::string& name, ISvcLocator* locator )
......@@ -36,7 +36,7 @@ namespace LHCb {
}
}
m_selected_banks += count;
auto selection = input_view.subspan( offset, count );
auto selection = ( offset >= 0 ) ? input_view.subspan( offset, count ) : RawBank::View{};
return selection;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment