Back to index

See source file

CRawDataEvent.h

 
//----------------------------------------------------------------------------- 
//  $Header: /nfs/ceres1/asis/offline/ceres/cool/project/RCS/CRawDataEvent.h,v 2.4 1996/12/10 13:30:23 messer Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Declaration of abstract class CRawDataEvent. 
// 
//----------------------------------------------------------------------------- 
#ifndef CRAWDATAEVENT_H 
#define CRAWDATAEVENT_H 
 
#include "CLabel.h" 
#include "CLabelId.h" 
#include "rw/tpdlist.h" 
 
class Cifstream; 
class Cofstream; 
 
CEventType CGetEventType(CLabel*);        // returns event type of given label 
 
class CRawDataEvent { 
public: 
   CRawDataEvent(); 
   virtual ~CRawDataEvent(); 
 
public: 
   void readEvent(Cifstream&);              // read complete event 
   void writeEvent(Cofstream&);             // write complete event 
   virtual void unpackRootLabel() = 0;      // to be provided by derived classes 
   void listLabels(ostream& = cout);        // short listing of stored labels 
   int getEventLength();                    // return total event length (words) 
   const CLabel* getLabel(CLabelId);        // return label for given id (null pointer if not present) 
public: 
   inline int                        getRunNumber() const {return runNumber;} 
   inline const CDate&               getDate()      const {return date;} 
   inline const CTime&               getTime()      const {return time;} 
   inline CEventType                 getEventType() const {return eventType;} 
   inline const RWTPtrDlist<CLabel>& getLabelList() const {return labelList;} 
   inline const CLabel*              getRootLabel() const {return rootLabel;} 
    
protected: 
   CEventType eventType; 
   CDate      date; 
   CTime      time; 
   int        runNumber; 
    
protected: 
   RWTPtrDlist<CLabel> labelList; 
   CLabel              *rootLabel; 
}; 
 
#endif /* CRAWDATAEVENT_H */ 

Back to index

See source file