 |
ATLAS Offline Software
|
#include <HepMcTupleWriterTool.h>
Definition at line 30 of file HepMcTupleWriterTool.h.
◆ HepMcTupleWriterTool() [1/2]
HepMcTupleWriterTool::HepMcTupleWriterTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor with parameters:
Constructors.
Definition at line 28 of file HepMcTupleWriterTool.cxx.
39 declareProperty(
"Output",
41 "Name of the output file which will contain the HepMC tuple"
45 declareProperty(
"OutputStream",
47 "Name of the stream which will contain the HepMC tuple"
50 declareProperty(
"McEvents",
52 "Input location of the McEventCollection to write out" );
◆ ~HepMcTupleWriterTool()
HepMcTupleWriterTool::~HepMcTupleWriterTool |
( |
| ) |
|
|
virtual |
◆ HepMcTupleWriterTool() [2/2]
HepMcTupleWriterTool::HepMcTupleWriterTool |
( |
| ) |
|
|
protected |
◆ bookTuple()
void HepMcTupleWriterTool::bookTuple |
( |
| ) |
|
|
protected |
book the tuple
Definition at line 178 of file HepMcTupleWriterTool.cxx.
181 TTree*
t =
new TTree(
"hepmc",
"HepMC validation tuple");
183 ATH_MSG_ERROR(
"Could not register HepMC validation tuple !!");
184 delete t;
t =
nullptr;
185 throw GaudiException(
"Could not register HepMC validation tuple !!",
name(), StatusCode::FAILURE );
◆ execute()
StatusCode HepMcTupleWriterTool::execute |
( |
| ) |
|
Definition at line 95 of file HepMcTupleWriterTool.cxx.
101 return StatusCode::FAILURE;
104 if ( mcEvts->
empty() ) {
106 return StatusCode::FAILURE;
109 const HepMC::GenEvent *
evt = mcEvts->
front();
111 ATH_MSG_ERROR(
"Retrieved NULL pointer to HepMC::GenEvent !!");
112 return StatusCode::FAILURE;
◆ finalize()
StatusCode HepMcTupleWriterTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode HepMcTupleWriterTool::initialize |
( |
| ) |
|
Athena Algorithm's Hooks.
Definition at line 64 of file HepMcTupleWriterTool.cxx.
69 if ( !evtStore().
retrieve().isSuccess() ) {
71 return StatusCode::FAILURE;
77 return StatusCode::FAILURE;
86 return StatusCode::SUCCESS;
◆ setupBackend()
void HepMcTupleWriterTool::setupBackend |
( |
Gaudi::Details::PropertyBase & |
outputFileName | ) |
|
|
protected |
Method to configure the back-end to write out the HepMC::GenEvent
.
Non-const methods:
Definition at line 151 of file HepMcTupleWriterTool.cxx.
156 throw GaudiException(
"Could not retrieve THistSvc",
name(), StatusCode::FAILURE );
161 const std::string
propName =
"Output";
165 updatedProp.push_back
173 throw GaudiException(
"Could not configure THistSvc output file !!",
name(), StatusCode::FAILURE );
◆ write()
StatusCode HepMcTupleWriterTool::write |
( |
const HepMC::GenEvent * |
evt | ) |
|
Process the HepMC::GenEvent
through the I/O backend.
Non-const methods:
Definition at line 122 of file HepMcTupleWriterTool.cxx.
126 for (
const auto&
p: *
evt)
130 const HepMC::FourVector
mom =
p->momentum();
144 return StatusCode::SUCCESS;
◆ m_mcEventsName
StringProperty HepMcTupleWriterTool::m_mcEventsName |
|
protected |
◆ m_outputFileName
StringProperty HepMcTupleWriterTool::m_outputFileName |
|
protected |
◆ m_outputStreamName
StringProperty HepMcTupleWriterTool::m_outputStreamName |
|
protected |
◆ m_particles
◆ m_tuple
TTree* HepMcTupleWriterTool::m_tuple |
|
protected |
◆ m_tupleSvc
◆ s_nMax
const int HepMcTupleWriterTool::s_nMax = 2000 |
|
staticprotected |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::array< double, s_nMax > m_ene
std::array< int, s_nMax > m_pdgId
std::array< double, s_nMax > m_py
const T * front() const
Access the first element in the collection as an rvalue.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
std::array< double, s_nMax > m_m
#define ATH_MSG_WARNING(x)
std::array< double, s_nMax > m_pz
std::array< int, s_nMax > m_barcode
std::array< double, s_nMax > m_px
bool empty() const noexcept
Returns true if the collection is empty.
std::array< int, s_nMax > m_status