CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/EventFilter/CSCRawToDigi/interface/CSCALCTHeader2007.h

Go to the documentation of this file.
00001 #ifndef CSCRawToDigi_CSCALCTHeader2007_h
00002 #define CSCRawToDigi_CSCALCTHeader2007_h
00003 
00009 #include <bitset>
00010 #include <vector>
00011 #include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
00012 #include <boost/dynamic_bitset.hpp>
00013 #include <string.h>
00014 
00015 class CSCDMBHeader;
00016 
00017 struct CSCALCT {
00018   CSCALCT();
00019   CSCALCT(const CSCALCTDigi & alctDigi);
00020   static short unsigned int sizeInWords() {return 1; }
00021 
00022   unsigned valid   : 1;
00023   unsigned quality : 2;
00024   unsigned accel   : 1;
00025   unsigned pattern : 1;
00026   unsigned keyWire : 7;
00027   unsigned reserved: 4;
00028 };
00029 
00030 
00031 struct CSCALCTHeader2007 {
00032   CSCALCTHeader2007();
00033   explicit CSCALCTHeader2007(int chamberType);
00034 
00035   void setEventInformation(const CSCDMBHeader &);
00036 
00037   short unsigned int sizeInWords() const { 
00038     return 8;
00039   }
00040 
00041   unsigned flag1                : 16;
00042 
00043   unsigned bxnL1A               : 12;
00044   unsigned reserved1            : 4;
00045 
00046   unsigned l1aCounter           : 12;
00047   unsigned reserved2            : 4;
00048 
00049   unsigned readoutCounter       : 12;
00050   unsigned reserved3            : 4;
00051 
00052   unsigned bxnCount             : 12;
00053   unsigned rawOverflow          : 1;
00054   unsigned lctOverflow          : 1;
00055   unsigned configPresent        : 1;
00056   unsigned flag3                : 1;
00057 
00058   unsigned bxnBeforeReset       : 12;
00059   unsigned flag2                : 4;
00060 
00061   unsigned boardType            : 3;
00062   unsigned backwardForward      : 1;
00063   unsigned negativePositive     : 1;
00064   unsigned mirrored             : 1;
00065   unsigned qualityCancell       : 1;
00066   unsigned latencyClocks        : 1;
00067   unsigned patternB             : 1;
00068   unsigned widePattern          : 1;
00069   unsigned reserved0            : 2;
00070   unsigned flag0                : 4;  
00071    
00072   unsigned rawBins              : 5;
00073   unsigned lctBins              : 4;
00074   unsigned firmwareVersion      : 6;
00075   unsigned flag4                : 1;
00076 };
00077 
00078 struct CSCVirtexID {
00079   CSCVirtexID() {
00080     bzero(this,  sizeInWords()*2); 
00081   }
00082 
00083   short unsigned int sizeInWords() const { 
00084     return 3;
00085   }
00086 
00087   unsigned virtexIDLow  : 15;
00088   unsigned flag0        : 1; 
00089   
00090   unsigned virtexIDMed  : 15;
00091   unsigned flag1        : 1; 
00092 
00093   unsigned virtexIDHigh : 10; 
00094   unsigned trReg        : 3;
00095   unsigned reserved     : 2;
00096   unsigned flag2        : 1; 
00097 };
00098 
00099 struct CSCConfigurationRegister {
00100   CSCConfigurationRegister()  {
00101     bzero(this, sizeInWords()*2); 
00102   }
00103 
00104   short unsigned int sizeInWords() const { 
00105     return 5;
00106   }
00107 
00108 
00109   unsigned configRegister0  : 15;
00110   unsigned flag0            : 1; 
00111 
00112   unsigned configRegister1  : 15;
00113   unsigned flag1            : 1; 
00114 
00115   unsigned configRegister2  : 15;
00116   unsigned flag2            : 1; 
00117 
00118   unsigned configRegister3  : 15;
00119   unsigned flag3            : 1; 
00120 
00121   unsigned configRegister4  : 9;
00122   unsigned reserved         : 6;
00123   unsigned flag4            : 1; 
00124 };
00125 
00126 struct CSCCollisionMask {
00127   CSCCollisionMask()  {
00128     bzero(this, sizeInWords()*2);
00129   }
00130 
00131   short unsigned int sizeInWords() const { 
00132     return 1;
00133   }
00134 
00135   unsigned collisionMaskRegister  : 14;
00136   unsigned reserved               : 1;
00137   unsigned flag                   : 1; 
00138 };
00139 
00140 struct CSCHotChannelMask {
00141   CSCHotChannelMask()  {
00142     bzero(this, sizeInWords()*2);
00143   }
00144 
00145   short unsigned int sizeInWords() const { 
00146     return 1;
00147   }
00148 
00149   unsigned hotChannelMask  : 12;
00150   unsigned reserved        : 3;
00151   unsigned flag            : 1; 
00152 };
00153 
00154 #endif