UTIL::LCStdHepRdr Class Reference

Basic utility for reading a binary stdhep file and filling a LCCollectionVec with MCParticles containing the stdhep file information. More...

#include <UTIL/LCStdHepRdr.h>

List of all members.

Public Member Functions

 LCStdHepRdr (const char *evfile)
 Open the stdhep input file in the constructer.
 LCStdHepRdr (const LCStdHepRdr &)
 no copy constructor
LCStdHepRdroperator= (const LCStdHepRdr &)
 no assignment operator
 ~LCStdHepRdr ()
 noop
long getNumberOfEvents () const
 Get number of events in the stdhep file.
long getNumberOfTotalEventsExpected () const
 Get total number of expected events in the whole set of stdhep files from which this stdhep file belongs to.
IMPL::LCCollectionVecreadEvent ()
 Read an event and return an LCCollectionVec of MCParticles.
void updateNextEvent (IMPL::LCEventImpl *evt, const char *colName=EVENT::LCIO::MCPARTICLE)
 Reads the next stdhep event and adds a new MCParticle collection to the the event with default name 'MCParticle'.
void printHeader (std::ostream &os=std::cout)
 Print the file header to the given ostream.
int threeCharge (int pdgID) const
 Return the charge of the particle times 3 - code copied from HepPDT package.

Detailed Description

Basic utility for reading a binary stdhep file and filling a LCCollectionVec with MCParticles containing the stdhep file information.

Author:
cassell
Version:
Id
LCStdHepRdr.h,v 1.4 2007-11-12 16:39:04 gaede Exp

Member Function Documentation

long UTIL::LCStdHepRdr::getNumberOfEvents (  )  const [inline]

Get number of events in the stdhep file.

This number is read from the file header (no guarantee that it is correct)

long UTIL::LCStdHepRdr::getNumberOfTotalEventsExpected (  )  const [inline]

Get total number of expected events in the whole set of stdhep files from which this stdhep file belongs to.

This number is read from the file header (no guarantee that it is correct)

IMPL::LCCollectionVec * UTIL::LCStdHepRdr::readEvent (  ) 
int UTIL::LCStdHepRdr::threeCharge ( int  pdgID  )  const

Return the charge of the particle times 3 - code copied from HepPDT package.

PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj The location enum provides a convenient index into the PID.

Referenced by readEvent().

void UTIL::LCStdHepRdr::updateNextEvent ( IMPL::LCEventImpl evt,
const char *  colName = EVENT::LCIO::MCPARTICLE 
)

Reads the next stdhep event and adds a new MCParticle collection to the the event with default name 'MCParticle'.

Exceptions:
IO::EndOfDataException if no event in stdhep file

References IMPL::LCEventImpl::addCollection(), EVENT::LCParameters::getFloatVal(), EVENT::LCParameters::getIntVal(), IMPL::LCCollectionVec::getParameters(), IMPL::LCEventImpl::parameters(), readEvent(), EVENT::LCParameters::setValue(), and IMPL::LCEventImpl::setWeight().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Friends

Generated on 6 Mar 2020 for LCIO by  doxygen 1.6.1