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

GenEvent I/O parsing and serialization for LHEF files. More...

#include <ReaderLHEF.h>

+ Inheritance diagram for ReaderLHEF:
+ Collaboration diagram for ReaderLHEF:

Public Member Functions

 ReaderLHEF (std::istream &)
 The ctor to read from stream. More...
 
 ReaderLHEF (const std::string &filename)
 Constructor. More...
 
bool skip (const int) override
 skip events More...
 
bool read_event (GenEvent &ev) override
 Reading event. More...
 
void close () override
 Close. More...
 
bool failed () override
 State. More...
 
 ~ReaderLHEF ()
 Destructor. 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 Member Functions

void init ()
 Init helper. More...
 

Private Attributes

std::shared_ptr< LHEF::Readerm_reader
 The actual reader. More...
 
std::shared_ptr< HEPRUPAttributem_hepr
 Holder of attributes. More...
 
int m_neve
 Event counter. More...
 
bool m_failed
 State of reader. More...
 
std::deque< GenEventm_storage
 storage used for subevents. More...
 

Detailed Description

GenEvent I/O parsing and serialization for LHEF files.

Definition at line 35 of file ReaderLHEF.h.

Constructor & Destructor Documentation

ReaderLHEF ( std::istream &  stream)

The ctor to read from stream.

Definition at line 19 of file ReaderLHEF.cc.

References ReaderLHEF::init(), and ReaderLHEF::m_reader.

ReaderLHEF ( const std::string &  filename)

Constructor.

Definition at line 14 of file ReaderLHEF.cc.

References ReaderLHEF::init(), and ReaderLHEF::m_reader.

~ReaderLHEF ( )

Destructor.

Definition at line 95 of file ReaderLHEF.cc.

References ReaderLHEF::close().

Member Function Documentation

void close ( )
overridevirtual

Close.

Close file stream.

Implements Reader.

Definition at line 183 of file ReaderLHEF.cc.

bool failed ( )
overridevirtual

State.

Return status of the stream.

Implements Reader.

Definition at line 180 of file ReaderLHEF.cc.

References ReaderLHEF::m_failed.

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

Set options.

Definition at line 58 of file Reader.h.

References Reader::m_options.

void init ( )
private
bool read_event ( GenEvent ev)
overridevirtual
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.

bool skip ( const int  n)
overridevirtual

skip events

Reimplemented from Reader.

Definition at line 25 of file ReaderLHEF.cc.

References GenEvent::clear(), ReaderLHEF::failed(), and ReaderLHEF::read_event().

Field Documentation

bool m_failed
private

State of reader.

Definition at line 59 of file ReaderLHEF.h.

std::shared_ptr<HEPRUPAttribute> m_hepr
private

Holder of attributes.

Definition at line 57 of file ReaderLHEF.h.

int m_neve
private

Event counter.

Definition at line 58 of file ReaderLHEF.h.

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

options

Definition at line 68 of file Reader.h.

std::shared_ptr<LHEF::Reader> m_reader
private

The actual reader.

Definition at line 56 of file ReaderLHEF.h.

std::deque<GenEvent> m_storage
private

storage used for subevents.

Definition at line 60 of file ReaderLHEF.h.


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