StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
HepMC::StreamInfo Class Reference

StreamInfo contains extra information needed when using streaming IO. More...

#include <StreamInfo.h>

Public Member Functions

 StreamInfo ()
 default constructor
 
 ~StreamInfo ()
 destructor
 
std::string IO_GenEvent_Key () const
 IO_GenEvent begin event block key.
 
std::string IO_GenEvent_End () const
 IO_GenEvent end event block key.
 
std::string IO_Ascii_Key () const
 
std::string IO_Ascii_End () const
 IO_Ascii end event block key.
 
std::string IO_Ascii_PDT_Key () const
 IO_Ascii begin particle data block key.
 
std::string IO_Ascii_PDT_End () const
 IO_Ascii end particle data block key.
 
std::string IO_ExtendedAscii_Key () const
 
std::string IO_ExtendedAscii_End () const
 IO_ExtendedAscii end event block key.
 
std::string IO_ExtendedAscii_PDT_Key () const
 IO_ExtendedAscii begin particle data block key.
 
std::string IO_ExtendedAscii_PDT_End () const
 IO_ExtendedAscii end particle data block key.
 
int io_type () const
 get IO type
 
void set_io_type (int)
 set IO type
 
bool has_key () const
 
void set_has_key (bool)
 set to false if the stream does not have a file type key
 
Units::MomentumUnit io_momentum_unit () const
 get the I/O momentum units
 
Units::LengthUnit io_position_unit () const
 get the I/O length units
 
int stream_id () const
 
bool finished_first_event () const
 Special information is processed the first time we use the IO.
 
void set_finished_first_event (bool b)
 Special information is processed the first time we use the IO.
 
void use_input_units (Units::MomentumUnit, Units::LengthUnit)
 
bool reading_event_header ()
 
void set_reading_event_header (bool)
 set the reading_event_header flag
 

Detailed Description

StreamInfo contains extra information needed when using streaming IO.

This class contains the extra information needed when using streaming IO to process HepMC GenEvents

Definition at line 26 of file StreamInfo.h.

Member Function Documentation

bool HepMC::StreamInfo::has_key ( ) const
inline

true if the stream has a file type key has_key is true by default

Definition at line 67 of file StreamInfo.h.

Referenced by HepMC::GenEvent::read().

std::string HepMC::StreamInfo::IO_Ascii_Key ( ) const
inline

IO_Ascii begin event block key IO_Ascii has been removed, but we want to be able to read existing files written by IO_Ascii

Definition at line 41 of file StreamInfo.h.

std::string HepMC::StreamInfo::IO_ExtendedAscii_Key ( ) const
inline

IO_ExtendedAscii begin event block key IO_ExtendedAscii has been removed, but we want to be able to read existing files written by IO_ExtendedAscii

Definition at line 52 of file StreamInfo.h.

bool HepMC::StreamInfo::reading_event_header ( )

reading_event_header will return true when streaming input is processing the GenEvent header information

Definition at line 51 of file StreamInfo.cc.

Referenced by HepMC::GenEvent::read().

int HepMC::StreamInfo::stream_id ( ) const
inline

get the I/O stream id This is used for sanity checking.

Definition at line 78 of file StreamInfo.h.

Referenced by HepMC::HepMCStreamCallback().

void HepMC::StreamInfo::use_input_units ( Units::MomentumUnit  mom,
Units::LengthUnit  len 
)

needed when reading a file without units if those units are different than the declared default units (e.g., the default units are MeV, but the file was written with GeV) This method is not necessary if the units are written in the file

Definition at line 38 of file StreamInfo.cc.

Referenced by HepMC::set_input_units().


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