CMS 3D CMS Logo

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 "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
00006 class CSCDMBHeader;
00007 
00009 struct CSCALCTHeader2006 { 
00010   CSCALCTHeader2006()  {
00011     init();
00012   }
00013 
00014   explicit CSCALCTHeader2006(int chamberType);
00015 
00016   void init() {
00017      bzero(this,  sizeInWords()*2); 
00018   }
00019 
00020   short unsigned int sizeInWords() const { 
00021     return 4;
00022   }
00023 
00024   unsigned short int BXNCount() const { return bxnCount;}
00025 
00026   unsigned short nLCTChipRead() const;
00027 
00028   void setEventInformation(const CSCDMBHeader &);
00029 
00030   void setDAV(int afebBoard) {activeFEBs |= 1 << afebBoard;}
00031 
00033   unsigned l1Acc         : 4;
00035   unsigned cscID         : 4;
00037   unsigned boardID       : 3;
00039   unsigned flag_0 : 5;
00040 
00042   unsigned fifoMode : 2;
00044   unsigned nTBins : 5;
00046   unsigned l1aMatch : 1;
00048   unsigned extTrig : 1;
00050   unsigned promote1 : 1;
00052   unsigned promote2 : 1;
00054   unsigned reserved_1 : 3;
00056   unsigned flag_1 : 2;
00057 
00059   unsigned bxnCount : 12;
00061   unsigned reserved_2 : 2;
00063   unsigned flag_2 : 2;
00064 
00066   unsigned lctChipRead : 7;
00068   unsigned activeFEBs : 7;
00070   unsigned flag_3 : 2;
00071 
00072 };
00073 
00074 
00075 struct CSCALCTs2006 {
00076   CSCALCTs2006() {
00077     bzero(this, 8); 
00078   }
00079 
00080   short unsigned int sizeInWords() const { 
00081     return 4;
00082   }
00083 
00084   std::vector<CSCALCTDigi> ALCTDigis() const;
00085 
00087   void add(const std::vector<CSCALCTDigi> & digis);
00088   void addALCT0(const CSCALCTDigi & digi);
00089   void addALCT1(const CSCALCTDigi & digi);
00090 
00093   unsigned alct0_valid   : 1;
00094   unsigned alct0_quality : 2;
00095   unsigned alct0_accel   : 1;
00096   unsigned alct0_pattern : 1;
00097   unsigned alct0_key_wire: 7;
00098   unsigned alct0_bxn_low : 3;
00100   unsigned flag_4 : 1;
00101 
00102   unsigned alct0_bxn_high :2;
00103   unsigned alct0_reserved :13;
00105   unsigned flag_5 : 1;
00106 
00108   unsigned alct1_valid   : 1;
00109   unsigned alct1_quality : 2;
00110   unsigned alct1_accel   : 1;
00111   unsigned alct1_pattern : 1;
00112   unsigned alct1_key_wire: 7;
00113   unsigned alct1_bxn_low : 3;
00114   unsigned flag_6 : 1;
00115 
00116   unsigned alct1_bxn_high :2;
00117   unsigned alct1_reserved :13;
00118   unsigned flag_7 : 1;
00119 };
00120 
00121 
00122 
00123 
00124 
00125 #endif

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