CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/EventFilter/CSCRawToDigi/interface/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 #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   int dmb_full() const { return dmb_full_;}
00028   void setDMBDAV(int dduInput);
00029   int live_cscs() const {return live_cscs_;}
00030   int output_path_status() const {return output_path_;}
00031   static unsigned sizeInWords() {return 12;}
00032   void setSourceId(unsigned sourceId) {source_id_ = sourceId;}
00033   unsigned short * data() {return (unsigned short *) this;}
00034   bool check() const;
00035 
00036   // gets some data filled by the event data
00037   friend class CSCDDUEventData;
00038  private:
00040   void init();
00041    
00042   unsigned s_link_status_  : 4;
00043   unsigned format_version_ : 4;
00044   unsigned source_id_      : 12;
00045   unsigned bxnum_          : 12;
00046 
00047   unsigned lvl1num_        : 24;
00048   unsigned event_type_     : 4;
00050   unsigned bit64_          : 4;
00051 
00053   unsigned dmb_full_  : 16;
00054   unsigned header2_1_ : 16;
00055   unsigned header2_2_ : 16;
00056   unsigned header2_3_ : 16;
00057  
00058 
00059   unsigned ncsc_        : 4; 
00060   unsigned tts_status_  : 4;
00061   unsigned boe_status_  : 8;
00062   unsigned dmb_dav_     : 16;
00063   unsigned output_path_ : 16;
00064   unsigned live_cscs_   : 16;
00065 
00066 };
00067 #endif