CMS 3D CMS Logo

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     
00054     //
00055     // static member functions
00056     //
00057     static unsigned int size(unsigned int payloadSize);
00058     
00059     
00060   private:
00061     //
00062     // member data
00063     //
00064     unsigned int index_;
00065     unsigned int fuResourceId_;
00066     unsigned int buResourceId_;
00067     unsigned int evtNumber_;
00068     unsigned int payloadSize_;
00069     unsigned int nFed_;
00070     unsigned int nSuperFrag_;
00071     unsigned int fedSizeOffset_;
00072     unsigned int fedOffset_;
00073     unsigned int superFragSizeOffset_;
00074     unsigned int superFragOffset_;
00075     unsigned int payloadOffset_;
00076     unsigned int payloadPosition_;
00077     
00078   };
00079 
00080   
00081 } // namespace evf
00082 
00083 
00084 #endif

Generated on Tue Jun 9 17:34:47 2009 for CMSSW by  doxygen 1.5.4