HepMC Reference Documentation

HepMC

HepMC::StreamInfo Class Reference

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

#include <StreamInfo.h>

List of all members.

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)


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.


Constructor & Destructor Documentation

HepMC::StreamInfo::StreamInfo (  ) 

default constructor

Definition at line 13 of file StreamInfo.cc.

HepMC::StreamInfo::~StreamInfo (  )  [inline]

destructor

Definition at line 31 of file StreamInfo.h.


Member Function Documentation

bool HepMC::StreamInfo::finished_first_event (  )  const [inline]

Special information is processed the first time we use the IO.

Definition at line 81 of file StreamInfo.h.

Referenced by HepMC::detail::establish_input_stream_info(), HepMC::establish_input_stream_info(), HepMC::detail::establish_output_stream_info(), HepMC::establish_output_stream_info(), HepMC::GenEvent::read(), HepMC::GenEvent::write(), HepMC::write_HepMC_IO_block_begin(), and HepMC::write_HepMC_IO_block_end().

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_End (  )  const [inline]

IO_Ascii end event block key.

Definition at line 43 of file StreamInfo.h.

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_Ascii_PDT_End (  )  const [inline]

IO_Ascii end particle data block key.

Definition at line 47 of file StreamInfo.h.

std::string HepMC::StreamInfo::IO_Ascii_PDT_Key (  )  const [inline]

IO_Ascii begin particle data block key.

Definition at line 45 of file StreamInfo.h.

std::string HepMC::StreamInfo::IO_ExtendedAscii_End (  )  const [inline]

IO_ExtendedAscii end event block key.

Definition at line 54 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.

std::string HepMC::StreamInfo::IO_ExtendedAscii_PDT_End (  )  const [inline]

IO_ExtendedAscii end particle data block key.

Definition at line 58 of file StreamInfo.h.

std::string HepMC::StreamInfo::IO_ExtendedAscii_PDT_Key (  )  const [inline]

IO_ExtendedAscii begin particle data block key.

Definition at line 56 of file StreamInfo.h.

std::string HepMC::StreamInfo::IO_GenEvent_End (  )  const [inline]

IO_GenEvent end event block key.

Definition at line 36 of file StreamInfo.h.

Referenced by HepMC::write_HepMC_IO_block_end().

std::string HepMC::StreamInfo::IO_GenEvent_Key (  )  const [inline]

IO_GenEvent begin event block key.

Definition at line 34 of file StreamInfo.h.

Referenced by HepMC::write_HepMC_IO_block_begin().

Units::MomentumUnit HepMC::StreamInfo::io_momentum_unit (  )  const [inline]

get the I/O momentum units

Definition at line 72 of file StreamInfo.h.

Referenced by HepMC::detail::read_units().

Units::LengthUnit HepMC::StreamInfo::io_position_unit (  )  const [inline]

get the I/O length units

Definition at line 74 of file StreamInfo.h.

Referenced by HepMC::detail::read_units().

int HepMC::StreamInfo::io_type (  )  const [inline]

get IO type

Definition at line 61 of file StreamInfo.h.

Referenced by HepMC::GenEvent::read(), and HepMC::detail::read_particle().

void HepMC::StreamInfo::set_finished_first_event ( bool  b  )  [inline]

Special information is processed the first time we use the IO.

Definition at line 83 of file StreamInfo.h.

Referenced by HepMC::GenEvent::read(), and HepMC::GenEvent::write().

void HepMC::StreamInfo::set_has_key ( bool   ) 

set to false if the stream does not have a file type key

Definition at line 46 of file StreamInfo.cc.

void HepMC::StreamInfo::set_io_type ( int   ) 

set IO type

Definition at line 42 of file StreamInfo.cc.

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  ,
Units::LengthUnit   
)

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 37 of file StreamInfo.cc.

Referenced by HepMC::set_input_units().


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 13:10:21 2010 for HepMC by  doxygen 1.4.7