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

Detailed Description

GenEvent I/O parsing and serialization for LHEF files.

Definition at line 34 of file ReaderLHEF.h.

#include <ReaderLHEF.h>

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

Public Member Functions

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

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

Protected Attributes

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

Private Member Functions

void init ()
 Init helper.
 

Private Attributes

std::shared_ptr< std::istream > m_shared_stream
 Holds temporary stream.
 
std::shared_ptr< LHEF::Readerm_reader
 The actual reader.
 
std::shared_ptr< HEPRUPAttributem_hepr
 Holder of attributes.
 
int m_neve
 Event counter.
 
bool m_failed
 State of reader.
 
std::deque< GenEventm_storage
 storage used for subevents.
 
std::shared_ptr< GenRunInfom_run_info
 The global GenRunInfo object.
 

Constructor & Destructor Documentation

◆ ReaderLHEF() [1/3]

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() [2/3]

ReaderLHEF ( const std::string &  filename)

Constructor.

Definition at line 14 of file ReaderLHEF.cc.

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

◆ ReaderLHEF() [3/3]

ReaderLHEF ( std::shared_ptr< std::istream >  s_stream)

The ctor to read from temp stream.

Definition at line 25 of file ReaderLHEF.cc.

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

◆ ~ReaderLHEF()

~ReaderLHEF ( )

Destructor.

Definition at line 102 of file ReaderLHEF.cc.

References ReaderLHEF::close().

Member Function Documentation

◆ close()

void close ( )
overridevirtual

Close.

Close file stream.

Implements Reader.

Definition at line 190 of file ReaderLHEF.cc.

◆ failed()

bool failed ( )
overridevirtual

State.

Return status of the stream.

Implements Reader.

Definition at line 187 of file ReaderLHEF.cc.

References ReaderLHEF::m_failed.

◆ get_options()

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

Set options.

Definition at line 58 of file Reader.h.

References Reader::m_options.

◆ init()

void init ( )
private

◆ read_event()

bool read_event ( GenEvent ev)
overridevirtual

◆ run_info()

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.

◆ set_options()

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.

◆ set_run_info()

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.

◆ skip()

bool skip ( const int  n)
overridevirtual

skip events

Reimplemented from Reader.

Definition at line 32 of file ReaderLHEF.cc.

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

Field Documentation

◆ m_failed

bool m_failed
private

State of reader.

Definition at line 59 of file ReaderLHEF.h.

◆ m_hepr

std::shared_ptr<HEPRUPAttribute> m_hepr
private

Holder of attributes.

Definition at line 57 of file ReaderLHEF.h.

◆ m_neve

int m_neve
private

Event counter.

Definition at line 58 of file ReaderLHEF.h.

◆ m_options

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

options

Definition at line 68 of file Reader.h.

◆ m_reader

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

The actual reader.

Definition at line 56 of file ReaderLHEF.h.

◆ m_run_info

std::shared_ptr<GenRunInfo> m_run_info
privateinherited

The global GenRunInfo object.

Definition at line 71 of file Reader.h.

◆ m_shared_stream

std::shared_ptr<std::istream> m_shared_stream
private

Holds temporary stream.

Definition at line 55 of file ReaderLHEF.h.

◆ m_storage

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: