CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/EventFilter/CSCRawToDigi/interface/CSCALCTHeader2006.h

Go to the documentation of this file.
00001 #ifndef CSCRawToDigi_CSCALCTHeader2006_h
00002 #define CSCRawToDigi_CSCALCTHeader2006_h
00003 
00004 #include <vector>
00005 #include <strings.h>
00006 #include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
00007 class CSCDMBHeader;
00008 
00010 struct CSCALCTHeader2006 { 
00011   CSCALCTHeader2006()  {
00012     init();
00013   }
00014 
00015   explicit CSCALCTHeader2006(int chamberType);
00016 
00017   void init() {
00018      bzero(this,  sizeInWords()*2); 
00019   }
00020 
00021   short unsigned int sizeInWords() const { 
00022     return 4;
00023   }
00024 
00025   unsigned short int BXNCount() const { return bxnCount;}
00026 
00027   unsigned short nLCTChipRead() const;
00028 
00029   void setEventInformation(const CSCDMBHeader &);
00030 
00031   void setDAV(int afebBoard) {activeFEBs |= 1 << afebBoard;}
00032 
00034   unsigned l1Acc         : 4;
00036   unsigned cscID         : 4;
00038   unsigned boardID       : 3;
00040   unsigned flag_0 : 5;
00041 
00043   unsigned fifoMode : 2;
00045   unsigned nTBins : 5;
00047   unsigned l1aMatch : 1;
00049   unsigned extTrig : 1;
00051   unsigned promote1 : 1;
00053   unsigned promote2 : 1;
00055   unsigned reserved_1 : 3;
00057   unsigned flag_1 : 2;
00058 
00060   unsigned bxnCount : 12;
00062   unsigned reserved_2 : 2;
00064   unsigned flag_2 : 2;
00065 
00067   unsigned lctChipRead : 7;
00069   unsigned activeFEBs : 7;
00071   unsigned flag_3 : 2;
00072 
00073 };
00074 
00075 
00076 struct CSCALCTs2006 {
00077   CSCALCTs2006() {
00078     bzero(this, 8); 
00079   }
00080 
00081   short unsigned int sizeInWords() const { 
00082     return 4;
00083   }
00084 
00085   std::vector<CSCALCTDigi> ALCTDigis() const;
00086 
00088   void add(const std::vector<CSCALCTDigi> & digis);
00089   void addALCT0(const CSCALCTDigi & digi);
00090   void addALCT1(const CSCALCTDigi & digi);
00091 
00094   unsigned alct0_valid   : 1;
00095   unsigned alct0_quality : 2;
00096   unsigned alct0_accel   : 1;
00097   unsigned alct0_pattern : 1;
00098   unsigned alct0_key_wire: 7;
00099   unsigned alct0_bxn_low : 3;
00101   unsigned flag_4 : 1;
00102 
00103   unsigned alct0_bxn_high :2;
00104   unsigned alct0_reserved :13;
00106   unsigned flag_5 : 1;
00107 
00109   unsigned alct1_valid   : 1;
00110   unsigned alct1_quality : 2;
00111   unsigned alct1_accel   : 1;
00112   unsigned alct1_pattern : 1;
00113   unsigned alct1_key_wire: 7;
00114   unsigned alct1_bxn_low : 3;
00115   unsigned flag_6 : 1;
00116 
00117   unsigned alct1_bxn_high :2;
00118   unsigned alct1_reserved :13;
00119   unsigned flag_7 : 1;
00120 };
00121 
00122 
00123 
00124 
00125 
00126 #endif