![]() |
HepMC Reference DocumentationHepMC |
#include <IO_AsciiParticles.h>
Inheritance diagram for HepMC::IO_AsciiParticles:
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 |
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.
example_MyPythia.cc, testHepMC.cc.in, and testStreamIO.cc.in.
Definition at line 54 of file IO_AsciiParticles.h.
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.
void HepMC::IO_AsciiParticles::clear | ( | ) | [inline] |
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] |
void HepMC::IO_AsciiParticles::setPrecision | ( | int | iprec | ) | [inline] |
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] |
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.