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...
 
shared_ptr< GenRunInfom_run_info
 The global GenRunInfo object. More...
 

Constructor & Destructor Documentation

◆ ReaderHEPEVT() [1/2]

ReaderHEPEVT ( const std::string &  filename)

◆ ReaderHEPEVT() [2/2]

ReaderHEPEVT ( std::istream &  stream)

Member Function Documentation

◆ close()

void close ( )
virtual

Close file stream.

Implements Reader.

Definition at line 153 of file ReaderHEPEVT.cc.

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

◆ failed()

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.

◆ get_vertices_positions_present()

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.

◆ read_event() [1/2]

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().

◆ read_event() [2/2]

bool read_event ( GenEvent evt,
bool  iflong 
)

◆ read_hepevt_event_header()

bool read_hepevt_event_header ( )
virtual

◆ read_hepevt_particle()

bool read_hepevt_particle ( int  i,
bool  iflong = true 
)
virtual

◆ run_info()

shared_ptr< GenRunInfo > run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Examples
LHEF_example_cat.cc, and convert_example.cc.

Definition at line 39 of file Reader.h.

References Reader::m_run_info.

◆ set_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.

◆ set_vertices_positions_present()

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

◆ hepevtbuffer

char* hepevtbuffer

Pointer to HEPEVT Fortran common block/C struct.

Definition at line 85 of file ReaderHEPEVT.h.

◆ m_file

std::ifstream m_file
private

Input file.

Definition at line 87 of file ReaderHEPEVT.h.

◆ m_isstream

bool m_isstream
private

toggles usage of m_file or m_stream

Definition at line 89 of file ReaderHEPEVT.h.

◆ m_run_info

shared_ptr<GenRunInfo> m_run_info
privateinherited

The global GenRunInfo object.

Definition at line 53 of file Reader.h.

◆ m_stream

std::istream* m_stream
private

For ctor when reading from stdin.

Definition at line 88 of file ReaderHEPEVT.h.

◆ m_vertices_positions_present

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: