lStdHep Class Reference

#include <lStdHep.hh>

Inheritance diagram for lStdHep:

Inheritance graph
lXDR
[legend]
Collaboration diagram for lStdHep:

Collaboration graph
lXDRlStdHep::EventTablelStdHep::Event
[legend]

List of all members.


Detailed Description

Definition at line 113 of file lStdHep.hh.


Public Member Functions

 lStdHep (const char *filename=0, bool open_for_write=false)
virtual ~lStdHep ()
bool more (void)
long readEvent (void)
long getEvent (lStdEvent &lse) const
long readEvent (lStdEvent &lse)
long numEvents () const
long blockId () const
long nTracks (void) const
long evtNum (void) const
long runNum (void) const
double X (int i) const
double Y (int i) const
double Z (int i) const
double T (int i) const
double Px (int i) const
double Py (int i) const
double Pz (int i) const
double E (int i) const
double M (int i) const
long pid (int i) const
long status (int i) const
long mother1 (int i) const
long mother2 (int i) const
long daughter1 (int i) const
long daughter2 (int i) const
double eventweight (void) const
double alphaQED (void) const
double alphaQCD (void) const
double scale (int i, int j) const
double spinX (int i) const
double spinY (int i) const
double spinZ (int i) const
long colorflow (int i, int j) const
long idrup (void) const
bool isStdHepEv4 (void) const
long writeEvent (void)
long setEvent (const lStdEvent &lse)
long writeEvent (lStdEvent &lse)
void setNTracks (long n)
void setEvtNum (long n)
void setX (int i, double x)
void setY (int i, double y)
void setZ (int i, double z)
void setT (int i, double t)
void setPx (int i, double px)
void setPy (int i, double py)
void setPz (int i, double pz)
void setE (int i, double e)
void setM (int i, double m)
void setPid (int i, long pid)
void setStatus (int i, long s)
void setMother1 (int i, long n)
void setMother2 (int i, long n)
void setDaughter1 (int i, long n)
void setDaughter2 (int i, long n)
void printFileHeader (FILE *fp=0)
void printBeginRunRecord (FILE *fp=0)
void printEndRunRecord (FILE *fp=0)
void printEventTable (FILE *fp=0)
void printEventHeader (FILE *fp=0)
void printEvent (FILE *fp=0)
void printTrack (int i, FILE *fp=0)
void setFileName (const char *filename, bool open_for_write=false)
const char * getFileName (void) const
long getError (void) const
long readLong (void)
double readFloat (void)
double readDouble (void)
const char * readString (long &length)
long * readLongArray (long &length)
double * readFloatArray (long &length)
double * readDoubleArray (long &length)
long writeLong (long data)
long writeDouble (double data)
long writeString (const char *data)
long writeString (const char *data, long length)
long writeLongArray (const long *data, long length)
long writeDoubleArray (const double *data, long length)
void setError (long error)
long filePosition (long pos=-1)

Static Public Member Functions

static int getMajor (void)
static int getMinor (void)
static const char * getText (void)

Private Types

enum  {
  MAJOR = 2, MINOR = 0, DAY = 23, MONTH = 1,
  YEAR = 2006
}

Private Member Functions

 lStdHep (const lStdHep &)
lStdHepoperator= (const lStdHep &)
long readFileHeader (void)

Private Attributes

long ntot
const char * version
const char * title
const char * comment
const char * date
const char * closingDate
long numevts_expect
long numevts
long firstTable
long dimTable
long nNTuples
long nBlocks
long * blockIds
const char ** blockNames
EventTable eventTable
Event event

Classes

class  Event
class  EventTable

Member Enumeration Documentation

anonymous enum [private]

Enumerator:
MAJOR 
MINOR 
DAY 
MONTH 
YEAR 

Definition at line 118 of file lStdHep.hh.


Constructor & Destructor Documentation

lStdHep::lStdHep ( const char *  filename = 0,
bool  open_for_write = false 
)

Definition at line 27 of file lStdHep.cc.

References LSH_NOTSUPPORTED, readFileHeader(), and lXDR::setError().

