ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Trig::TrigEgammaMatchingTool Class Reference

#include <TrigEgammaMatchingTool.h>

Inheritance diagram for Trig::TrigEgammaMatchingTool:
Collaboration diagram for Trig::TrigEgammaMatchingTool:

Public Member Functions

 TrigEgammaMatchingTool (const std::string &name)
 
virtual ~TrigEgammaMatchingTool ()
 
virtual StatusCode initialize () override
 
virtual bool match (const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&) override
 Egamma trigger matching which returns TE. More...
 
virtual bool match (const xAOD::Egamma *, const std::string &) override
 Egamma trigger matching to HLT Electron/Photon with DeactivatedTE. More...
 
virtual bool matchHLT (const xAOD::Egamma *, const std::string &) override
 Egamma trigger matching to HLT Electron/Photon Only. More...
 
virtual const xAOD::EgammaclosestHLTObject (const xAOD::Egamma *, const std::string &) override
 Egamma trigger matching to HLT Electron/Photon only – returns nearest object. More...
 
double dR (const double, const double, const double, const double)
 
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Public Attributes

double m_dR
 
double m_dRL1
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

template<class T >
const T * getFeature (const HLT::TriggerElement *te)
 
template<class T >
bool ancestorPassed (const HLT::TriggerElement *te)
 
