HepMC Reference Documentation

HepMC

HepMC::IO_PDG_ParticleDataTable Class Reference

an example ParticleDataTable IO method More...

#include <IO_PDG_ParticleDataTable.h>

Inheritance diagram for HepMC::IO_PDG_ParticleDataTable:

HepMC::IO_BaseClass List of all members.

Public Member Functions

 IO_PDG_ParticleDataTable (const char *filename="PDG98_ParticleDataTable.txt")
 constructor using filename
virtual ~IO_PDG_ParticleDataTable ()
bool fill_particle_data_table (ParticleDataTable *)
 read the input and fill the table
void add_quarks_to_table (ParticleDataTable &)
 add u, d, s, c, b, and t
void print (std::ostream &ostr=std::cout) const
 write to ostr
int rdstate () const
 check the IO state

Protected Member Functions

bool search_for_key_end (std::istream &in, const char *key)
 for internal use
void read_entry (ParticleDataTable *)
 read a line

Detailed Description

an example ParticleDataTable IO method

Example of reading from file PDG98_ParticleDataTable.txt

Definition at line 49 of file IO_PDG_ParticleDataTable.h.


Constructor & Destructor Documentation

HepMC::IO_PDG_ParticleDataTable::IO_PDG_ParticleDataTable ( const char *  filename = "PDG98_ParticleDataTable.txt"  ) 

constructor using filename

Definition at line 18 of file IO_PDG_ParticleDataTable.cc.

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

Definition at line 26 of file IO_PDG_ParticleDataTable.cc.


Member Function Documentation

void HepMC::IO_PDG_ParticleDataTable::add_quarks_to_table ( ParticleDataTable  ) 

add u, d, s, c, b, and t

since quarks aren't included in PDG table, this method adds them

Definition at line 171 of file IO_PDG_ParticleDataTable.cc.

References HepMC::ParticleDataTable::erase(), HepMC::ParticleDataTable::find(), HepMC::ParticleDataTable::insert(), HepMC::ParticleData::mass(), and HepMC::Units::name().

bool HepMC::IO_PDG_ParticleDataTable::fill_particle_data_table ( ParticleDataTable  )  [virtual]

read the input and fill the table

Implements HepMC::IO_BaseClass.

Definition at line 30 of file IO_PDG_ParticleDataTable.cc.

References read_entry(), search_for_key_end(), and HepMC::ParticleDataTable::set_description().

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

write to ostr

Reimplemented from HepMC::IO_BaseClass.

Definition at line 85 of file IO_PDG_ParticleDataTable.h.

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

check the IO state

Definition at line 63 of file IO_PDG_ParticleDataTable.h.

void HepMC::IO_PDG_ParticleDataTable::read_entry ( ParticleDataTable  )  [protected]

read a line

Definition at line 69 of file IO_PDG_ParticleDataTable.cc.

References HepMC::clifetime_from_width(), HepMC::ParticleDataTable::find(), HepMC::ParticleDataTable::insert(), HepMC::Units::name(), HepMC::ParticleData::set_clifetime(), and HepMC::ParticleData::set_mass().

Referenced by fill_particle_data_table().

bool HepMC::IO_PDG_ParticleDataTable::search_for_key_end ( std::istream &  in,
const char *  key 
) [protected]

for internal use

(this method borrowed from IO_Ascii class) reads characters from in until the string of characters matching key is found (success) or EOF is reached (failure). It stops immediately thereafter. Returns T/F for success/fail

Definition at line 209 of file IO_PDG_ParticleDataTable.cc.

Referenced by fill_particle_data_table().


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