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

Detailed Description

GenEvent I/O parsing and serialization for HEPEVT files.

Examples:
convert_example.cc.

Definition at line 28 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...
 
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...
 
shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 

Data Fields

char * hepevtbuffer
 Pointer to HEPEVT Fortran common block/C struct. More...
 
FILE * m_file
 File to read. More...
 
bool m_failed
 File state. More...
 
int m_events_count
 Event count. More...
 

Protected Member Functions

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

Constructor & Destructor Documentation

ReaderHEPEVT ( const std::string &  filename)

Member Function Documentation

void close ( )
virtual

Close file stream.

Implements Reader.

Definition at line 129 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_file.

bool failed ( )
virtual

Get stream error state.

Implements Reader.

Definition at line 134 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_failed.

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 125 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::read_event().

bool read_hepevt_event_header ( )
virtual

Find and read event header line from file.

Definition at line 35 of file ReaderHEPEVT.cc.

References ReaderHEPEVT::m_file, HEPEVT_Wrapper::set_event_number(), and HEPEVT_Wrapper::set_number_entries().

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 37 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 44 of file Reader.h.

References Reader::m_run_info.

Field Documentation

char* hepevtbuffer

Pointer to HEPEVT Fortran common block/C struct.

Definition at line 75 of file ReaderHEPEVT.h.

int m_events_count

Event count.

Definition at line 78 of file ReaderHEPEVT.h.

bool m_failed

File state.

Definition at line 77 of file ReaderHEPEVT.h.

FILE* m_file

File to read.

Definition at line 76 of file ReaderHEPEVT.h.


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