ATLAS Offline Software
TrigMatchTestAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGGERMATCHINGTOOL_TRIGMATCHTESTALG_H
6 #define TRIGGERMATCHINGTOOL_TRIGMATCHTESTALG_H
7 
11 #include "AsgTools/ToolHandle.h"
15 
16 #include <vector>
17 #include <string>
18 #include <map>
19 
20 namespace Trig {
22  public:
23  TrigMatchTestAlg(const std::string &name, ISvcLocator *pSvcLocator);
24  virtual ~TrigMatchTestAlg() override = default;
25 
26  virtual StatusCode initialize() override;
27  virtual StatusCode execute() override;
28  virtual StatusCode finalize() override;
29  private:
30  Gaudi::Property<std::vector<std::string>> m_chains{
31  this, "Chains", {}, "List of trigger chains to check"};
32  std::map<std::string, SG::ReadHandleKey<xAOD::IParticleContainer>> m_offlineKeys;
33  ToolHandle<Trig::TrigDecisionTool> m_tdt{"Trig::TrigDecisionTool/TrigDecisionTool"};
34  ToolHandle<Trig::IMatchingTool> m_matchingTool{
35  this, "MatchingTool", "Trig::R3MatchingTool/MatchingTool", "The trigger matching tool"};
36  std::map<std::string, std::map<std::string, std::size_t>> m_chainInfos;
37 
38  struct MatchData {
39  std::size_t nEventsPassed{0};
40  std::size_t nEventsMatched{0};
41  };
42  std::size_t m_nEvents{0};
43  std::map<std::string, MatchData> m_chainData;
44 
45  }; //> end class TrigMatchTestAlg
46 }
47 
48 #endif //> !TRIGGERMATCHINGTOOL_TRIGMATCHTESTALG_H
Trig::TrigMatchTestAlg::m_chainInfos
std::map< std::string, std::map< std::string, std::size_t > > m_chainInfos
Definition: TrigMatchTestAlg.h:36
Trig::TrigMatchTestAlg::MatchData::nEventsMatched
std::size_t nEventsMatched
Definition: TrigMatchTestAlg.h:40
PropertyWrapper.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::TrigMatchTestAlg::m_nEvents
std::size_t m_nEvents
Definition: TrigMatchTestAlg.h:42
Trig::TrigMatchTestAlg::MatchData::nEventsPassed
std::size_t nEventsPassed
Definition: TrigMatchTestAlg.h:39
Trig::TrigMatchTestAlg::m_offlineKeys
std::map< std::string, SG::ReadHandleKey< xAOD::IParticleContainer > > m_offlineKeys
Definition: TrigMatchTestAlg.h:32
Trig::TrigMatchTestAlg::m_chainData
std::map< std::string, MatchData > m_chainData
Definition: TrigMatchTestAlg.h:43
Trig::TrigMatchTestAlg::m_chains
Gaudi::Property< std::vector< std::string > > m_chains
Definition: TrigMatchTestAlg.h:30
Trig::TrigMatchTestAlg::TrigMatchTestAlg
TrigMatchTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigMatchTestAlg.cxx:17
TrigDecisionTool.h
Trig::TrigMatchTestAlg::m_tdt
ToolHandle< Trig::TrigDecisionTool > m_tdt
Definition: TrigMatchTestAlg.h:33
Trig::TrigMatchTestAlg
Definition: TrigMatchTestAlg.h:21
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IParticleContainer.h
Trig::TrigMatchTestAlg::m_matchingTool
ToolHandle< Trig::IMatchingTool > m_matchingTool
Definition: TrigMatchTestAlg.h:34
Trig::TrigMatchTestAlg::MatchData
Definition: TrigMatchTestAlg.h:38
Trig::TrigMatchTestAlg::~TrigMatchTestAlg
virtual ~TrigMatchTestAlg() override=default
Trig::TrigMatchTestAlg::initialize
virtual StatusCode initialize() override
Definition: TrigMatchTestAlg.cxx:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trig::TrigMatchTestAlg::execute
virtual StatusCode execute() override
Definition: TrigMatchTestAlg.cxx:59
IMatchingTool.h
Trig::TrigMatchTestAlg::finalize
virtual StatusCode finalize() override
Definition: TrigMatchTestAlg.cxx:116
ToolHandle.h