HepMC3 event record library
Public Member Functions | Data Fields | Protected Member Functions | Private Attributes
ReaderHEPEVT Class Reference

Detailed Description

GenEvent I/O parsing and serialization for HEPEVT files.

Examples:
convert_example.cc.

Definition at line 32 of file ReaderHEPEVT.h.

#include <ReaderHEPEVT.h>

+ Inheritance diagram for ReaderHEPEVT:
+ Collaboration diagram for ReaderHEPEVT:

Public Member Functions

 ReaderHEPEVT (const std::string &filename)
 Default constructor. More...
 
 ReaderHEPEVT (std::istream &)
 The ctor to read from stdin. More...
 
virtual bool read_hepevt_event_header ()
 Find and read event header line from file. More...
 
virtual bool read_hepevt_particle (int i, bool iflong=true)
 read particle from file More...
 
bool read_event (GenEvent &evt, bool iflong)
 Read event from file. More...
 
bool read_event (GenEvent &evt)
 Read event from file. More...
 
void close ()
 Close file stream. More...
 
bool failed ()
 Get stream error state. More...
 
void set_vertices_positions_present (bool iflong)
 set flag if vertex positions are available More...
 
bool get_vertices_positions_present () const
 get flag if vertex positions are available More...
 
shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 

Data Fields

char * hepevtbuffer
 Pointer to HEPEVT Fortran common block/C struct. More...
 

Protected Member Functions

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

Private Attributes

std::ifstream m_file
 Input file. More...
 
std::istream * m_stream
 For ctor when reading from stdin. More...
 
bool m_isstream
 toggles usage of m_file or m_stream More...
 
bool m_vertices_positions_present
 true if vertex positions are available More...
 

Constructor & Destructor Documentation

ReaderHEPEVT ( const std::string &  filename)
ReaderHEPEVT ( std::istream &  stream)

Member Function Documentation

void close ( )
virtual

Close file stream.

Implements Reader.

Definition at line 153 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::hepevtbuffer, and ReaderHEPEVT::m_file.

bool failed ( )
virtual

Get stream error state.

Implements Reader.

Definition at line 160 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_file, ReaderHEPEVT::m_isstream, and ReaderHEPEVT::m_stream.

bool get_vertices_positions_present ( ) const

get flag if vertex positions are available

Definition at line 166 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_vertices_positions_present.

bool read_event ( GenEvent evt,
bool  iflong 
)
bool read_event ( GenEvent evt)
virtual

Read event from file.

Parameters
[out]evtContains parsed even

Implements Reader.

Definition at line 146 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_file, ReaderHEPEVT::m_isstream, ReaderHEPEVT::m_vertices_positions_present, and ReaderHEPEVT::read_event().

bool read_hepevt_event_header ( )
virtual
bool read_hepevt_particle ( int  i,
bool  iflong = true 
)
virtual
shared_ptr<GenRunInfo> run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Examples:
convert_example.cc, and LHEF_example_cat.cc.

Definition at line 39 of file Reader.h.

References Reader::m_run_info.

void set_run_info ( shared_ptr< GenRunInfo run)
inlineprotectedinherited

Set the global GenRunInfo object.

Definition at line 46 of file Reader.h.

References Reader::m_run_info.

void set_vertices_positions_present ( bool  iflong)

set flag if vertex positions are available

Definition at line 165 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_vertices_positions_present.

Field Documentation

char* hepevtbuffer

Pointer to HEPEVT Fortran common block/C struct.

Definition at line 85 of file ReaderHEPEVT.h.

std::ifstream m_file
private

Input file.

Definition at line 87 of file ReaderHEPEVT.h.

bool m_isstream
private

toggles usage of m_file or m_stream

Definition at line 89 of file ReaderHEPEVT.h.

std::istream* m_stream
private

For ctor when reading from stdin.

Definition at line 88 of file ReaderHEPEVT.h.

bool m_vertices_positions_present
private

true if vertex positions are available

Definition at line 90 of file ReaderHEPEVT.h.


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