lStdHep::lStdHep ( const lStdHep  )  [private]

lStdHep::~lStdHep (  )  [virtual]

Definition at line 39 of file lStdHep.cc.

References blockIds, blockNames, closingDate, comment, date, nBlocks, title, and version.


Member Function Documentation

static int lStdHep::getMajor ( void   )  [inline, static]

Reimplemented from lXDR.

Definition at line 121 of file lStdHep.hh.

References MAJOR.

static int lStdHep::getMinor ( void   )  [inline, static]

Reimplemented from lXDR.

Definition at line 122 of file lStdHep.hh.

References MINOR.

static const char* lStdHep::getText ( void   )  [inline, static]

Reimplemented from lXDR.

Definition at line 123 of file lStdHep.hh.

References DAY, MAJOR, MINOR, MONTH, and YEAR.

lStdHep& lStdHep::operator= ( const lStdHep  )  [private]

bool lStdHep::more ( void   ) 

Definition at line 126 of file lStdHep.cc.

References lXDR::getError(), and LSH_SUCCESS.

long lStdHep::readEvent ( void   ) 

Definition at line 131 of file lStdHep.cc.

References event, eventTable, lXDR::filePosition(), lXDR::getError(), lStdHep::EventTable::ievt, lStdHep::EventTable::isEmpty, lStdHep::Event::isEmpty, LSH_ENDOFFILE, LSH_EVTABLECORRUPT, LSH_SUCCESS, lStdHep::EventTable::nextlocator, lStdHep::EventTable::numEvts, lStdHep::EventTable::ptrEvents, lStdHep::EventTable::read(), lStdHep::Event::read(), and lXDR::setError().

Referenced by readEvent(), and slic::StdHepLoader::readNextEvent().

long lStdHep::getEvent ( lStdEvent lse  )  const

Definition at line 172 of file lStdHep.cc.

References daughter1(), lStdTrack::daughter1, daughter2(), lStdTrack::daughter2, E(), lStdTrack::E, lStdEvent::evtNum, lXDR::getError(), LSH_SUCCESS, M(), lStdTrack::M, mother1(), lStdTrack::mother1, mother2(), lStdTrack::mother2, pid(), lStdTrack::pid, Px(), lStdTrack::Px, Py(), lStdTrack::Py, Pz(), lStdTrack::Pz, lStdTrack::status, status(), T(), lStdTrack::T, X(), lStdTrack::X, Y(), lStdTrack::Y, Z(), and lStdTrack::Z.

Referenced by readEvent().

long lStdHep::readEvent ( lStdEvent lse  ) 

Definition at line 201 of file lStdHep.cc.

References getEvent(), LSH_SUCCESS, readEvent(), and status().

long lStdHep::numEvents (  )  const [inline]

Definition at line 172 of file lStdHep.hh.

References numevts.

Referenced by slic::StdHepLoader::openStdHepFile().

long lStdHep::blockId (  )  const [inline]

Definition at line 179 of file lStdHep.hh.

References lStdHep::Event::blockid, and event.

long lStdHep::nTracks ( void   )  const [inline]

Definition at line 180 of file lStdHep.hh.

References event, and lStdHep::Event::nhep.

Referenced by slic::StdHepToLcioConvertor::fillCurrentMcpCollectionFromStdHep().

long lStdHep::evtNum ( void   )  const [inline]

Definition at line 181 of file lStdHep.hh.

References event, and lStdHep::Event::nevhep.

long lStdHep::runNum ( void   )  const [inline]

Definition at line 182 of file lStdHep.hh.

References event, and lStdHep::Event::runnum.

double lStdHep::X ( int  i  )  const [inline]

Definition at line 184 of file lStdHep.hh.

References event, and lStdHep::Event::vhep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::Y ( int  i  )  const [inline]

Definition at line 185 of file lStdHep.hh.

References event, and lStdHep::Event::vhep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::Z ( int  i  )  const [inline]

Definition at line 186 of file lStdHep.hh.

References event, and lStdHep::Event::vhep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::T ( int  i  )  const [inline]

