CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/EventFilter/AutoBU/interface/BUEvent.h

Go to the documentation of this file.
00001 #ifndef BUEVENT_H
00002 #define BUEVENT_H 1
00003 
00004 
00005 namespace evf
00006 {
00007 
00008   class BUEvent
00009   {
00010   public:
00011     //
00012     // construction/destruction
00013     //
00014     BUEvent(unsigned int buResourceId,unsigned int bufferSize=0x400000);
00015     virtual ~BUEvent();
00016     
00017 
00018     //
00019     // member functions
00020     //
00021     void           initialize(unsigned int evtNumber);
00022     
00023     bool           writeFed(unsigned int id,unsigned char* data,unsigned int size);
00024     bool           writeFedHeader(unsigned int i);
00025     bool           writeFedTrailer(unsigned int i);
00026     
00027     unsigned int   buResourceId()          const { return buResourceId_; }
00028     unsigned int   evtNumber()             const { return evtNumber_; }
00029     unsigned int   evtSize()               const { return evtSize_; }
00030     unsigned int   bufferSize()            const { return bufferSize_; }
00031     unsigned int   nFed()                  const { return nFed_; }
00032     unsigned int   fedId(unsigned int i)   const { return fedId_[i]; }
00033     unsigned int   fedSize(unsigned int i) const { return fedSize_[i]; }
00034     unsigned char* fedAddr(unsigned int i) const;
00035     
00036     static bool    computeCrc() { return computeCrc_; }
00037     static void    setComputeCrc(bool computeCrc) { computeCrc_=computeCrc; }
00038 
00039     void           dump();
00040     
00041     
00042   private:
00043     //
00044     // member data
00045     //
00046     unsigned int   buResourceId_;
00047     unsigned int   evtNumber_;
00048     unsigned int   evtSize_;
00049     unsigned int   bufferSize_;
00050     unsigned int   nFed_;
00051     unsigned int  *fedId_;
00052     unsigned int  *fedPos_;
00053     unsigned int  *fedSize_;
00054     unsigned char *buffer_;
00055 
00056     static bool    computeCrc_;
00057     
00058   };
00059   
00060   
00061 } // namespace evf
00062 
00063 
00064 #endif