bool matchHLTElectron (const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
 
bool matchHLTPhoton (const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
 
bool matchHLTCalo (const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
 
bool matchL2Electron (const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
 
bool matchL2Photon (const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
 
bool matchL2Calo (const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
 
bool matchL1 (const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< Trig::TrigDecisionToolm_trigDecTool
 
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file. More...
 
bool m_useIncidents
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Callback functions helping in metadata reading/writing

void setUseIncidents (const bool flag)
 
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent. More...
 
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode beginEvent ()
 Function called when a new events is loaded. More...
 
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata. More...
 

Detailed Description

Definition at line 19 of file TrigEgammaMatchingTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigEgammaMatchingTool()

Trig::TrigEgammaMatchingTool::TrigEgammaMatchingTool ( const std::string &  name)

Definition at line 20 of file TrigEgammaMatchingTool.cxx.

22  m_trigDecTool("Trig::TrigDecisionTool/TrigDecisionTool")
23  {
24  declareProperty( "TriggerTool", m_trigDecTool);
25  declareProperty( "DeltaR", m_dR=0.07);
26  declareProperty( "L1DeltaR", m_dRL1=0.15);
27  }

◆ ~TrigEgammaMatchingTool()

Trig::TrigEgammaMatchingTool::~TrigEgammaMatchingTool ( )
virtual

Definition at line 29 of file TrigEgammaMatchingTool.cxx.

29  {
30  }

Member Function Documentation

◆ ancestorPassed()

template<class T >
bool Trig::TrigEgammaMatchingTool::ancestorPassed ( const HLT::TriggerElement te)
private

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, TauAnalysisTools::TauSelectionTool, TauAnalysisTools::DiTauSelectionTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, Trig::TrigDecisionTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, Trig::TrigConfBunchCrossingTool, xAODMaker::TriggerMenuMetaDataTool, and Trig::xAODBunchCrossingTool.

Definition at line 196 of file AsgMetadataTool.cxx.

196  {
197 
198  // Return gracefully:
199  return StatusCode::SUCCESS;
200  }

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, HFORSelectionTool, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 180 of file AsgMetadataTool.cxx.

180  {
181 
182  // Return gracefully:
183  return StatusCode::SUCCESS;
184  }

◆ closestHLTObject()

const xAOD::Egamma * Trig::TrigEgammaMatchingTool::closestHLTObject ( const xAOD::Egamma eg,
const std::string &  trigger 
)
overridevirtual

Egamma trigger matching to HLT Electron/Photon only – returns nearest object.

Calls match with a FeatureContainer for a given triggerfor HLT only Note does not use DeactiviateTEs Returns closest EF object to offline object Requires TrigPassBits only works in Athena.

Implements Trig::ITrigEgammaMatchingTool.

Definition at line 53 of file TrigEgammaMatchingTool.cxx.

53  {
54 
55  if(eg==nullptr) {
56  ATH_MSG_DEBUG("nullptr Offline object");
57  return nullptr;
58  }
60  double deltaR=0.;
61  double dRMax = 100;
62  const xAOD::Electron *elEF = 0;
63  const xAOD::Photon *phEF = 0;
64  if(eg->type()==xAOD::Type::Electron){
65  const xAOD::Electron* elOff =static_cast<const xAOD::Electron*> (eg);
66  const std::vector< Trig::Feature<xAOD::ElectronContainer> > vec = fc.get<xAOD::ElectronContainer>("egamma_Electrons");
67 
68  for(auto feat : vec){
69  const xAOD::ElectronContainer *cont = feat.cptr();
70  if(cont == nullptr) {
71  ATH_MSG_DEBUG("Electron container from TE nullptr");
72  continue;
73  }
74  for(const auto el : *cont){
75  if(el == nullptr) {
76  ATH_MSG_DEBUG("Electron from TE nullptr");
77  continue;
78  }
79  deltaR = dR(elOff->trackParticle()->eta(),elOff->trackParticle()->phi(), el->trackParticle()->eta(),el->trackParticle()->phi());
80  if (deltaR < dRMax) {
81  dRMax = deltaR;
82  elEF =el;
83  }
84  }
85  }
86  if(dRMax < m_dR) return elEF;
87  }
88  else if(eg->type()==xAOD::Type::Photon){
89  const xAOD::Photon* phOff =static_cast<const xAOD::Photon*> (eg);
90  const std::vector< Trig::Feature<xAOD::PhotonContainer> > vec = fc.get<xAOD::PhotonContainer>("egamma_Photons");
91  for(auto feat : vec){
92  const xAOD::PhotonContainer *cont = feat.cptr();
93  if(cont == nullptr) {
94  ATH_MSG_DEBUG("Photon Container from TE nullptr");
95  continue;
96  }
97  for(const auto ph : *cont){
98  if(ph == nullptr) {
99  ATH_MSG_DEBUG("Photon from TE nullptr");
100  continue;
101  }
102  deltaR = dR(phOff->caloCluster()->eta(),phOff->caloCluster()->phi(), ph->caloCluster()->eta(),ph->caloCluster()->phi());
103  if (deltaR < dRMax) {
104  dRMax = deltaR;
105  phEF =ph;
106  }
107  }
108  }
109  if(dRMax < m_dR) return phEF;
110  }
111  return 0; // No match
112  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ dR()

double Trig::TrigEgammaMatchingTool::dR ( const double  eta1,
const double  phi1,
const double  eta2,
const double  phi2 
)

Definition at line 42 of file TrigEgammaMatchingTool.cxx.

42  {
43  double deta = fabs(eta1 - eta2);
44  double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath:: \
45  Pi() - fabs(phi1 - phi2);
46  return sqrt(deta*deta + dphi*dphi);
47  }

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, HFORSelectionTool, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 188 of file AsgMetadataTool.cxx.

188  {
189 
190  // Return gracefully:
191  return StatusCode::SUCCESS;
192  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getFeature()

template<class T >
const T* Trig::TrigEgammaMatchingTool::getFeature ( const HLT::TriggerElement te)
private

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident &  inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 130 of file AsgMetadataTool.cxx.

130  {
131 
132  // Tell the user what's happening:
133  ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
134 
135  // Call the appropriate member function:
136  if( inc.type() == IncidentType::BeginInputFile ) {
137  m_beginInputFileCalled = true;
138  if( beginInputFile().isFailure() ) {
139  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
140  throw std::runtime_error( "Couldn't call beginInputFile()" );
141  }
142  } else if( inc.type() == IncidentType::EndInputFile ) {
143  if( endInputFile().isFailure() ) {
144  ATH_MSG_FATAL( "Failed to call endInputFile()" );
145  throw std::runtime_error( "Couldn't call endInputFile()" );
146  }
147  } else if( inc.type() == IncidentType::BeginEvent ) {
148  // If the tool didn't catch the begin input file incident for the
149  // first input file of the job, then call the appropriate function
150  // now.
151  if( ! m_beginInputFileCalled ) {
152  m_beginInputFileCalled = true;
153  if( beginInputFile().isFailure() ) {
154  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
155  throw std::runtime_error( "Couldn't call beginInputFile()" );
156  }
157  }
158  if( beginEvent().isFailure() ) {
159  ATH_MSG_FATAL( "Failed to call beginEvent()" );
160  throw std::runtime_error( "Couldn't call beginEvent()" );
161  }
162 
163  #ifdef XAOD_STANDALONE
164  } else if( inc.type() == IncidentType::MetaDataStop ) {
165  if( metaDataStop().isFailure() ) {
166  ATH_MSG_FATAL( "Failed to call metaDataStop()" );
167  throw std::runtime_error( "Couldn't call metaDataStop()" );
168  }
169 
170  #endif // XAOD_STANDALONE
171  } else {
172  ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
173  }
174 
175  return;
176  }

◆ initialize()

StatusCode Trig::TrigEgammaMatchingTool::initialize ( )
overridevirtual

Implements Trig::ITrigEgammaMatchingTool.

Definition at line 33 of file TrigEgammaMatchingTool.cxx.

33  {
34  // Greet the user:
35  ATH_MSG_INFO( "Initialising... " );
36 
37  ATH_CHECK(m_trigDecTool.retrieve());
38 
39  return StatusCode::SUCCESS;
40  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 88 of file AsgMetadataTool.cxx.

88  {
89 
90 #ifdef XAOD_STANDALONE
91  return &m_inputMetaStore;
92 #else // XAOD_STANDALONE
93  return m_inputMetaStore;
94 #endif // XAOD_STANDALONE
95  }

◆ match() [1/2]

bool Trig::TrigEgammaMatchingTool::match ( const xAOD::Egamma eg,
const std::string &  trigger 
)
overridevirtual

Egamma trigger matching to HLT Electron/Photon with DeactivatedTE.

Calls match with a TE, so recursive matching to L1 Check that the HLT Electron or Photon ancester passed.

Implements Trig::ITrigEgammaMatchingTool.

Definition at line 486 of file TrigEgammaMatchingTool.cxx.

486  {
487  const HLT::TriggerElement* finalFC;
488  bool passed = false;
489  if( match(eg,trigger,finalFC) ){
490  if( finalFC == nullptr) return false;
492  if ( (m_trigDecTool->ancestor<xAOD::ElectronContainer>(finalFC)).te() != nullptr){
493  if( (m_trigDecTool->ancestor<xAOD::ElectronContainer>(finalFC)).te()->getActiveState())
494  passed = true;
495  }
496  }
498  if ( (m_trigDecTool->ancestor<xAOD::PhotonContainer>(finalFC)).te() != nullptr){
499  if( (m_trigDecTool->ancestor<xAOD::PhotonContainer>(finalFC)).te()->getActiveState())
500  passed = true;
501  }
502  }
503  }
504  return passed;
505  }

◆ match() [2/2]

bool Trig::TrigEgammaMatchingTool::match ( const xAOD::Egamma eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
overridevirtual

Egamma trigger matching which returns TE.

Implements Trig::ITrigEgammaMatchingTool.

Definition at line 451 of file TrigEgammaMatchingTool.cxx.

451  {
452  // Set TE to nullptr
453  // If no match easy check
454  finalFC=nullptr;
455 
456  ATH_MSG_DEBUG("Match objec with trigger " << trigger);
458  const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
459  if( matchHLTElectron(el,trigger,finalFC) ) {
460  ATH_MSG_DEBUG("Matchched!");
461  return true;
462  }
463  }
465  const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
466  if( matchHLTPhoton(ph,trigger,finalFC) ) return true;
467  }
468  if( matchHLTCalo(eg,trigger,finalFC) ) return true;
470  const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
471  if( matchL2Electron(el,trigger,finalFC) ) return true;
472  }
474  const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
475  //if( matchL2Photon(ph,fc,trigger,finalFC) ) return true;
476  if( matchL2Photon(ph,trigger,finalFC) ) return true;
477  }
478  if( matchL2Calo(eg,trigger,finalFC) ) return true;
479  if( matchL1(eg,trigger,finalFC) ) return true;
480  ATH_MSG_DEBUG("match() failed!");
481  return false;// otherwise, someone matched!*/
482  }

◆ matchHLT()

bool Trig::TrigEgammaMatchingTool::matchHLT ( const xAOD::Egamma eg,
const std::string &  trigger 
)
overridevirtual

Egamma trigger matching to HLT Electron/Photon Only.

Calls match with a FeatureContainer for a given triggerfor HLT only Note does not use DeactiviateTEs.

Implements Trig::ITrigEgammaMatchingTool.

Definition at line 116 of file TrigEgammaMatchingTool.cxx.

116  {
117  ATH_MSG_DEBUG("matchHLT");
119  ATH_MSG_DEBUG("FeatureContainer");
120  double deltaR=0.;
122  ATH_MSG_DEBUG("Electron");
123  //const xAOD::Electron* elOff =static_cast<const xAOD::Electron*> (eg);
124 #ifdef XAOD_ANALYSIS
125  const auto vec = fc.containerFeature<xAOD::ElectronContainer>("egamma_Electrons");
126 #else
127  const auto vec = fc.get<xAOD::ElectronContainer>("egamma_Electrons");
128 #endif // XAOD_ANALYSIS
129  ATH_MSG_DEBUG("Container Feature");
130  for(const auto& feat : vec){
131  const xAOD::ElectronContainer *cont = feat.cptr();
132  if(cont == nullptr) {
133  ATH_MSG_DEBUG("Electron container from TE nullptr");
134  continue;
135  }
136  for(const auto el : *cont){
137  if(el == nullptr) {
138  ATH_MSG_WARNING("Electron from TE nullptr");
139  continue;
140  }
141  deltaR = dR(eg->eta(),eg->phi(), el->eta(),el->phi());
142  if(deltaR < m_dR){
143  return true;
144  }
145  }
146  }
147  }
149  std::string key = "egamma_Photons";
150  if(boost::contains(trigger,"icaloloose") || boost::contains(trigger,"icalovloose") || boost::contains(trigger,"icalotight")) key = "egamma_Iso_Photons";
151  //key="";
152 
153  const xAOD::Photon* phOff =static_cast<const xAOD::Photon*> (eg);
154 #ifdef XAOD_ANALYSIS
155  const auto vec = fc.containerFeature<xAOD::PhotonContainer>(key);
156 #else
157  const auto vec = fc.get<xAOD::PhotonContainer>(key);
158 #endif // XAOD_ANALYSIS
159  for(const auto& feat : vec){
160  const xAOD::PhotonContainer *cont = feat.cptr();
161  if(cont == nullptr) {
162  ATH_MSG_DEBUG("Photon Container from TE nullptr");
163  continue;
164  }
165  for(const auto ph : *cont){
166  if(ph == nullptr) {
167  ATH_MSG_DEBUG("Photon from TE nullptr");
168  continue;
169  }
170  deltaR = dR(phOff->eta(),phOff->phi(), ph->eta(),ph->phi());
171  if(deltaR < m_dR){
172  return true;
173  }
174  }
175  }
176  }
177  return false; // No match
178  }

◆ matchHLTCalo()

bool Trig::TrigEgammaMatchingTool::matchHLTCalo ( const xAOD::Egamma eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 256 of file TrigEgammaMatchingTool.cxx.

256  {
257  ATH_MSG_DEBUG("Match HLT CaloCluster");
258  finalFC=nullptr;
259  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
260 #ifdef XAOD_ANALYSIS
261  const auto vec = fc.containerFeature<xAOD::CaloClusterContainer>("TrigEFCaloCalibFex",TrigDefs::alsoDeactivateTEs);
262 #else
263  const auto vec = fc.get<xAOD::CaloClusterContainer>("TrigEFCaloCalibFex",TrigDefs::alsoDeactivateTEs);
264 #endif // XAOD_ANALYSIS
265 
266  ATH_MSG_DEBUG("EFCal FC Size " << vec.size());
267  double deltaR=0.;
268  for(auto feat : vec){
269  const xAOD::CaloClusterContainer *cont = feat.cptr();
270  ATH_MSG_DEBUG("EF Calo Size " << cont->size());
271  if(cont == nullptr) {
272  ATH_MSG_DEBUG("CaloCluster Container from TE nullptr");
273  continue;
274  }
275  for(const auto clus : *cont){
276  if(clus == nullptr) {
277  ATH_MSG_DEBUG("CaloCluster from TE nullptr");
278  continue;
279  }
280  deltaR = dR(eg->eta(),eg->phi(), clus->eta(),clus->phi());
281  if(deltaR < m_dR){
282  finalFC = (feat.te());
283  return true;
284  }
285  }
286  }
287  return false;
288 
289  }

◆ matchHLTElectron()

bool Trig::TrigEgammaMatchingTool::matchHLTElectron ( const xAOD::Electron eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 219 of file TrigEgammaMatchingTool.cxx.

219  {
220  ATH_MSG_DEBUG("Match HLT electron");
221  finalFC=nullptr;
222  // Get the container of online electrons associated to passed items
223  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
224 
225 #ifdef XAOD_ANALYSIS
226  const auto vec = fc.containerFeature<xAOD::ElectronContainer>("",TrigDefs::alsoDeactivateTEs);
227 #else
228  const auto vec = fc.get<xAOD::ElectronContainer>("",TrigDefs::alsoDeactivateTEs);
229 #endif // XAOD_ANALYSIS
230  ATH_MSG_DEBUG("EF FC Size " << vec.size());
231  double deltaR=0.;
232  for(auto feat : vec){
233  const xAOD::ElectronContainer *cont = feat.cptr();
234  if(cont == nullptr) {
235  ATH_MSG_WARNING("Electron Container from TE nullptr");
236  continue;
237  }
238  ATH_MSG_DEBUG("EF Size " << cont->size());
239  for(const auto el : *cont){
240  if(el == nullptr) {
241  ATH_MSG_DEBUG("Electron from TE nullptr");
242  continue;
243  }
244  deltaR = dR(eg->eta(),eg->phi(), el->eta(),el->phi());
245  if(deltaR < m_dR){
246  finalFC = (feat.te());
247  ATH_MSG_DEBUG("Electron finalFC matches offline");
248  return true;
249  }
250  }
251  }
252  ATH_MSG_DEBUG("Reached the end in matchHLTElectron. So didn't match!");
253  return false;
254  }

◆ matchHLTPhoton()

bool Trig::TrigEgammaMatchingTool::matchHLTPhoton ( const xAOD::Photon eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 180 of file TrigEgammaMatchingTool.cxx.

180  {
181  finalFC=nullptr;
182  ATH_MSG_DEBUG("Match HLT Photon");
183  // Get the container of online electrons associated to passed items
184  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
185  std::string key = "egamma_Photons";
186  if(boost::contains(trigger,"iloose") || boost::contains(trigger,"ivloose") || boost::contains(trigger,"itight")) key = "egamma_Iso_Photons";
187  key="";
188 
189 
190 #ifdef XAOD_ANALYSIS
191  const auto vec = fc.containerFeature<xAOD::PhotonContainer>(key,TrigDefs::alsoDeactivateTEs);
192 #else
193  const auto vec = fc.get<xAOD::PhotonContainer>(key,TrigDefs::alsoDeactivateTEs);
194 #endif // XAOD_ANALYSIS
195  ATH_MSG_DEBUG("EF FC Size " << vec.size());
196  double deltaR=0.;
197  for(auto feat : vec){
198  const xAOD::PhotonContainer *cont = feat.cptr();
199  if(cont == nullptr) {
200  ATH_MSG_DEBUG("Photon Container from TE nullptr");
201  continue;
202  }
203  ATH_MSG_DEBUG("EF Size " << cont->size());
204  for(const auto ph : *cont){
205  if(ph == nullptr) {
206  ATH_MSG_DEBUG("Photon from TE nullptr");
207  continue;
208  }
209  deltaR = dR(eg->eta(),eg->phi(), ph->eta(),ph->phi());
210  if(deltaR < m_dR){
211  finalFC = (feat.te());
212  return true;
213  }
214  }
215  }
216  return false;
217  }

◆ matchL1()

bool Trig::TrigEgammaMatchingTool::matchL1 ( const xAOD::Egamma eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 388 of file TrigEgammaMatchingTool.cxx.

388  {
389  finalFC=nullptr;
390 
391 #ifdef XAOD_ANALYSIS
392  if(m_trigDecTool->isPassed("L1_EM.*")) return true;
393 #else
394  double deltaR=0.;
395  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
396  auto initRois = fc.get<TrigRoiDescriptor>();
397  if ( initRois.size() < 1 ) return false;
398  for (auto initRoi: initRois) {
399  auto itEmTau = m_trigDecTool->ancestor<xAOD::EmTauRoI>(initRoi);
400  const xAOD::EmTauRoI *l1 = itEmTau.cptr();
401  if(l1 == nullptr) {
402  ATH_MSG_DEBUG("EMTauRoI from TE nullptr");
403  return false;
404  }
405  deltaR = dR(eg->eta(),eg->phi(), l1->eta(),l1->phi());
406 
407  if(deltaR < m_dRL1){
408  finalFC = (itEmTau.te());
409  return true;
410  }
411  }
412 #endif
413  return false; // otherwise, someone matched!*/
414 
415  }

◆ matchL2Calo()

bool Trig::TrigEgammaMatchingTool::matchL2Calo ( const xAOD::Egamma eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 359 of file TrigEgammaMatchingTool.cxx.

359  {
360  finalFC=nullptr;
361  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
362 #ifdef XAOD_ANALYSIS
363  ATH_MSG_DEBUG("No matching for TrigEMCluster in AnalysisBase");
364  return false;
365 #else
366  auto vec = fc.get<xAOD::TrigEMCluster>("",TrigDefs::alsoDeactivateTEs);
367 
368  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
369  for(auto feat : vec){
370  const xAOD::TrigEMCluster *em = feat.cptr();
371  if(em == nullptr) {
372  ATH_MSG_DEBUG("TrigEMCluster from TE nullptr");
373  continue;
374  }
375  ATH_MSG_DEBUG("TrigEMCluster << " << em->et() );
376  double deltaR=0.;
377  deltaR = dR(eg->eta(),eg->phi(), em->eta(),em->phi());
378  if(deltaR < m_dR){
379  finalFC = (feat.te());
380  return true;
381  }
382  }
383 #endif
384  return false;
385 
386  }

◆ matchL2Electron()

bool Trig::TrigEgammaMatchingTool::matchL2Electron ( const xAOD::Electron eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 325 of file TrigEgammaMatchingTool.cxx.

325  {
326  finalFC=nullptr;
327  ATH_MSG_DEBUG("Match L2 Electron");
328  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
329 #ifdef XAOD_ANALYSIS
330  auto vec = fc.containerFeature<xAOD::TrigElectronContainer>("",TrigDefs::alsoDeactivateTEs);
331 #else
332  auto vec = fc.get<xAOD::TrigElectronContainer>("",TrigDefs::alsoDeactivateTEs);
333 #endif
334  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
335  double deltaR=0.;
336  for(auto feat : vec){
337  const xAOD::TrigElectronContainer *cont = feat.cptr();
338  if(cont == nullptr) {
339  ATH_MSG_DEBUG("TrigElectron Container from TE nullptr");
340  continue;
341  }
342  ATH_MSG_DEBUG("L2 Size " << cont->size());
343  for(const auto l2 : *cont){
344  if(l2 == nullptr) {
345  ATH_MSG_DEBUG("TrigElectron from TE nullptr");
346  continue;
347  }
348  deltaR = dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
349  if(deltaR < m_dR){
350  finalFC = (feat.te());
351  return true;
352  }
353  }
354  }
355  return false;
356 
357  }

◆ matchL2Photon()

bool Trig::TrigEgammaMatchingTool::matchL2Photon ( const xAOD::Photon eg,
const std::string &  trigger,
const HLT::TriggerElement *&  finalFC 
)
private

Definition at line 291 of file TrigEgammaMatchingTool.cxx.

291  {
292  finalFC=nullptr;
293  ATH_MSG_DEBUG("Match L2 Photon");
294  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
295 
296 #ifdef XAOD_ANALYSIS
297  auto vec = fc.containerFeature<xAOD::TrigPhotonContainer>("",TrigDefs::alsoDeactivateTEs);
298 #else
299  auto vec = fc.get<xAOD::TrigPhotonContainer>("",TrigDefs::alsoDeactivateTEs);
300 #endif
301  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
302  double deltaR=0.;
303  for(auto feat : vec){
304  const xAOD::TrigPhotonContainer *cont = feat.cptr();
305  if(cont == nullptr) {
306  ATH_MSG_WARNING("TrigPhoton Container from TE nullptr");
307  continue;
308  }
309  ATH_MSG_DEBUG("L2 Size " << cont->size());
310  for(const auto l2 : *cont){
311  if(l2 == nullptr) {
312  ATH_MSG_DEBUG("TrigElectron from TE nullptr");
313  continue;
314  }
315  deltaR = dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
316  if(deltaR < m_dR){
317  finalFC = (feat.te());
318  return true;
319  }
320  }
321  }
322  return false;
323  }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in xAODMaker::FileMetaDataTool, BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 204 of file AsgMetadataTool.cxx.

204  {
205 
206  // Return gracefully:
207  return StatusCode::SUCCESS;
208  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 97 of file AsgMetadataTool.cxx.

97  {
98 
99 #ifdef XAOD_STANDALONE
100  return &m_outputMetaStore;
101 #else // XAOD_STANDALONE
102  return m_outputMetaStore;
103 #endif // XAOD_STANDALONE
104  }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool  flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133  {
135  }

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 110 of file AsgMetadataTool.cxx.

110  {
111 
112 #ifndef XAOD_STANDALONE
113  if (m_useIncidents) {
114  // Connect to the IncidentSvc:
115  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
116  ATH_CHECK( incSvc.retrieve() );
117 
118  // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
119  incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
120  }
121  // Let the base class do its thing:
122  ATH_CHECK( AlgTool::sysInitialize() );
123 
124 #endif // not XAOD_STANDALONE
125 
126  // Return gracefully:
127  return StatusCode::SUCCESS;
128  }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dR

double Trig::TrigEgammaMatchingTool::m_dR

Definition at line 44 of file TrigEgammaMatchingTool.h.

◆ m_dRL1

double Trig::TrigEgammaMatchingTool::m_dRL1

Definition at line 45 of file TrigEgammaMatchingTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_trigDecTool

ToolHandle<Trig::TrigDecisionTool> Trig::TrigEgammaMatchingTool::m_trigDecTool
private

Definition at line 48 of file TrigEgammaMatchingTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
Trig::TrigEgammaMatchingTool::matchL2Calo
bool matchL2Calo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:359
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:196
xAOD::TrigEMCluster_v1::eta
float eta() const
get Eta (calibrated)
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ParticleTest.eg
eg
Definition: ParticleTest.py:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
Trig::TrigEgammaMatchingTool::matchL1
bool matchL1(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:388
Trig::FeatureContainer::containerFeature
std::vector< Feature< CONTAINER > > containerFeature(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
Definition: FeatureContainer.h:103
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trig::TrigEgammaMatchingTool::matchHLTCalo
bool matchHLTCalo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:256
DataVector::get
const T * get(size_type n) const
Access an element, as an rvalue.
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:55
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
Trig::TrigEgammaMatchingTool::matchHLTElectron
bool matchHLTElectron(const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:219
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition: AsgMetadataTool.h:126
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:188
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AsgMetadataTool.h:121
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trig::FeatureContainer
Definition: FeatureContainer.h:54
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
xAOD::TrigEMCluster_v1::phi
float phi() const
get Phi (calibrated)
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
xAOD::EmTauRoI_v2
Class describing a LVL1 em/tau region of interest.
Definition: EmTauRoI_v2.h:35
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:13
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
Trig::TrigEgammaMatchingTool::m_trigDecTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Definition: TrigEgammaMatchingTool.h:48
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:180
master.flag
bool flag
Definition: master.py:29
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:204
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: Egamma_v1.cxx:75
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Trig::TrigEgammaMatchingTool::match
virtual bool match(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&) override
Egamma trigger matching which returns TE.
Definition: TrigEgammaMatchingTool.cxx:451
Trig::TrigEgammaMatchingTool::matchHLTPhoton
bool matchHLTPhoton(const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:180
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trig::TrigEgammaMatchingTool::matchL2Electron
bool matchL2Electron(const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:325
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AsgMetadataTool.h:119
Trig::TrigEgammaMatchingTool::matchL2Photon
bool matchL2Photon(const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:291
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trig::FeatureContainer::get
const std::vector< Trig::Feature< T > > get(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
returns flattened vector of Features of given type This method is in fact sullied by 3 arguments.
Definition: FeatureContainer.h:151
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Trig::TrigEgammaMatchingTool::m_dR
double m_dR
Definition: TrigEgammaMatchingTool.h:44
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Photon_v1
Definition: Photon_v1.h:37
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:22
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::TrigEMCluster_v1::et
float et() const
get Et (calibrated)
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
xAOD::TrigEMCluster_v1
Description of a trigger EM cluster.
Definition: TrigEMCluster_v1.h:28
Trig::TrigEgammaMatchingTool::dR
double dR(const double, const double, const double, const double)
Definition: TrigEgammaMatchingTool.cxx:42
SG::DataProxy
Definition: DataProxy.h:44
Trig::TrigEgammaMatchingTool::m_dRL1
double m_dRL1
Definition: TrigEgammaMatchingTool.h:45
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
VP1PartSpect::Pi
@ Pi
Definition: VP1PartSpectFlags.h:27
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
ServiceHandle< IIncidentSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128