CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/EventFilter/ShmBuffer/interface/FUShmRawCell.h

Go to the documentation of this file.
00001 #ifndef FUSHMRAWCELL_H
00002 #define FUSHMRAWCELL_H 1
00003 
00004 
00005 namespace evf {
00006 
00007   class FUShmRawCell
00008   {
00009   public:
00010     //
00011     // construction/destruction
00012     //
00013     FUShmRawCell(unsigned int payloadSize);
00014     ~FUShmRawCell();
00015     
00016     
00017     //
00018     // member functions
00019     //
00020     void           initialize(unsigned int index);
00021     
00022     unsigned int   index()                        const { return index_; }
00023     unsigned int   fuResourceId()                 const { return fuResourceId_; }
00024     unsigned int   buResourceId()                 const { return buResourceId_; }
00025     unsigned int   evtNumber()                    const { return evtNumber_; }
00026 
00027     unsigned int   payloadSize()                  const { return payloadSize_; }
00028     unsigned char* payloadAddr()                  const;
00029     
00030     unsigned int   nFed()                         const { return nFed_; }
00031     unsigned int   fedSize(unsigned int i)        const;
00032     unsigned char* fedAddr(unsigned int i)        const;
00033     
00034     unsigned int   nSuperFrag()                   const { return nSuperFrag_; }
00035     unsigned int   superFragSize(unsigned int i)  const;
00036     unsigned char* superFragAddr(unsigned int i)  const;
00037     
00038     unsigned int   eventSize()                    const;
00039 
00040     void           setFuResourceId(unsigned int id) { fuResourceId_=id; }
00041     void           setBuResourceId(unsigned int id) { buResourceId_=id; }
00042     void           setEvtNumber(unsigned int evt)   { evtNumber_   =evt; }
00043 
00044     void           clear();
00045     void           dump() const;
00046     
00047     unsigned int   readFed(unsigned int i,unsigned char*buffer) const;
00048     unsigned char* writeData(unsigned char*data,unsigned int dataSize);
00049 
00050     bool           markFed(unsigned int i,unsigned int size,unsigned char*addr);
00051     bool           markSuperFrag(unsigned int i,unsigned int size,unsigned char*addr);
00052 
00053     void           setLumiSection(unsigned int);
00054     unsigned int   getLumiSection() const {return lumiSection_;}
00055     //
00056     // static member functions
00057     //
00058     static unsigned int size(unsigned int payloadSize);
00059     
00060     
00061   private:
00062     //
00063     // member data
00064     //
00065     unsigned int index_;
00066     unsigned int fuResourceId_;
00067     unsigned int buResourceId_;
00068     unsigned int evtNumber_;
00069     unsigned int payloadSize_;
00070     unsigned int nFed_;
00071     unsigned int nSuperFrag_;
00072     unsigned int lumiSection_;
00073     unsigned int fedSizeOffset_;
00074     unsigned int fedOffset_;
00075     unsigned int superFragSizeOffset_;
00076     unsigned int superFragOffset_;
00077     unsigned int payloadOffset_;
00078     unsigned int payloadPosition_;
00079     
00080   };
00081 
00082   
00083 } // namespace evf
00084 
00085 
00086 #endif