#include <HepMcWriterTool.h>
Definition at line 29 of file HepMcWriterTool.h.
◆ HepMcWriterTool() [1/2]
HepMcWriterTool::HepMcWriterTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor with parameters:
Constructors.
Definition at line 27 of file HepMcWriterTool.cxx.
35 declareProperty(
"Output",
37 "Name of the back-end we'll use to write out the HepMC::GenEvent."
38 "\nEx: ascii:hepmc.genevent.txt" );
42 declareProperty(
"McEvents",
44 "Input location of the McEventCollection to write out" );
◆ ~HepMcWriterTool()
HepMcWriterTool::~HepMcWriterTool |
( |
| ) |
|
|
virtual |
◆ HepMcWriterTool() [2/2]
HepMcWriterTool::HepMcWriterTool |
( |
| ) |
|
|
protected |
◆ execute()
StatusCode HepMcWriterTool::execute |
( |
| ) |
|
Definition at line 85 of file HepMcWriterTool.cxx.
91 return StatusCode::FAILURE;
94 if ( mcEvts->
empty() ) {
96 return StatusCode::FAILURE;
99 const HepMC::GenEvent *
evt = mcEvts->
front();
101 ATH_MSG_ERROR(
"Retrieved NULL pointer to HepMC::GenEvent !!");
102 return StatusCode::FAILURE;
◆ finalize()
StatusCode HepMcWriterTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode HepMcWriterTool::initialize |
( |
| ) |
|
Athena Algorithm's Hooks.
Definition at line 61 of file HepMcWriterTool.cxx.
66 if ( !evtStore().
retrieve().isSuccess() ) {
68 return StatusCode::FAILURE;
76 return StatusCode::SUCCESS;
◆ setupBackend()
void HepMcWriterTool::setupBackend |
( |
Gaudi::Details::PropertyBase & |
ioBackendURL | ) |
|
|
protected |
Method to configure the back-end to write out the HepMC::GenEvent
.
Definition at line 122 of file HepMcWriterTool.cxx.
125 std::string protocol =
"ascii";
126 std::string
fileName =
"hepmc.genevent.txt";
137 std::string::size_type protocolPos =
url.find(s_protocolSep);
139 if ( std::string::npos != protocolPos ) {
140 protocol =
url.substr( 0, protocolPos );
141 fileName =
url.substr( protocolPos+1, std::string::npos );
148 std::transform( protocol.begin(), protocol.end(), protocol.begin(), [](
unsigned char c){ return std::tolower(c); } );
150 if (
"ascii" == protocol ) {
154 ATH_MSG_WARNING(
"UNKNOWN protocol [" << protocol <<
"] !!" <<
endmsg <<
"Will use [ascii] instead...");
159 if (
"ascii" == protocol ) {
163 ATH_MSG_WARNING(
"UNKNOWN protocol [" << protocol <<
"] !!" <<
endmsg <<
"Will use [ascii] instead...");
◆ write()
StatusCode HepMcWriterTool::write |
( |
const HepMC::GenEvent * |
evt | ) |
|
Process the HepMC::GenEvent
through the I/O backend.
Non-const methods:
Definition at line 112 of file HepMcWriterTool.cxx.
119 return StatusCode::SUCCESS;
◆ m_ioBackend
HepMC::IO_BaseClass* HepMcWriterTool::m_ioBackend |
|
protected |
◆ m_ioBackendURL
StringProperty HepMcWriterTool::m_ioBackendURL |
|
protected |
URL of the I/O back-end (only "ASCII" for now...) glued with the name of the output file name.
Ex: "ascii:/home/foo/hepmc.txt" If no protocol separator ':' is found, fallback is "ASCII"
Definition at line 82 of file HepMcWriterTool.h.
◆ m_mcEventsName
StringProperty HepMcWriterTool::m_mcEventsName |
|
protected |
The documentation for this class was generated from the following files: