ATLAS Offline Software
Loading...
Searching...
No Matches
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
10#include "GaudiKernel/IAlgTool.h"
13
14
15static const InterfaceID IID_IEventHistoVarTool("IEventHistoVarTool", 1 , 0);
16
23
24class IEventHistoVarTool : virtual public IAlgTool
25{
26public:
27
28 // Retrieve interface ID
29 static const InterfaceID& interfaceID() { return IID_IEventHistoVarTool; }
30
32
34 virtual float value(const xAOD::JetContainer&) const = 0;
36 virtual std::string varName() const =0;
37};
38
39
40class EventHistoVarTool : public AthAlgTool, virtual public IEventHistoVarTool {
41public:
42 EventHistoVarTool(const std::string & type, const std::string & name, const IInterface* parent);
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
51private:
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
static const InterfaceID IID_IEventHistoVarTool("IEventHistoVarTool", 1, 0)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
EventHistoVarTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::string varName() const
a compact description of the variable.
virtual float value(const xAOD::JetContainer &) const
the value of the variable for a given Event
SG::ReadDecorHandleKey< xAOD::EventInfo > m_attName
Gaudi::Property< std::string > m_varName
Gaudi::Property< float > m_defaultValue
virtual StatusCode initialize()
virtual std::string varName() const =0
a compact description of the variable.
static const InterfaceID & interfaceID()
virtual float value(const xAOD::JetContainer &) const =0
the value of the variable for a given Event
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
JetContainer_v1 JetContainer
Definition of the current "jet container version".