CMS 3D CMS Logo

CSCTMBHeader2006.h

Go to the documentation of this file.
00001 #ifndef CSCTMBHeader2006_h
00002 #define CSCTMBHeader2006_h
00003 #include "EventFilter/CSCRawToDigi/interface/CSCVTMBHeaderFormat.h"
00004 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00005 
00006 
00007 struct CSCTMBHeader2006 : public CSCVTMBHeaderFormat {
00008   enum {NWORDS=27};
00009   CSCTMBHeader2006();
00010   explicit CSCTMBHeader2006(const unsigned short * buf);
00011   virtual void setEventInformation(const CSCDMBHeader & dmbHeader);
00012 
00013   virtual uint16_t BXNCount() const {return bits.bxnCount;}
00014   virtual uint16_t ALCTMatchTime() const {return bits.alctMatchTime;}
00015   virtual uint16_t CLCTOnly() const {return bits.clctOnly;}
00016   virtual uint16_t ALCTOnly() const {return bits.alctOnly;}
00017   virtual uint16_t TMBMatch() const {return bits.tmbMatch;}
00018   virtual uint16_t Bxn0Diff() const {return bits.bxn0Diff;}
00019   virtual uint16_t Bxn1Diff() const {return bits.bxn1Diff;}
00020   virtual uint16_t L1ANumber() const {return bits.l1aNumber;}
00021   virtual uint16_t NTBins() const {return bits.nTBins;}
00022   virtual uint16_t NCFEBs() const {return bits.nCFEBs;}
00023   virtual uint16_t firmwareRevision() const {return bits.firmRevCode;}
00024 
00026   virtual std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer);
00028   virtual std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const;
00029  
00032   unsigned short int sizeInWords() const {return NWORDS;}
00033 
00034   virtual unsigned short int NHeaderFrames() const {return bits.nHeaderFrames;}
00036   virtual unsigned short * data() {return (unsigned short *)(&bits);}
00037   virtual bool check() const {return bits.e0bline==0x6e0b && NHeaderFrames()+1 == NWORDS;}
00038 
00040   virtual void addCLCT0(const CSCCLCTDigi & digi);
00041   virtual void addCLCT1(const CSCCLCTDigi & digi);
00042   virtual void addALCT0(const CSCALCTDigi & digi);
00043   virtual void addALCT1(const CSCALCTDigi & digi);
00044   virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi & digi);
00045   virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi & digi);
00046 
00047   void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
00048 
00049   virtual void print(std::ostream & os) const;
00050     struct {
00051       unsigned b0cline:16;
00052       unsigned nTBins:5, dumpCFEBs:7, fifoMode:3, reserved_1:1;
00053       unsigned l1aNumber:4, cscID:4, boardID:5, l1atype:2, reserved_2:1 ;
00054       unsigned bxnCount:12, r_type:2, reserved_3:2;
00055       unsigned nHeaderFrames:5, nCFEBs:3, hasBuf:1, preTrigTBins:5, reserved_4:2;
00056       unsigned l1aTxCounter:4, trigSourceVect:8, hasPreTrig:4;
00057       unsigned activeCFEBs:5, CFEBsInstantiated:5, runID:4, reserved_6:2;
00058       unsigned bxnPreTrigger:12, syncError:1, reserved_7:3;
00059 
00060       unsigned clct0_valid      :1;
00061       unsigned clct0_quality    :3;
00062       unsigned clct0_shape      :3;
00063       unsigned clct0_strip_type :1;
00064       unsigned clct0_bend       :1;
00065       unsigned clct0_key        :5;
00066       unsigned clct0_cfeb_low   :1;
00067       unsigned reserved_8       :1;
00068 
00069       unsigned clct1_valid      :1;
00070       unsigned clct1_quality    :3;
00071       unsigned clct1_shape      :3;
00072       unsigned clct1_strip_type :1;
00073       unsigned clct1_bend       :1;
00074       unsigned clct1_key        :5;
00075       unsigned clct1_cfeb_low   :1;
00076       unsigned reserved_9       :1;
00077 
00078       unsigned clct0_cfeb_high  :2;
00079       unsigned clct0_bxn        :2;
00080       unsigned clct0_sync_err   :1;
00081       unsigned clct0_bx0_local  :1;
00082       unsigned clct1_cfeb_high  :2;
00083       unsigned clct1_bxn        :2;
00084       unsigned clct1_sync_err   :1;
00085       unsigned clct1_bx0_local  :1;
00086       unsigned invalidPattern   :1;
00087       unsigned reserved_10      :3;
00088 
00089       unsigned tmbMatch:1, alctOnly:1, clctOnly:1, bxn0Diff:2, bxn1Diff:2,
00090                alctMatchTime:4, reserved_11:5;
00091 
00092       unsigned MPC_Muon0_wire_         : 7;
00093       unsigned MPC_Muon0_clct_pattern_ : 4;
00094       unsigned MPC_Muon0_quality_      : 4;
00095       unsigned reserved_12:1;
00096 
00097       unsigned MPC_Muon0_halfstrip_clct_pattern : 8;
00098       unsigned MPC_Muon0_bend_                  : 1;
00099       unsigned MPC_Muon0_SyncErr_               : 1;
00100       unsigned MPC_Muon0_bx_                    : 1;
00101       unsigned MPC_Muon0_bc0_                   : 1;
00102       unsigned MPC_Muon0_cscid_low              : 3;
00103       unsigned reserved_13:1;
00104 
00105       unsigned MPC_Muon1_wire_         : 7;
00106       unsigned MPC_Muon1_clct_pattern_ : 4;
00107       unsigned MPC_Muon1_quality_      : 4;
00108       unsigned reserved_14:1;
00109 
00110       unsigned MPC_Muon1_halfstrip_clct_pattern : 8;
00111       unsigned MPC_Muon1_bend_                  : 1;
00112       unsigned MPC_Muon1_SyncErr_               : 1;
00113       unsigned MPC_Muon1_bx_                    : 1;
00114       unsigned MPC_Muon1_bc0_                   : 1;
00115       unsigned MPC_Muon1_cscid_low              : 3;
00116       unsigned reserved_15:1;
00117 
00118       unsigned MPC_Muon0_vpf_        : 1;
00119       unsigned MPC_Muon0_cscid_bit4  : 1;
00120       unsigned MPC_Muon1_vpf_        : 1;
00121       unsigned MPC_Muon1_cscid_bit4  : 1;
00122       unsigned mpcAcceptLCT0         : 1;
00123       unsigned mpcAcceptLCT1         : 1;
00124       unsigned reserved_16_1         : 2;
00125       unsigned hs_thresh             : 3;
00126       unsigned ds_thresh             : 3;
00127       unsigned reserved_16_2:2;
00128 
00129       unsigned buffer_info_0:16;
00130       unsigned r_buf_nbusy:4; unsigned buffer_info_1:12;
00131       unsigned buffer_info_2:16;
00132       unsigned buffer_info_3:16;
00133       unsigned alct_delay:4,clct_width:4,mpc_tx_delay:4,reserved_21:4;
00134 
00135       unsigned rpc_exists:2;
00136       unsigned rd_rpc_list:2;
00137       unsigned rd_nrpcs:2;
00138       unsigned rpc_read_enable:1;
00139       unsigned r_nlayers_hit_vec:3;
00140       unsigned pop_l1a_match_win:4;
00141       unsigned reserved_22:2;
00142 
00143       unsigned bd_status :14;  unsigned reserved_23:2;
00144       unsigned uptime :14;  unsigned reserved_24:2;
00145       unsigned firmRevCode:14, reserved_25:2;
00146       unsigned e0bline:16;
00147     } bits;
00148 
00149 };
00150 
00151 #endif
00152 

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