|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "Gaudi/Property.h"
24 ISvcLocator* pSvcLocator ) :
45 ATH_MSG_DEBUG(
"Default I/O collections mapping nth input -> nth output" );
60 std::set<int> inIndices;
63 inIndices.insert(
i.begin(),
i.end() );
70 if ( iset.count(
el ) != 0 ) {
72 return StatusCode::FAILURE;
111 return StatusCode::SUCCESS;
124 std::vector<std::string> inputNames( {
"exec",
"anyvalid"} );
125 std::vector<bool> inputStats({
true,
false});
128 bool validInputs =
false;
130 inputNames.push_back( inputHandle.name() );
131 if( inputHandle.isValid() ) {
133 inputStats.push_back(
true );
135 inputStats.push_back(
false );
138 inputStats[1] = validInputs;
139 auto inputName = Monitored::Collection<std::vector<std::string>>(
"name", inputNames );
140 auto inputStat = Monitored::Collection<std::vector<bool>>(
"stat", inputStats );
145 ATH_MSG_DEBUG (
"No valid inputs found, filter failed. Return...." );
146 return StatusCode::SUCCESS;
151 size_t passCounter = 0;
153 for (
size_t outputIndex = 0; outputIndex <
m_ioMapping.size(); ++outputIndex ) {
154 bool anyPresent =
false;
155 for (
unsigned inputIndex :
m_ioMapping[outputIndex] ) {
167 for (
auto inputIndex :
m_ioMapping[outputIndex] ) {
190 return StatusCode::SUCCESS;
195 const EventContext& ctx )
const {
196 size_t passCounter = 0;
200 <<
". Applying filter of size " << topass.size());
214 ATH_MSG_DEBUG(
"Input satisfied at least one filtering chain. Chain(s) passing:");
221 ATH_MSG_DEBUG(
"No Input decisions requested by filtering chains");
ToolHandle< GenericMonitoringTool > m_monTool
Group
Properties of a chain group.
xAOD::TrigCompositeContainer DecisionContainer
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_outputKeys
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
DecisionIDContainer passedDecisionIDs(const Decision *d, const T &required)
return DecisionIDs in Decision object that match the required ones
bool msgLvl(const MSG::Level lvl) const
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_inputKeys
void renounceArray(SG::VarHandleKeyArray &handlesArray)
remove all handles from I/O resolution
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
virtual bool filterPassed(const EventContext &ctx) const
An algorithm that can be simultaneously executed in multiple threads.
virtual std::vector< Gaudi::DataHandle * > inputHandles() const override
Return this algorithm's input handles.
Gaudi::Property< std::vector< std::string > > m_chainsProperty
virtual StatusCode initialize() override final
Setup input and output handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
size_t copyPassing(const TrigCompositeUtils::DecisionContainer &input, TrigCompositeUtils::DecisionContainer &output, const std::set< HLT::Identifier > &topass, const EventContext &ctx) const
Applies generic filter to input container, keeping only the decision objects with at least one affirm...
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode execute(const EventContext &ctx) const override final
Apply this filter in-between Steps of trigger execution.
static Timeout & instance()
Get reference to Timeout singleton.
Header file to be included by clients of the Monitored infrastructure.
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Gaudi::Property< std::vector< std::vector< unsigned > > > m_ioMappingProperty
It can be used to define a custom routing from input to output collections Example: [[0,...
xAOD::TrigComposite Decision
std::vector< std::vector< unsigned > > m_ioMapping
@ TIMEOUT
Timeout during event processing.
const std::string & filterNodeName()
std::set< DecisionID > DecisionIDContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
std::set< HLT::Identifier > m_chains
Gaudi::Property< std::vector< std::vector< std::string > > > m_chainsPerInputProperty
std::vector< std::set< HLT::Identifier > > m_chainsPerInput
RoRSeqFilter(const std::string &name, ISvcLocator *pSvcLocator)
virtual void setFilterPassed(bool state, const EventContext &ctx) const