ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
TruthIO
src
HepMcWriterTool.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
// HepMcWriterTool.h
6
// Header file for class HepMcWriterTool
7
// Author: S.Binet<binet@cern.ch>
9
#ifndef MCPARTICLETOOLS_HEPMCWRITERTOOL_H
10
#define MCPARTICLETOOLS_HEPMCWRITERTOOL_H
11
12
// STL includes
13
#include <string>
14
15
// FrameWork includes
16
#include "GaudiKernel/ServiceHandle.h"
17
#include "
AthenaBaseComps/AthAlgTool.h
"
18
19
// McParticleKernel includes
20
#include "
TruthIO/IIOHepMcTool.h
"
21
22
// Forward declaration
23
#include "
AtlasHepMC/GenEvent_fwd.h
"
24
#include "
AtlasHepMC/IO_GenEvent.h
"
25
class
HepMcWriterTool
:
public
extends<AthAlgTool, IIOHepMcTool>
26
{
27
28
public
:
29
31
HepMcWriterTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent );
32
34
virtual
~HepMcWriterTool
();
35
36
// Athena algorithm's Hooks
37
StatusCode
initialize
();
38
StatusCode
execute
();
39
StatusCode
finalize
();
40
43
StatusCode
write
(
const
HepMC::GenEvent
* evt );
44
45
protected
:
46
49
HepMcWriterTool
();
50
54
void
setupBackend
( Gaudi::Details::PropertyBase& ioBackendURL );
55
56
protected
:
57
63
StringProperty
m_ioBackendURL
;
64
69
StringProperty
m_mcEventsName
;
70
73
std::shared_ptr<HepMC3::Writer>
m_ioBackend
{
nullptr
};
74
75
};
76
#endif
//> MCPARTICLETOOLS_HEPMCWRITERTOOL_H
AthAlgTool.h
GenEvent_fwd.h
IIOHepMcTool.h
IO_GenEvent.h
HepMcWriterTool::finalize
StatusCode finalize()
Definition
HepMcWriterTool.cxx:67
HepMcWriterTool::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
HepMcWriterTool.h:63
HepMcWriterTool::HepMcWriterTool
HepMcWriterTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
HepMcWriterTool.cxx:27
HepMcWriterTool::m_ioBackend
std::shared_ptr< HepMC3::Writer > m_ioBackend
Abstract base class for the back-end.
Definition
HepMcWriterTool.h:73
HepMcWriterTool::write
StatusCode write(const HepMC::GenEvent *evt)
Process the HepMC::GenEvent through the I/O backend.
Definition
HepMcWriterTool.cxx:100
HepMcWriterTool::HepMcWriterTool
HepMcWriterTool()
Default constructor:
HepMcWriterTool::execute
StatusCode execute()
Definition
HepMcWriterTool.cxx:73
HepMcWriterTool::~HepMcWriterTool
virtual ~HepMcWriterTool()
Destructor:
Definition
HepMcWriterTool.cxx:42
HepMcWriterTool::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
HepMcWriterTool.h:69
HepMcWriterTool::setupBackend
void setupBackend(Gaudi::Details::PropertyBase &ioBackendURL)
Method to configure the back-end to write out the HepMC::GenEvent.
Definition
HepMcWriterTool.cxx:106
HepMcWriterTool::initialize
StatusCode initialize()
Athena Algorithm's Hooks.
Definition
HepMcWriterTool.cxx:49
HepMC::GenEvent
HepMC3::GenEvent GenEvent
Definition
GenEvent.h:39
type
Generated on
for ATLAS Offline Software by
1.17.0