Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

lStdHep::EventTable Class Reference

Collaboration diagram for lStdHep::EventTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EventTable ()
 ~EventTable ()
void cleanup (void)
long read (lStdHep &ls)
long print (FILE *fp)

Public Attributes

long isEmpty
long ievt
long blockid
long ntot
const char * version
long nextlocator
long numEvts
long * evtnums
long * storenums
long * runnums
long * trigMasks
long * ptrEvents

Constructor & Destructor Documentation

lStdHep::EventTable::EventTable  ) 
 

Definition at line 296 of file lStdHep.cc.

00296                               :
00297    isEmpty(1), ievt(0), blockid(0), ntot(0), version(0),
00298    nextlocator(-3), numEvts(0), evtnums(0),
00299    storenums(0), runnums(0), trigMasks(0), ptrEvents(0)
00300 {
00301    return;
00302 }

lStdHep::EventTable::~EventTable  ) 
 

Definition at line 304 of file lStdHep.cc.

References cleanup().

00305 {
00306    cleanup();
00307    return;
00308 }


Member Function Documentation

void lStdHep::EventTable::cleanup void   ) 
 

Definition at line 310 of file lStdHep.cc.

References blockid, evtnums, ievt, isEmpty, ntot, numEvts, ptrEvents, runnums, storenums, trigMasks, and version.

Referenced by read(), and ~EventTable().

00311 {
00312    delete [] version;    version   = 0;
00313    delete [] evtnums;    evtnums   = 0;
00314    delete [] storenums;  storenums = 0;
00315    delete [] runnums;    runnums   = 0;
00316    delete [] trigMasks;  trigMasks = 0;
00317    delete [] ptrEvents;  ptrEvents = 0;
00318    isEmpty = 1;
00319    ievt    = ntot = blockid = numEvts = 0; // leave nextlocator alone!
00320    return;
00321 }

long lStdHep::EventTable::print FILE *  fp  ) 
 

Definition at line 352 of file lStdHep.cc.

References blockid, evtnums, nextlocator, ntot, numEvts, ptrEvents, runnums, storenums, trigMasks, and version.

Referenced by lStdHep::printEventTable().

00353 {
00354    fprintf(fp, " EventTable: blockid: %ld, ntot: %ld, version: %s\n", blockid, ntot, version);
00355    fprintf(fp, " EventTable: nextlocator: %ld, numEvts: %ld\n", nextlocator, numEvts);
00356    for (int i = 0; i < numEvts; i++) {
00357       fprintf(fp, " EventTable: %d: evtnums %ld storenums %ld runnums %ld trigMasks %ld ptrEvents %ld\n",
00358                i, evtnums[i], storenums[i], runnums[i], trigMasks[i], ptrEvents[i]);
00359       if (i == 10) {
00360          fprintf(fp, " EventTable: etc.\n");
00361          break;
00362       }
00363    }
00364    return(0);
00365 }

long lStdHep::EventTable::read lStdHep ls  ) 
 

Definition at line 323 of file lStdHep.cc.

References blockid, cleanup(), evtnums, lXDR::getError(), isEmpty, LSH_EVENTTABLE, LSH_NOEVENTTABLE, nextlocator, ntot, numEvts, ptrEvents, lXDR::readLong(), lXDR::readLongArray(), lXDR::readString(), runnums, lXDR::setError(), storenums, trigMasks, and version.

Referenced by lStdHep::readEvent(), and lStdHep::readFileHeader().

00324 {
00325    long len;
00326 
00327    cleanup();
00328 
00329    blockid  = ls.readLong();
00330    ntot     = ls.readLong();
00331    if(version) {
00332      delete[] version; // avoid leaking memory... GL040817
00333      version=NULL;
00334    }
00335    version  = ls.readString(len);
00336 
00337    if (blockid != LSH_EVENTTABLE) {
00338       ls.setError(LSH_NOEVENTTABLE);
00339       return(ls.getError());
00340    }
00341    nextlocator = ls.readLong();
00342    numEvts     = ls.readLong();
00343    evtnums     = ls.readLongArray(len);
00344    storenums   = ls.readLongArray(len);
00345    runnums     = ls.readLongArray(len);
00346    trigMasks   = ls.readLongArray(len);
00347    ptrEvents   = ls.readLongArray(len);
00348    if (numEvts > 0) isEmpty = 0;
00349    return(ls.getError());
00350 }


Member Data Documentation

long lStdHep::EventTable::blockid
 

Definition at line 267 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

long* lStdHep::EventTable::evtnums
 

Definition at line 278 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

long lStdHep::EventTable::ievt
 

Definition at line 263 of file lStdHep.hh.

Referenced by cleanup(), and lStdHep::readEvent().

long lStdHep::EventTable::isEmpty
 

Definition at line 259 of file lStdHep.hh.

Referenced by cleanup(), read(), and lStdHep::readEvent().

long lStdHep::EventTable::nextlocator
 

Definition at line 273 of file lStdHep.hh.

Referenced by print(), read(), and lStdHep::readEvent().

long lStdHep::EventTable::ntot
 

Definition at line 268 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

long lStdHep::EventTable::numEvts
 

Definition at line 277 of file lStdHep.hh.

Referenced by cleanup(), print(), read(), and lStdHep::readEvent().

long* lStdHep::EventTable::ptrEvents
 

Definition at line 282 of file lStdHep.hh.

Referenced by cleanup(), print(), read(), and lStdHep::readEvent().

long* lStdHep::EventTable::runnums
 

Definition at line 280 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

long* lStdHep::EventTable::storenums
 

Definition at line 279 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

long* lStdHep::EventTable::trigMasks
 

Definition at line 281 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().

const char* lStdHep::EventTable::version
 

Definition at line 269 of file lStdHep.hh.

Referenced by cleanup(), print(), and read().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:09 2004 for LCDG4 by doxygen 1.3.4