CMS 3D CMS Logo

CSCDDUHeader.h

Go to the documentation of this file.
00001 /* CSCDDUHeader 4/24/03 A.Tumanov
00002  * documented at  https://www.physics.ohio-state.edu/~cms/ddu/
00003  */
00004 
00005 #ifndef CSCDDUHeader_h
00006 #define CSCDDUHeader_h
00007 #include "DataFormats/CSCDigi/interface/CSCDDUStatusDigi.h"
00008 
00009 class CSCDDUHeader {
00010 
00011  public:
00012   CSCDDUHeader();
00013   CSCDDUHeader(unsigned bx, unsigned l1num, unsigned sourceId);
00014   CSCDDUHeader(const CSCDDUStatusDigi & digi)
00015     {
00016       memcpy(this, digi.header(), sizeInWords()*2);
00017     }
00018   int s_link_status() const { return s_link_status_;}
00019   int format_version() const { return format_version_;}
00020   int source_id() const { return source_id_;}
00021   int bxnum() const { return bxnum_;}
00022   int lvl1num() const { return lvl1num_;}
00023   int event_type() const { return event_type_;}
00024   int ncsc() const { return ncsc_;}
00025   int dmb_dav() const { return dmb_dav_;}
00026   void setDMBDAV(int dmbId);
00027   int live_cscs() const {return live_cscs_;}
00028   static unsigned sizeInWords() {return 12;}
00029   void setSourceId(unsigned sourceId) {source_id_ = sourceId;}
00030   unsigned short * data() {return (unsigned short *) this;}
00031   bool check() const;
00032 
00033   // gets some data filled by the event data
00034   friend class CSCDDUEventData;
00035  private:
00037   void init();
00038    
00039   unsigned s_link_status_  : 4;
00040   unsigned format_version_ : 4;
00041   unsigned source_id_      : 12;
00042   unsigned bxnum_          : 12;
00043 
00044   unsigned lvl1num_        : 24;
00045   unsigned event_type_     : 4;
00047   unsigned bit64_          : 4;
00048 
00050   unsigned dmb_full_  : 16;
00051   unsigned header2_1_ : 16;
00052   unsigned header2_2_ : 16;
00053   unsigned header2_3_ : 16;
00054  
00055 
00056   unsigned ncsc_        : 4; 
00057   unsigned tts_status_  : 4;
00058   unsigned boe_status_  : 8;
00059   unsigned dmb_dav_     : 16;
00060   unsigned output_path_ : 16;
00061   unsigned live_cscs_   : 16;
00062 
00063 };
00064 #endif

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