ATLAS Offline Software
EventHistoVarTool.h
Go to the documentation of this file.
1 /* this file is -*- C++ -*-
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETMONITORING_EventVARTOOL_H
6 #define JETMONITORING_EventVARTOOL_H
7 
9 #include "xAODJet/JetContainer.h"
10 #include "GaudiKernel/IAlgTool.h"
13 
14 
15 static const InterfaceID IID_IEventHistoVarTool("IEventHistoVarTool", 1 , 0);
16 
23 
24 class IEventHistoVarTool : virtual public IAlgTool
25 {
26 public:
27 
28  // Retrieve interface ID
29  static const InterfaceID& interfaceID() { return IID_IEventHistoVarTool; }
30 
31  virtual ~IEventHistoVarTool(){}
32 
34  virtual float value(const xAOD::JetContainer&) const = 0;
36  virtual std::string varName() const =0;
37 };
38 
39 
40 class EventHistoVarTool : public AthAlgTool, virtual public IEventHistoVarTool {
41 public:
42  EventHistoVarTool(const std::string & type, const std::string & name, const IInterface* parent);
43  virtual ~EventHistoVarTool(){}
44 
45  virtual StatusCode initialize() ;
46 
47  virtual float value(const xAOD::JetContainer&) const;
48  virtual std::string varName() const {return m_varName;}
49 
50 
51 private:
52 
53  Gaudi::Property<std::string> m_varName {this,"VarName", ""};
54  Gaudi::Property<float> m_defaultValue = {this,"Default", -1.};
55  SG::ReadDecorHandleKey<xAOD::EventInfo> m_attName {this, "Attribute", "", "Attribute name retrieved from event info container ('<event info name>.<decoration>'). If no container name prefixed, then EventInfo.<Attribute> is used."};
56 
57 };
58 
59 
60 #endif
EventHistoVarTool::~EventHistoVarTool
virtual ~EventHistoVarTool()
Definition: EventHistoVarTool.h:43
EventHistoVarTool::m_attName
SG::ReadDecorHandleKey< xAOD::EventInfo > m_attName
Definition: EventHistoVarTool.h:55
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
EventHistoVarTool::m_varName
Gaudi::Property< std::string > m_varName
Definition: EventHistoVarTool.h:53
EventHistoVarTool::value
virtual float value(const xAOD::JetContainer &) const
the value of the variable for a given Event
Definition: EventHistoVarTool.cxx:31
IEventHistoVarTool::interfaceID
static const InterfaceID & interfaceID()
Definition: EventHistoVarTool.h:29
IEventHistoVarTool
Definition: EventHistoVarTool.h:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EventHistoVarTool::EventHistoVarTool
EventHistoVarTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: EventHistoVarTool.cxx:9
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
EventHistoVarTool::varName
virtual std::string varName() const
a compact description of the variable.
Definition: EventHistoVarTool.h:48
EventHistoVarTool
Definition: EventHistoVarTool.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IEventHistoVarTool::~IEventHistoVarTool
virtual ~IEventHistoVarTool()
Definition: EventHistoVarTool.h:31
EventInfo.h
EventHistoVarTool::m_defaultValue
Gaudi::Property< float > m_defaultValue
Definition: EventHistoVarTool.h:54
JetContainer.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
IEventHistoVarTool::value
virtual float value(const xAOD::JetContainer &) const =0
the value of the variable for a given Event
IEventHistoVarTool::varName
virtual std::string varName() const =0
a compact description of the variable.
EventHistoVarTool::initialize
virtual StatusCode initialize()
Definition: EventHistoVarTool.cxx:15