ATLAS Offline Software
HepMcFloatWriterTool.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 // 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 : virtual public IIOHepMcTool, public AthAlgTool
27 {
28 
30  // Public methods:
32  public:
33 
34  // Copy constructor:
35 
37  HepMcFloatWriterTool( const std::string& type, const std::string& name, const IInterface* parent );
38 
40  virtual ~HepMcFloatWriterTool();
41 
42  // Athena algorithm's Hooks
46 
48  // Non-const methods:
50 
53  StatusCode write( const HepMC::GenEvent* evt );
54 
56  // Protected methods:
58  protected:
59 
63 
67  void setupBackend( Gaudi::Details::PropertyBase& ioBackendURL );
68 
70  // Protected data:
72  protected:
73 
79  StringProperty m_ioBackendURL;
80 
85  StringProperty m_mcEventsName;
86 
89  std::ostream* m_ioBackend;
90 };
91 
92 #endif //> MCPARTICLETOOLS_HEPMCFLOATWRITERTOOL_H
HepMcFloatWriterTool::initialize
StatusCode initialize()
Athena Algorithm's Hooks.
Definition: HepMcFloatWriterTool.cxx:70
HepMcFloatWriterTool::HepMcFloatWriterTool
HepMcFloatWriterTool()
Default constructor:
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.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:85
IIOHepMcTool
Definition: IIOHepMcTool.h:25
HepMcFloatWriterTool::m_ioBackend
std::ostream * m_ioBackend
Abstract base class for the back-end.
Definition: HepMcFloatWriterTool.h:89
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:92
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:259
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
HepMcFloatWriterTool::~HepMcFloatWriterTool
virtual ~HepMcFloatWriterTool()
Destructor:
Definition: HepMcFloatWriterTool.cxx:58
HepMcFloatWriterTool::write
StatusCode write(const HepMC::GenEvent *evt)
Process the HepMC::GenEvent through the I/O backend.
Definition: HepMcFloatWriterTool.cxx:125
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:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
HepMcFloatWriterTool
Definition: HepMcFloatWriterTool.h:27
HepMcFloatWriterTool::execute
StatusCode execute()
Definition: HepMcFloatWriterTool.cxx:98