ATLAS Offline Software
Loading...
Searching...
No Matches
DumpDecisions.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4// DecisionHandling includes
5
7
8// FrameWork includes
9#include "Gaudi/Property.h"
10#include "DumpDecisions.h"
11
13// Public methods:
15
16// Constructors
18DumpDecisions::DumpDecisions(const std::string &name,
19 ISvcLocator *pSvcLocator)
20 : AthReentrantAlgorithm(name, pSvcLocator)
21{
22}
23
24// Athena Algorithm's Hooks
27{
28 ATH_MSG_DEBUG("Initializing " << name() << "...");
29 CHECK(m_decisionKeys.initialize());
30 return StatusCode::SUCCESS;
31}
32
33StatusCode DumpDecisions::execute(const EventContext &ctx) const
34{
35 using namespace TrigCompositeUtils;
36
37 for (const auto& key : m_decisionKeys)
38 {
39 auto decisionInput = SG::makeHandle(key, ctx);
40 if (not decisionInput.isValid())
41 {
42 ATH_MSG_DEBUG("No decisions key " << key.key() << " skipping");
43 continue;
44 }
45 ATH_MSG_DEBUG("Retrieved decision with the key " << key.key());
46 for (auto d : *decisionInput)
47 {
50 ATH_MSG_DEBUG("Decision object with " << ids.size() << " decisions");
51 for (auto id : ids)
52 {
53 ATH_MSG_VERBOSE("Passing decision " << HLT::Identifier(id));
54 }
55 }
56 }
57 return StatusCode::SUCCESS;
58}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
std::set< DecisionID > DecisionIDContainer
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode initialize() override
DumpDecisions(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_decisionKeys
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.