ATLAS Offline Software
HepMcReaderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // HepMcReaderTool.h
6 // Header file for class HepMcReaderTool
7 // Author: S.Binet<binet@cern.ch>
9 #ifndef MCPARTICLETOOLS_HEPMCREADERTOOL_H
10 #define MCPARTICLETOOLS_HEPMCREADERTOOL_H 1
11 
12 // STL includes
13 #include <string>
14 
15 // FrameWork includes
16 #include "GaudiKernel/ServiceHandle.h"
18 
19 // McParticleKernel includes
20 #include "TruthIO/IIOHepMcTool.h"
21 
22 // Forward declaration
25 #ifdef HEPMC3
26 #include "HepMC3/Reader.h"
27 #include "HepMC3/ReaderAsciiHepMC2.h"
28 #endif
29 
30 class HepMcReaderTool : virtual public IIOHepMcTool, public AthAlgTool
31 {
32 
34  // Public methods:
36  public:
37 
38  // Copy constructor:
39 
41  HepMcReaderTool( const std::string& type, const std::string& name, const IInterface* parent );
42 
44  virtual ~HepMcReaderTool();
45 
46  // Athena algorithm's Hooks
50 
52  // Non-const methods:
54 
57  StatusCode read( HepMC::GenEvent* evt );
58 
60  // Protected methods:
62  protected:
63 
67 
71  void setupFrontend( Gaudi::Details::PropertyBase& ioFrontendURL );
72 
74  // Protected data:
76  protected:
77 
83  StringProperty m_ioFrontendURL;
84 
87  StringProperty m_mcEventsOutputName;
88 
91 #ifdef HEPMC3
93 #else
94  HepMC::IO_BaseClass* m_ioFrontend;
95 #endif
96 
97 };
98 #endif //> MCPARTICLETOOLS_HEPMCREADERTOOL_H
HepMcReaderTool::execute
StatusCode execute()
Definition: HepMcReaderTool.cxx:92
HepMcReaderTool::m_ioFrontend
HepMC::IO_BaseClass * m_ioFrontend
Abstract base class for the back-end.
Definition: HepMcReaderTool.h:94
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
IIOHepMcTool
Definition: IIOHepMcTool.h:25
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
GenEvent_fwd.h
LHEF::Reader
Pythia8::Reader Reader
Definition: Prophecy4fMerger.cxx:11
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HepMcReaderTool
Definition: HepMcReaderTool.h:31
HepMcReaderTool::read
StatusCode read(HepMC::GenEvent *evt)
Process the HepMC::GenEvent through the I/O frontend.
Definition: HepMcReaderTool.cxx:115
HepMcReaderTool::initialize
StatusCode initialize()
Athena Algorithm's Hooks.
Definition: HepMcReaderTool.cxx:69
HepMcReaderTool::m_mcEventsOutputName
StringProperty m_mcEventsOutputName
Location of the McEventCollection to be read out.
Definition: HepMcReaderTool.h:87
IIOHepMcTool.h
HepMcReaderTool::HepMcReaderTool
HepMcReaderTool()
Default constructor:
IO_BaseClass.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
HepMcReaderTool::m_ioFrontendURL
StringProperty m_ioFrontendURL
URL of the I/O front-end (only "ASCII" for now...) glued with the name of the input file name.
Definition: HepMcReaderTool.h:83
HepMcReaderTool::finalize
StatusCode finalize()
Definition: HepMcReaderTool.cxx:86
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
HepMcReaderTool::setupFrontend
void setupFrontend(Gaudi::Details::PropertyBase &ioFrontendURL)
Method to configure the front-end to read out the HepMC::GenEvent.
Definition: HepMcReaderTool.cxx:126
HepMcReaderTool::~HepMcReaderTool
virtual ~HepMcReaderTool()
Destructor:
Definition: HepMcReaderTool.cxx:59