Definition at line 187 of file lStdHep.hh.

References event, and lStdHep::Event::vhep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::Px ( int  i  )  const [inline]

Definition at line 188 of file lStdHep.hh.

References event, and lStdHep::Event::phep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::Py ( int  i  )  const [inline]

Definition at line 189 of file lStdHep.hh.

References event, and lStdHep::Event::phep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::Pz ( int  i  )  const [inline]

Definition at line 190 of file lStdHep.hh.

References event, and lStdHep::Event::phep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

double lStdHep::E ( int  i  )  const [inline]

Definition at line 191 of file lStdHep.hh.

References event, and lStdHep::Event::phep.

Referenced by getEvent(), printTrack(), and setEvent().

double lStdHep::M ( int  i  )  const [inline]

Definition at line 192 of file lStdHep.hh.

References event, and lStdHep::Event::phep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

long lStdHep::pid ( int  i  )  const [inline]

Definition at line 193 of file lStdHep.hh.

References event, and lStdHep::Event::idhep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), printTrack(), and setEvent().

long lStdHep::status ( int  i  )  const [inline]

Definition at line 194 of file lStdHep.hh.

References event, and lStdHep::Event::isthep.

Referenced by slic::StdHepToLcioConvertor::createMcpFromStdHep(), getEvent(), slic::StdHepToLcioConvertor::printTrack(), readEvent(), setEvent(), and writeEvent().

long lStdHep::mother1 ( int  i  )  const [inline]

Definition at line 195 of file lStdHep.hh.

References event, and lStdHep::Event::jmohep.

Referenced by slic::StdHepToLcioConvertor::checkParentage(), getEvent(), slic::StdHepToLcioConvertor::printMothers(), setEvent(), and slic::StdHepToLcioConvertor::setupParents().

long lStdHep::mother2 ( int  i  )  const [inline]

Definition at line 196 of file lStdHep.hh.

References event, and lStdHep::Event::jmohep.

Referenced by slic::StdHepToLcioConvertor::checkParentage(), getEvent(), slic::StdHepToLcioConvertor::printMothers(), setEvent(), and slic::StdHepToLcioConvertor::setupParents().

long lStdHep::daughter1 ( int  i  )  const [inline]

Definition at line 197 of file lStdHep.hh.

References event, and lStdHep::Event::jdahep.

Referenced by slic::StdHepToLcioConvertor::checkParentage(), getEvent(), slic::StdHepToLcioConvertor::printDaughters(), setEvent(), and slic::StdHepToLcioConvertor::setupDaughters().

long lStdHep::daughter2 ( int  i  )  const [inline]

Definition at line 198 of file lStdHep.hh.

References event, and lStdHep::Event::jdahep.

Referenced by slic::StdHepToLcioConvertor::checkParentage(), getEvent(), slic::StdHepToLcioConvertor::printDaughters(), setEvent(), and slic::StdHepToLcioConvertor::setupDaughters().

double lStdHep::eventweight ( void   )  const [inline]

Definition at line 199 of file lStdHep.hh.

References event, and lStdHep::Event::eventweight.

Referenced by printTrack().

double lStdHep::alphaQED ( void   )  const [inline]

Definition at line 200 of file lStdHep.hh.

References lStdHep::Event::alphaqed, and event.

Referenced by printTrack().

double lStdHep::alphaQCD ( void   )  const [inline]

Definition at line 201 of file lStdHep.hh.

References lStdHep::Event::alphaqcd, and event.

Referenced by printTrack().

double lStdHep::scale ( int  i,
int  j 
) const [inline]

Definition at line 202 of file lStdHep.hh.

References event, and lStdHep::Event::scale.

double lStdHep::spinX ( int  i  )  const [inline]

Definition at line 203 of file lStdHep.hh.

References event, and lStdHep::Event::spin.

double lStdHep::spinY ( int  i  )  const [inline]

Definition at line 204 of file lStdHep.hh.

References event, and lStdHep::Event::spin.

double lStdHep::spinZ ( int  i  )  const [inline]

Definition at line 205 of file lStdHep.hh.

