ATLAS Offline Software
HepMcFloatWriterTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // HepMcFloatWriterTool.h
6 // Header file for class HepMcFloatWriterTool
7 // Author: S.Binet<binet@cern.ch>
9 #ifndef MCPARTICLETOOLS_HEPMCFLOATWRITERTOOL_H
10 #define MCPARTICLETOOLS_HEPMCFLOATWRITERTOOL_H
11 
12 // STL includes
13 #include <string>
14 #include <iosfwd>
15 
16 // FrameWork includes
17 #include "GaudiKernel/ServiceHandle.h"
19 
20 // McParticleKernel includes
21 #include "TruthIO/IIOHepMcTool.h"
22 
23 // Forward declaration
25 
26 class HepMcFloatWriterTool : public extends<AthAlgTool, IIOHepMcTool>
27 {
28 
30  // Public methods:
32  public:
33 
35  HepMcFloatWriterTool( const std::string& type, const std::string& name, const IInterface* parent );
36 
38  virtual ~HepMcFloatWriterTool();
39 
40  // Athena algorithm's Hooks
44 
46  // Non-const methods:
48 
51  StatusCode write( const HepMC::GenEvent* evt );
52 
54  // Protected methods:
56  protected:
57 
61 
65  void setupBackend( Gaudi::Details::PropertyBase& ioBackendURL );
66 
68  // Protected data:
70  protected:
71 
77  StringProperty m_ioBackendURL;
78 
83  StringProperty m_mcEventsName;
84 
87  std::ostream* m_ioBackend;
88 };
89 
90 #endif //> MCPARTICLETOOLS_HEPMCFLOATWRITERTOOL_H
HepMcFloatWriterTool::initialize
StatusCode initialize()
Athena Algorithm's Hooks.
Definition: HepMcFloatWriterTool.cxx:68
HepMcFloatWriterTool::HepMcFloatWriterTool
HepMcFloatWriterTool()
Default constructor:
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
HepMcFloatWriterTool::m_mcEventsName
StringProperty m_mcEventsName
Location of the McEventCollection to be written out If there is more than 1 HepMC::GenEvent in the Mc...
Definition: HepMcFloatWriterTool.h:83
HepMcFloatWriterTool::m_ioBackend
std::ostream * m_ioBackend
Abstract base class for the back-end.
Definition: HepMcFloatWriterTool.h:87
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
HepMcFloatWriterTool::finalize
StatusCode finalize()
Definition: HepMcFloatWriterTool.cxx:90
GenEvent_fwd.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IIOHepMcTool.h
HepMcFloatWriterTool::setupBackend
void setupBackend(Gaudi::Details::PropertyBase &ioBackendURL)
Method to configure the back-end to write out the HepMC::GenEvent.
Definition: HepMcFloatWriterTool.cxx:257
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
HepMcFloatWriterTool::~HepMcFloatWriterTool
virtual ~HepMcFloatWriterTool()
Destructor:
Definition: HepMcFloatWriterTool.cxx:56
HepMcFloatWriterTool::write
StatusCode write(const HepMC::GenEvent *evt)
Process the HepMC::GenEvent through the I/O backend.
Definition: HepMcFloatWriterTool.cxx:123
HepMcFloatWriterTool::m_ioBackendURL
StringProperty m_ioBackendURL
URL of the I/O back-end (only "ASCII" for now...) glued with the name of the output file name.
Definition: HepMcFloatWriterTool.h:77
HepMcFloatWriterTool
Definition: HepMcFloatWriterTool.h:27
HepMcFloatWriterTool::execute
StatusCode execute()
Definition: HepMcFloatWriterTool.cxx:96