ATLAS Offline Software
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
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 
33 StatusCode 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 }
hist_file_dump.d
d
Definition: hist_file_dump.py:137
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
DumpDecisions.h
DumpDecisions::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: DumpDecisions.cxx:33
DumpDecisions::initialize
virtual StatusCode initialize() override
Definition: DumpDecisions.cxx:26
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
DumpDecisions::DumpDecisions
DumpDecisions(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: DumpDecisions.cxx:18
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
DumpDecisions::m_decisionKeys
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_decisionKeys
Definition: DumpDecisions.h:30
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
HLTIdentifier.h
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37