HepMC3 event record library
|
GenEvent I/O parsing and serialization using external plugin.
Definition at line 23 of file WriterPlugin.h.
#include <WriterPlugin.h>
Public Member Functions | |
WriterPlugin (std::ostream &stream, const std::string &libname, const std::string &newwriter, std::shared_ptr< HepMC3::GenRunInfo > run=std::shared_ptr< GenRunInfo >()) | |
Constructor to read from stream. | |
WriterPlugin (const std::string &filename, const std::string &libname, const std::string &newwriter, std::shared_ptr< HepMC3::GenRunInfo > run=std::shared_ptr< GenRunInfo >()) | |
Constructor to read from file. | |
void | write_event (const GenEvent &ev) override |
Reading event. | |
void | close () override |
Close. | |
bool | failed () override |
State. | |
~WriterPlugin () override | |
Destructor. | |
void | set_run_info (std::shared_ptr< GenRunInfo > run) |
Set the global GenRunInfo object. | |
std::shared_ptr< GenRunInfo > | run_info () const |
Get the global GenRunInfo object. | |
void | set_options (const std::map< std::string, std::string > &options) |
Set options. | |
std::map< std::string, std::string > | get_options () const |
Set options. | |
Protected Attributes | |
std::map< std::string, std::string > | m_options |
options | |
Private Attributes | |
Writer * | m_writer |
The actual writer. | |
void * | dll_handle |
library handler | |
std::shared_ptr< GenRunInfo > | m_run_info |
The global GenRunInfo object. | |
WriterPlugin | ( | std::ostream & | stream, |
const std::string & | libname, | ||
const std::string & | newwriter, | ||
std::shared_ptr< HepMC3::GenRunInfo > | run = std::shared_ptr<GenRunInfo>() |
||
) |
Constructor to read from stream.
Definition at line 29 of file WriterPlugin.cc.
References WriterPlugin::dll_handle, and WriterPlugin::m_writer.
WriterPlugin | ( | const std::string & | filename, |
const std::string & | libname, | ||
const std::string & | newwriter, | ||
std::shared_ptr< HepMC3::GenRunInfo > | run = std::shared_ptr<GenRunInfo>() |
||
) |
Constructor to read from file.
Definition at line 51 of file WriterPlugin.cc.
References WriterPlugin::dll_handle, and WriterPlugin::m_writer.
|
override |
Destructor.
Definition at line 73 of file WriterPlugin.cc.
References Writer::close(), WriterPlugin::dll_handle, and WriterPlugin::m_writer.
|
inlineoverridevirtual |
Close.
Implements Writer.
Definition at line 36 of file WriterPlugin.h.
References Writer::close(), and WriterPlugin::m_writer.
|
inlineoverridevirtual |
State.
Implements Writer.
Definition at line 38 of file WriterPlugin.h.
References Writer::failed(), and WriterPlugin::m_writer.
|
inlineinherited |
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 47 of file Writer.h.
References Writer::m_run_info.
|
inlineinherited |
|
inlineinherited |
Set the global GenRunInfo object.
Definition at line 42 of file Writer.h.
References Writer::m_run_info.
|
inlineoverridevirtual |
Reading event.
Implements Writer.
Definition at line 34 of file WriterPlugin.h.
References WriterPlugin::m_writer, and Writer::write_event().
|
private |
library handler
Definition at line 43 of file WriterPlugin.h.
|
protectedinherited |
|
privateinherited |
The global GenRunInfo object.
|
private |
The actual writer.
Definition at line 42 of file WriterPlugin.h.