ATLAS Offline Software
EventInfoCnvTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODEVENTINFOCNV_EVENTINFOCNVTOOL_H
8 #define XAODEVENTINFOCNV_EVENTINFOCNVTOOL_H
9 
10 // Gaudi/Athena include(s):
12 #include "GaudiKernel/ServiceHandle.h"
13 #include "GaudiKernel/ToolHandle.h"
14 
15 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
17 #endif // not XAOD_ANALYSIS or GENERATIONBASE
18 
19 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
20 // Beam condition include(s):
22 #endif // not XAOD_ANALYSIS or GENERATIONBASE
23 
24 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
25 // Luminosity include(s):
27 #endif // not XAOD_ANALYSIS or SIMULATIONBASE or GENERATIONBASE
28 
29 // xAOD include(s):
31 
32 namespace xAODMaker {
33 
42  class EventInfoCnvTool : public AthAlgTool,
43  public virtual IEventInfoCnvTool {
44 
45  public:
47  EventInfoCnvTool( const std::string& type, const std::string& name,
48  const IInterface* parent );
49 
51  virtual StatusCode initialize() override;
52 
54  virtual StatusCode convert( const EventInfo* aod,
55  xAOD::EventInfo* xaod,
56  bool pileUpInfo = false,
57  bool copyPileUpLinks = true,
58  const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
59 
60  private:
61 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
62  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
63  Gaudi::Property<bool> m_disableBeamSpot{ this, "DisableBeamSpot", false, "disable beamspot" };
64 
67 #endif // not XAOD_ANALYSIS or GENERATIONBASE
68 
69 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
71  { this, "LumiDataKey", "", "SG key for luminosity data" };
72 #endif // not XAOD_ANALYSIS or SIMULATIONBASE or GENERATIONBASE
73 
74  }; // class EventInfoCnvTool
75 
76 } // namespace xAODMaker
77 
78 #endif // XAODEVENTINFOCNV_EVENTINFOCNVTOOL_H
xAODMaker::EventInfoCnvTool::m_beamSpotInformationAvailable
bool m_beamSpotInformationAvailable
Internal flag for the availability of the beam spot information.
Definition: EventInfoCnvTool.h:66
xAODMaker::IEventInfoCnvTool
Interface for the tool creating xAOD::EventInfo from an AOD.
Definition: IEventInfoCnvTool.h:40
xAODMaker::EventInfoCnvTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: EventInfoCnvTool.cxx:61
xAODMaker
Definition: StoreGateSvc.h:72
xAODMaker::EventInfoCnvTool
Implementation for the IEventInfoCnvTool interface.
Definition: EventInfoCnvTool.h:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
xAODMaker::EventInfoCnvTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: EventInfoCnvTool.h:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAODMaker::EventInfoCnvTool::convert
virtual StatusCode convert(const EventInfo *aod, xAOD::EventInfo *xaod, bool pileUpInfo=false, bool copyPileUpLinks=true, const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Function that fills an existing xAOD::EventInfo object with data.
Definition: EventInfoCnvTool.cxx:103
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
xAODMaker::EventInfoCnvTool::EventInfoCnvTool
EventInfoCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: EventInfoCnvTool.cxx:52
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
SG::ReadCondHandleKey< InDet::BeamSpotData >
IEventInfoCnvTool.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAODMaker::EventInfoCnvTool::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: EventInfoCnvTool.h:71
BeamSpotData.h
xAODMaker::EventInfoCnvTool::m_disableBeamSpot
Gaudi::Property< bool > m_disableBeamSpot
Definition: EventInfoCnvTool.h:63
AthAlgTool
Definition: AthAlgTool.h:26