References event, and lStdHep::Event::spin.

long lStdHep::colorflow ( int  i,
int  j 
) const [inline]

Definition at line 206 of file lStdHep.hh.

References lStdHep::Event::colorflow, and event.

long lStdHep::idrup ( void   )  const [inline]

Definition at line 207 of file lStdHep.hh.

References event, and lStdHep::Event::idrup.

Referenced by printTrack().

bool lStdHep::isStdHepEv4 ( void   )  const [inline]

Definition at line 211 of file lStdHep.hh.

References event, and lStdHep::Event::scale.

long lStdHep::writeEvent ( void   ) 

Definition at line 254 of file lStdHep.cc.

References LSH_NOTSUPPORTED.

Referenced by writeEvent().

long lStdHep::setEvent ( const lStdEvent lse  ) 

Definition at line 259 of file lStdHep.cc.

References daughter1(), daughter2(), E(), lStdEvent::evtNum, LSH_SUCCESS, M(), mother1(), mother2(), pid(), Px(), Py(), Pz(), setDaughter1(), setDaughter2(), setE(), setEvtNum(), setM(), setMother1(), setMother2(), setNTracks(), setPid(), setPx(), setPy(), setPz(), setStatus(), setT(), setX(), setY(), setZ(), status(), T(), X(), Y(), and Z().

Referenced by writeEvent().

long lStdHep::writeEvent ( lStdEvent lse  ) 

Definition at line 285 of file lStdHep.cc.

References LSH_SUCCESS, setEvent(), status(), and writeEvent().

void lStdHep::setNTracks ( long  n  )  [inline]

Definition at line 229 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setEvtNum ( long  n  )  [inline]

Definition at line 230 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setX ( int  i,
double  x 
) [inline]

Definition at line 232 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setY ( int  i,
double  y 
) [inline]

Definition at line 233 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setZ ( int  i,
double  z 
) [inline]

Definition at line 234 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setT ( int  i,
double  t 
) [inline]

Definition at line 235 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setPx ( int  i,
double  px 
) [inline]

Definition at line 236 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setPy ( int  i,
double  py 
) [inline]

Definition at line 237 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setPz ( int  i,
double  pz 
) [inline]

Definition at line 238 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setE ( int  i,
double  e 
) [inline]

Definition at line 239 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setM ( int  i,
double  m 
) [inline]

Definition at line 240 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setPid ( int  i,
long  pid 
) [inline]

Definition at line 241 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setStatus ( int  i,
long  s 
) [inline]

Definition at line 242 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setMother1 ( int  i,
long  n 
) [inline]

Definition at line 243 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setMother2 ( int  i,
long  n 
) [inline]

Definition at line 244 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setDaughter1 ( int  i,
long  n 
) [inline]

Definition at line 245 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::setDaughter2 ( int  i,
long  n 
) [inline]

Definition at line 246 of file lStdHep.hh.

Referenced by setEvent().

void lStdHep::printFileHeader ( FILE *  fp = 0  ) 

Definition at line 56 of file lStdHep.cc.

References blockNames, closingDate, comment, date, dimTable, firstTable, nBlocks, nNTuples, ntot, numevts, numevts_expect, title, and version.

void lStdHep::printBeginRunRecord ( FILE *  fp = 0  ) 

Definition at line 114 of file lStdHep.cc.

void lStdHep::printEndRunRecord ( FILE *  fp = 0  ) 

Definition at line 120 of file lStdHep.cc.

void lStdHep::printEventTable ( FILE *  fp = 0  ) 

Definition at line 81 of file lStdHep.cc.

References eventTable, and lStdHep::EventTable::print().

Referenced by slic::StdHepLoader::dumpCurrentEvent(), and slic::StdHepEventSource::dumpCurrentEvent().

void lStdHep::printEventHeader ( FILE *  fp = 0  ) 

Definition at line 88 of file lStdHep.cc.

Referenced by slic::StdHepLoader::dumpCurrentEvent().

void lStdHep::printEvent ( FILE *  fp = 0  ) 

Definition at line 95 of file lStdHep.cc.

