HepMC3 event record library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
ReaderPlugin Class Reference

GenEvent I/O parsing and serialization using external plugin. More...

#include <ReaderPlugin.h>

+ Inheritance diagram for ReaderPlugin:
+ Collaboration diagram for ReaderPlugin:

Public Member Functions

 ReaderPlugin (std::istream &stream, const std::string &libname, const std::string &newreader)
 Constructor to read from stream. More...
 
 ReaderPlugin (const std::string &filename, const std::string &libname, const std::string &newreader)
 Constructor to read from file. More...
 
bool read_event (GenEvent &ev) override
 Reading event. More...
 
void close () override
 Close. More...
 
bool failed () override
 State. More...
 
 ~ReaderPlugin () override
 Destructor. More...
 
virtual bool skip (const int)
 skip or fast forward reading of some events More...
 
std::shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 
void set_options (const std::map< std::string, std::string > &options)
 Set options. More...
 
std::map< std::string,
std::string > 
get_options () const
 Set options. More...
 

Protected Member Functions

void set_run_info (std::shared_ptr< GenRunInfo > run)
 Set the global GenRunInfo object. More...
 

Protected Attributes

std::map< std::string,
std::string > 
m_options
 options More...
 

Private Attributes

Readerm_reader
 The actual reader. More...
 
void * dll_handle
 library handler More...
 

Detailed Description

GenEvent I/O parsing and serialization using external plugin.

Definition at line 23 of file ReaderPlugin.h.

Constructor & Destructor Documentation

ReaderPlugin ( std::istream &  stream,
const std::string &  libname,
const std::string &  newreader 
)

Constructor to read from stream.

Definition at line 28 of file ReaderPlugin.cc.

References ReaderPlugin::dll_handle, and ReaderPlugin::m_reader.

ReaderPlugin ( const std::string &  filename,
const std::string &  libname,
const std::string &  newreader 
)

Constructor to read from file.

Constructor.

Definition at line 52 of file ReaderPlugin.cc.

References ReaderPlugin::dll_handle, and ReaderPlugin::m_reader.

~ReaderPlugin ( )
override

Destructor.

Definition at line 74 of file ReaderPlugin.cc.

References Reader::close(), ReaderPlugin::dll_handle, and ReaderPlugin::m_reader.

Member Function Documentation

void close ( )
inlineoverridevirtual

Close.

Implements Reader.

Definition at line 33 of file ReaderPlugin.h.

References Reader::close(), and ReaderPlugin::m_reader.

bool failed ( )
inlineoverridevirtual

State.

Implements Reader.

Definition at line 35 of file ReaderPlugin.h.

References Reader::failed(), and ReaderPlugin::m_reader.

std::map<std::string, std::string> get_options ( ) const
inlineinherited

Set options.

Definition at line 58 of file Reader.h.

References Reader::m_options.

bool read_event ( GenEvent ev)
inlineoverridevirtual

Reading event.

Implements Reader.

Definition at line 31 of file ReaderPlugin.h.

References ReaderPlugin::m_reader, and Reader::read_event().

std::shared_ptr<GenRunInfo> run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Examples:
LHEF_example_cat.cc.

Definition at line 44 of file Reader.h.

References Reader::m_run_info.

void set_options ( const std::map< std::string, std::string > &  options)
inlineinherited

Set options.

Definition at line 53 of file Reader.h.

References Reader::m_options.

void set_run_info ( std::shared_ptr< GenRunInfo run)
inlineprotectedinherited

Set the global GenRunInfo object.

Definition at line 64 of file Reader.h.

References Reader::m_run_info.

virtual bool skip ( const int  )
inlinevirtualinherited

skip or fast forward reading of some events

Reimplemented in ReaderHEPEVT, ReaderRootTree, ReaderAsciiHepMC2, ReaderLHEF, ReaderRoot, and ReaderAscii.

Definition at line 34 of file Reader.h.

References Reader::failed().

Field Documentation

void* dll_handle
private

library handler

Definition at line 40 of file ReaderPlugin.h.

std::map<std::string, std::string> m_options
protectedinherited

options

Definition at line 68 of file Reader.h.

Reader* m_reader
private

The actual reader.

Definition at line 39 of file ReaderPlugin.h.


The documentation for this class was generated from the following files: