CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/EventFilter/CSCRawToDigi/interface/CSCDDUHeader.h

Go to the documentation of this file.
00001 /* CSCDDUHeader 4/24/03 A.Tumanov
00002  * documented at  http://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 #include <cstring>
00009 
00010 class CSCDDUHeader {
00011 
00012  public:
00013   CSCDDUHeader();
00014   CSCDDUHeader(unsigned bx, unsigned l1num, unsigned sourceId);
00015   CSCDDUHeader(const CSCDDUStatusDigi & digi)
00016     {
00017       memcpy(this, digi.header(), sizeInWords()*2);
00018     }
00019   int s_link_status() const { return s_link_status_;}
00020   int format_version() const { return format_version_;}
00021   int source_id() const { return source_id_;}
00022   int bxnum() const { return bxnum_;}
00023   int lvl1num() const { return lvl1num_;}
00024   int event_type() const { return event_type_;}
00025   int ncsc() const { return ncsc_;}
00026   int dmb_dav() const { return dmb_dav_;}
00027   void setDMBDAV(int dduInput);
00028   int live_cscs() const {return live_cscs_;}
00029   static unsigned sizeInWords() {return 12;}
00030   void setSourceId(unsigned sourceId) {source_id_ = sourceId;}
00031   unsigned short * data() {return (unsigned short *) this;}
00032   bool check() const;
00033 
00034   // gets some data filled by the event data
00035   friend class CSCDDUEventData;
00036  private:
00038   void init();
00039    
00040   unsigned s_link_status_  : 4;
00041   unsigned format_version_ : 4;
00042   unsigned source_id_      : 12;
00043   unsigned bxnum_          : 12;
00044 
00045   unsigned lvl1num_        : 24;
00046   unsigned event_type_     : 4;
00048   unsigned bit64_          : 4;
00049 
00051   unsigned dmb_full_  : 16;
00052   unsigned header2_1_ : 16;
00053   unsigned header2_2_ : 16;
00054   unsigned header2_3_ : 16;
00055  
00056 
00057   unsigned ncsc_        : 4; 
00058   unsigned tts_status_  : 4;
00059   unsigned boe_status_  : 8;
00060   unsigned dmb_dav_     : 16;
00061   unsigned output_path_ : 16;
00062   unsigned live_cscs_   : 16;
00063 
00064 };
00065 #endif