Referenced by slic::StdHepLoader::dumpCurrentEvent().

void lStdHep::printTrack ( int  i,
FILE *  fp = 0 
)

Definition at line 102 of file lStdHep.cc.

References alphaQCD(), alphaQED(), E(), event, eventweight(), idrup(), M(), lStdHep::Event::nhep, pid(), Px(), Py(), Pz(), T(), X(), Y(), and Z().

long lStdHep::readFileHeader ( void   )  [private]

Definition at line 208 of file lStdHep.cc.

References blockIds, blockNames, closingDate, comment, date, dimTable, eventTable, firstTable, lXDR::getError(), LSH_BLOCKERROR, LSH_FILEHEADER, LSH_NOTSUPPORTED, nBlocks, nNTuples, ntot, numevts, numevts_expect, lStdHep::EventTable::read(), lXDR::readLong(), lXDR::readLongArray(), lXDR::readString(), lXDR::setError(), title, and version.

Referenced by lStdHep().

void lXDR::setFileName ( const char *  filename,
bool  open_for_write = false 
) [inherited]

Definition at line 46 of file lXDR.cc.

References lXDR::_error, lXDR::_fileName, lXDR::_fp, lXDR::_openForWrite, LXDR_OPENFAILURE, and LXDR_SUCCESS.

Referenced by lXDR::lXDR().

const char* lXDR::getFileName ( void   )  const [inline, inherited]

Definition at line 65 of file lXDR.hh.

References lXDR::_fileName.

long lXDR::getError ( void   )  const [inline, inherited]

Definition at line 75 of file lXDR.hh.

References lXDR::_error.

Referenced by getEvent(), more(), slic::StdHepLoader::openStdHepFile(), lStdHep::Event::read(), lStdHep::EventTable::read(), readEvent(), readFileHeader(), and slic::StdHepLoader::readNextEvent().

long lXDR::readLong ( void   )  [inherited]

Definition at line 141 of file lXDR.cc.

References lXDR::checkRead().

Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and readFileHeader().

double lXDR::readFloat ( void   )  [inherited]

Definition at line 155 of file lXDR.cc.

References lXDR::checkRead().

Referenced by lStdHep::Event::read().

double lXDR::readDouble ( void   )  [inherited]

Definition at line 148 of file lXDR.cc.

References lXDR::checkRead().

Referenced by lStdHep::Event::read().

const char * lXDR::readString ( long &  length  )  [inherited]

Definition at line 162 of file lXDR.cc.

References lXDR::_error, lXDR::_fp, lXDR::checkRead(), LXDR_READERROR, and LXDR_SUCCESS.

Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and readFileHeader().

long * lXDR::readLongArray ( long &  length  )  [inherited]

Definition at line 177 of file lXDR.cc.

References lXDR::_error, lXDR::_fp, lXDR::_hasNetworkOrder, lXDR::checkRead(), LXDR_READERROR, and LXDR_SUCCESS.

Referenced by lStdHep::Event::read(), lStdHep::EventTable::read(), and readFileHeader().

double * lXDR::readFloatArray ( long &  length  )  [inherited]

Definition at line 205 of file lXDR.cc.

References lXDR::_error, lXDR::_fp, lXDR::_hasNetworkOrder, lXDR::checkRead(), LXDR_READERROR, and LXDR_SUCCESS.

double * lXDR::readDoubleArray ( long &  length  )  [inherited]

Definition at line 191 of file lXDR.cc.

References lXDR::_error, lXDR::_fp, lXDR::_hasNetworkOrder, lXDR::checkRead(), LXDR_READERROR, LXDR_SUCCESS, and lXDR::ntohd().

Referenced by lStdHep::Event::read().

long lXDR::writeLong ( long  data  )  [inherited]

Definition at line 247 of file lXDR.cc.

References lXDR::checkWrite().

long lXDR::writeDouble ( double  data  )  [inherited]

Definition at line 252 of file lXDR.cc.

References lXDR::checkWrite().

long lXDR::writeString ( const char *  data  )  [inherited]

Definition at line 257 of file lXDR.cc.