ATLAS Offline Software
TrigMatchTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
8 #ifndef TRIGOBJECTMATCHING_TRIGMATCHTOOL_H
9 #define TRIGOBJECTMATCHING_TRIGMATCHTOOL_H
10 
11 // Gaudi/Athena include(s):
13 #include "GaudiKernel/ToolHandle.h"
14 #include "GaudiKernel/IIncidentListener.h"
15 
16 // Trigger include(s):
18 
19 // Local include(s):
20 #include "TrigMatchToolCore.h"
21 
22 class Incident;
23 
24 static const InterfaceID IID_TrigMatchTool("TrigMatchTool", 1, 0);
25 
31 class TrigMatchTool : public AthAlgTool,
32  public TrigMatchToolCore,
33  virtual public IIncidentListener {
34 
35 public:
36  TrigMatchTool( const std::string& type,
37  const std::string& name,
38  const IInterface* parent );
39 
40  static const InterfaceID& interfaceID() {
41  return IID_TrigMatchTool;
42  }
43 
44  virtual StatusCode initialize() override;
45 
46 private:
47  // for printing warnings
48  virtual void warning( const std::string& w ) const override {
49  ATH_MSG_ERROR( w );
50  return;
51  }
52 
53  // status functions for determining what information we have
54  // access to
55  virtual bool changedDecisionAware() const override { return true; };
56 
57  // handle incidents (end event, begin event, etc.)
58  virtual void handle( const Incident& inc ) override;
59 
60  // grab the configured chain names via the trig decision tool
61  virtual std::vector<std::string> getConfiguredChainNames() const override;
62 
63  // grab the feature containers from the navigation
64  // via the trig decision tool
66  getFeatureContainer( const std::string &chainName, const int condition ) const override {
67  return m_trigDecisionTool->features( chainName, condition );
68  }
69 
70  // use the tdt to get access the the name of the chain that
71  // seeded the current chain
72  virtual
73  std::string lowerChainName( const std::string& chainName ) const override;
74 
75  // note that we access the trig decision tool normally
76  // in athena
77  ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool;
78 
79 }; // end TrigMatchTool declaration
80 
81 #endif // TRIGOBJECTMATCHING_TRIGMATCHTOOL_H
TrigMatchTool::initialize
virtual StatusCode initialize() override
Definition: TrigMatchTool.cxx:38
TrigMatchTool::lowerChainName
virtual std::string lowerChainName(const std::string &chainName) const override
Definition: TrigMatchTool.cxx:70
TrigDecisionTool.h
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
TrigMatchTool::interfaceID
static const InterfaceID & interfaceID()
Definition: TrigMatchTool.h:40
Trig::FeatureContainer
Definition: FeatureContainer.h:54
TrigMatchTool::handle
virtual void handle(const Incident &inc) override
Definition: TrigMatchTool.cxx:81
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigMatchTool
The TrigMatchTool is an athena tool used to match reconstructed objects to trigger objects and chains...
Definition: TrigMatchTool.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigMatchToolCore
The TrigMatchToolCore defines the core functionality of the TrigMatchTool and is used for matching tr...
Definition: TrigMatchToolCore.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigMatchTool::TrigMatchTool
TrigMatchTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigMatchTool.cxx:21
TrigMatchTool::getConfiguredChainNames
virtual std::vector< std::string > getConfiguredChainNames() const override
Definition: TrigMatchTool.cxx:62
TrigMatchTool::getFeatureContainer
virtual Trig::FeatureContainer getFeatureContainer(const std::string &chainName, const int condition) const override
Definition: TrigMatchTool.h:66
TrigMatchTool::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition: TrigMatchTool.h:77
TrigMatchTool::changedDecisionAware
virtual bool changedDecisionAware() const override
Definition: TrigMatchTool.h:55
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
TrigMatchToolCore.h
AthAlgTool
Definition: AthAlgTool.h:26
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
TrigMatchTool::warning
virtual void warning(const std::string &w) const override
Definition: TrigMatchTool.h:48