HepMC Reference Documentation

HepMC

HepMC::IO_AsciiParticles Class Reference

event input/output in ascii format for eye and machine reading More...

#include <IO_AsciiParticles.h>

Inheritance diagram for HepMC::IO_AsciiParticles:

HepMC::IO_BaseClass List of all members.

Public Member Functions

 IO_AsciiParticles (const char *filename="IO_AsciiParticles.dat", std::ios::openmode mode=std::ios::out)
 constructor requiring a file name and std::ios mode
virtual ~IO_AsciiParticles ()
void write_event (const GenEvent *evt)
 write this event
bool fill_next_event (GenEvent *evt)
 get the next event
void write_particle_data_table (const ParticleDataTable *)
 write this ParticleDataTable
bool fill_particle_data_table (ParticleDataTable *)
 fill this ParticleDataTable
void write_comment (const std::string comment)
void setPrecision (int iprec)
 set output precision
int rdstate () const
 check the state of the IO stream
void clear ()
 clear the IO stream
void print (std::ostream &ostr=std::cout) const
 write to ostr

Protected Member Functions

bool write_end_listing ()
 write end tag

Detailed Description

event input/output in ascii format for eye and machine reading

Strategy for reading or writing events/particleData as machine readable ascii to a file. When instantiating, the mode of file to be created must be specified.

Examples:

example_MyPythia.cc, testHepMC.cc.in, and testStreamIO.cc.in.

Definition at line 54 of file IO_AsciiParticles.h.


Constructor & Destructor Documentation

HepMC::IO_AsciiParticles::IO_AsciiParticles ( const char *  filename = "IO_AsciiParticles.dat",
std::ios::openmode  mode = std::ios::out 
)

constructor requiring a file name and std::ios mode

Definition at line 18 of file IO_AsciiParticles.cc.

HepMC::IO_AsciiParticles::~IO_AsciiParticles (  )  [virtual]

Definition at line 47 of file IO_AsciiParticles.cc.


Member Function Documentation

void HepMC::IO_AsciiParticles::clear (  )  [inline]

clear the IO stream

Definition at line 99 of file IO_AsciiParticles.h.

bool HepMC::IO_AsciiParticles::fill_next_event ( GenEvent evt  )  [virtual]

get the next event

Implements HepMC::IO_BaseClass.

Definition at line 180 of file IO_AsciiParticles.cc.

bool HepMC::IO_AsciiParticles::fill_particle_data_table ( ParticleDataTable  )  [inline, virtual]

fill this ParticleDataTable

Implements HepMC::IO_BaseClass.

Definition at line 107 of file IO_AsciiParticles.h.

void HepMC::IO_AsciiParticles::print ( std::ostream &  ostr = std::cout  )  const [virtual]

write to ostr

Reimplemented from HepMC::IO_BaseClass.

Definition at line 54 of file IO_AsciiParticles.cc.

int HepMC::IO_AsciiParticles::rdstate (  )  const [inline]

check the state of the IO stream

Definition at line 98 of file IO_AsciiParticles.h.

void HepMC::IO_AsciiParticles::setPrecision ( int  iprec  )  [inline]

set output precision

Definition at line 100 of file IO_AsciiParticles.h.

void HepMC::IO_AsciiParticles::write_comment ( const std::string  comment  ) 

insert a comment directly into the output file --- normally you only want to do this at the beginning or end of the file. All comments are preceded with "HepMC::IO_AsciiParticles-COMMENT\n"

Definition at line 203 of file IO_AsciiParticles.cc.

References write_end_listing().

bool HepMC::IO_AsciiParticles::write_end_listing (  )  [protected]

write end tag

Definition at line 218 of file IO_AsciiParticles.cc.

Referenced by write_comment().

void HepMC::IO_AsciiParticles::write_event ( const GenEvent evt  )  [virtual]

write this event

Implements HepMC::IO_BaseClass.

Definition at line 64 of file IO_AsciiParticles.cc.

References HepMC::GenEvent::alphaQCD(), HepMC::GenEvent::alphaQED(), HepMC::GenVertex::barcode(), HepMC::WeightContainer::begin(), HepMC::WeightContainer::end(), HepMC::GenEvent::event_number(), HepMC::GenEvent::event_scale(), HepMC::detail::output(), HepMC::GenEvent::particles_begin(), HepMC::GenEvent::particles_end(), HepMC::GenEvent::particles_size(), HepMC::GenEvent::random_states(), HepMC::GenEvent::signal_process_id(), HepMC::GenEvent::signal_process_vertex(), HepMC::WeightContainer::size(), HepMC::versionName(), HepMC::GenEvent::vertices_size(), and HepMC::GenEvent::weights().

void HepMC::IO_AsciiParticles::write_particle_data_table ( const ParticleDataTable  )  [inline, virtual]

write this ParticleDataTable

Implements HepMC::IO_BaseClass.

Definition at line 106 of file IO_AsciiParticles.h.


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