![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
12 std::string printVector(
const std::vector<std::string>&
vec) {
13 std::ostringstream
ss;
16 for (
const std::string& elem :
vec) {
34 return StatusCode::FAILURE;
39 std::ostringstream
ss{
"This filter will pass when chain "};
42 ss <<
". No stream filtering will be applied.";
44 ss <<
" and the event is accepted to at least one of the following streams: ";
50 return StatusCode::SUCCESS;
60 const auto it = std::find_first_of(streamsSummary->cbegin(), streamsSummary->cend(),
62 if (
it == streamsSummary->cend()) {
64 ATH_MSG_DEBUG(
"Setting filter status to failed because none of the listed streams passed: "
66 return StatusCode::SUCCESS;
69 <<
". The first stream found to pass is " << *
it
70 <<
". Continue to checking the chain prescale status.");
75 const auto it = std::find_if(hltSeedingSummary->begin(), hltSeedingSummary->end(),
76 [](
const Decision*
d){return d->name()==
"unprescaled";});
77 if (
it==hltSeedingSummary->end()) {
79 return StatusCode::FAILURE;
85 ATH_MSG_DEBUG(
"Setting filter status to " << (filterStatus ?
"passed" :
"failed") <<
" because the chain "
86 <<
m_chainId.
name() <<
" is " << (filterStatus ?
"unprescaled" :
"prescaled") <<
" in this event");
88 return StatusCode::SUCCESS;
EndOfEventFilterAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< std::vector< std::string > > m_streamsSummaryKey
xAOD::TrigCompositeContainer DecisionContainer
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
TrigCompositeUtils::DecisionID numeric() const
numeric ID
bool msgLvl(const MSG::Level lvl) const
virtual StatusCode initialize() override
std::vector< size_t > vec
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< std::string > m_chainName
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
xAOD::TrigComposite Decision
virtual StatusCode execute(const EventContext &context) const override
std::set< DecisionID > DecisionIDContainer
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
std::string name() const
reports human redable name if it is enabled or, empty string
Handle class for reading from StoreGate.
Gaudi::Property< std::vector< std::string > > m_streamFilter
HLT::Identifier m_chainId
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_hltSeedingSummaryKey
virtual void setFilterPassed(bool state, const EventContext &ctx) const