CMS 3D CMS Logo

CSCALCTHeader2006.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCRawToDigi_CSCALCTHeader2006_h
2 #define EventFilter_CSCRawToDigi_CSCRawToDigi_CSCALCTHeader2006_h
3 
4 #include <vector>
5 #include <cstring>
6 #include <strings.h>
8 class CSCDMBHeader;
9 
13 
14  explicit CSCALCTHeader2006(int chamberType);
15 
16  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
17 
18  void init() {
19  bzero(this, sizeInWords() * 2);
20  }
21 
22  short unsigned int sizeInWords() const {
23  return 4;
24  }
25 
26  unsigned short int BXNCount() const { return bxnCount; }
27 
28  unsigned short nLCTChipRead() const;
29 
30  void setEventInformation(const CSCDMBHeader&);
31 
32  void setDAV(int afebBoard) { activeFEBs |= 1 << afebBoard; }
33 
35  unsigned l1Acc : 4;
37  unsigned cscID : 4;
39  unsigned boardID : 3;
41  unsigned flag_0 : 5;
42 
44  unsigned fifoMode : 2;
46  unsigned nTBins : 5;
48  unsigned l1aMatch : 1;
50  unsigned extTrig : 1;
52  unsigned promote1 : 1;
54  unsigned promote2 : 1;
56  unsigned reserved_1 : 3;
58  unsigned flag_1 : 2;
59 
61  unsigned bxnCount : 12;
63  unsigned reserved_2 : 2;
65  unsigned flag_2 : 2;
66 
68  unsigned lctChipRead : 7;
70  unsigned activeFEBs : 7;
72  unsigned flag_3 : 2;
73 };
74 
75 struct CSCALCTs2006 {
77  bzero(this, 8);
78  }
79 
80  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
81 
82  short unsigned int sizeInWords() const {
83  return 4;
84  }
85 
86  std::vector<CSCALCTDigi> ALCTDigis() const;
87 
89  void add(const std::vector<CSCALCTDigi>& digis);
90  void addALCT0(const CSCALCTDigi& digi);
91  void addALCT1(const CSCALCTDigi& digi);
92 
95  unsigned alct0_valid : 1;
96  unsigned alct0_quality : 2;
97  unsigned alct0_accel : 1;
98  unsigned alct0_pattern : 1;
99  unsigned alct0_key_wire : 7;
100  unsigned alct0_bxn_low : 3;
102  unsigned flag_4 : 1;
103 
104  unsigned alct0_bxn_high : 2;
105  unsigned alct0_reserved : 13;
107  unsigned flag_5 : 1;
108 
110  unsigned alct1_valid : 1;
111  unsigned alct1_quality : 2;
112  unsigned alct1_accel : 1;
113  unsigned alct1_pattern : 1;
114  unsigned alct1_key_wire : 7;
115  unsigned alct1_bxn_low : 3;
116  unsigned flag_6 : 1;
117 
118  unsigned alct1_bxn_high : 2;
119  unsigned alct1_reserved : 13;
120  unsigned flag_7 : 1;
121 };
122 
123 #endif
CSCALCTHeader2006::promote1
unsigned promote1
promotion bit for 1st LCT pattern
Definition: CSCALCTHeader2006.h:52
CSCALCTs2006::ALCTDigis
std::vector< CSCALCTDigi > ALCTDigis() const
Definition: CSCALCTHeader2006.cc:44
CSCALCTHeader2006::cscID
unsigned cscID
chamber ID number
Definition: CSCALCTHeader2006.h:37
CSCALCTs2006
Definition: CSCALCTHeader2006.h:75
CSCALCTHeader2006::fifoMode
unsigned fifoMode
see the FIFO_MODE enum
Definition: CSCALCTHeader2006.h:44
CSCALCTs2006::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2006.h:82
CSCALCTs2006::alct0_valid
unsigned alct0_valid
Definition: CSCALCTHeader2006.h:95
CSCALCTs2006::alct1_pattern
unsigned alct1_pattern
Definition: CSCALCTHeader2006.h:113
CSCALCTs2006::add
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn't for now
Definition: CSCALCTHeader2006.cc:57
CSCALCTHeader2006::lctChipRead
unsigned lctChipRead
LCT chips read out in raw hit dump.
Definition: CSCALCTHeader2006.h:68
CSCALCTHeader2006::extTrig
unsigned extTrig
trigger source was external
Definition: CSCALCTHeader2006.h:50
CSCALCTs2006::alct1_reserved
unsigned alct1_reserved
Definition: CSCALCTHeader2006.h:119
CSCALCTs2006::alct0_key_wire
unsigned alct0_key_wire
Definition: CSCALCTHeader2006.h:99
CSCALCTHeader2006::l1Acc
unsigned l1Acc
l1 accept counter
Definition: CSCALCTHeader2006.h:35
CSCALCTHeader2006::setEventInformation
void setEventInformation(const CSCDMBHeader &)
Definition: CSCALCTHeader2006.cc:28
CSCALCTs2006::alct0_pattern
unsigned alct0_pattern
Definition: CSCALCTHeader2006.h:98
CSCALCTHeader2006::bxnCount
unsigned bxnCount
full bunch crossing number
Definition: CSCALCTHeader2006.h:61
CSCALCTHeader2006::activeFEBs
unsigned activeFEBs
LCT chips with ADB hits.
Definition: CSCALCTHeader2006.h:70
CSCALCTHeader2006::flag_0
unsigned flag_0
should be '01100', so it'll be a 6xxx in the ASCII dump
Definition: CSCALCTHeader2006.h:41
CSCALCTs2006::alct0_quality
unsigned alct0_quality
Definition: CSCALCTHeader2006.h:96
CSCALCTs2006::flag_7
unsigned flag_7
Definition: CSCALCTHeader2006.h:120
CSCALCTs2006::flag_6
unsigned flag_6
Definition: CSCALCTHeader2006.h:116
CSCALCTDigi.h
CSCALCTs2006::CSCALCTs2006
CSCALCTs2006()
Definition: CSCALCTHeader2006.h:76
CSCALCTHeader2006::setDAV
void setDAV(int afebBoard)
for packing
Definition: CSCALCTHeader2006.h:32
CSCALCTs2006::alct0_bxn_low
unsigned alct0_bxn_low
Definition: CSCALCTHeader2006.h:100
CSCALCTHeader2006::CSCALCTHeader2006
CSCALCTHeader2006()
this struct contains all 2006 ALCT Header words except ALCTs
Definition: CSCALCTHeader2006.h:12
CSCALCTHeader2006::promote2
unsigned promote2
promotion bit for 2nd LCT pattern
Definition: CSCALCTHeader2006.h:54
CSCALCTHeader2006::init
void init()
Definition: CSCALCTHeader2006.h:18
CSCALCTs2006::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2006.h:80
CSCALCTs2006::alct1_accel
unsigned alct1_accel
Definition: CSCALCTHeader2006.h:112
CSCALCTs2006::alct1_valid
unsigned alct1_valid
2nd LCT lower 15 bits
Definition: CSCALCTHeader2006.h:110
CSCALCTs2006::alct1_quality
unsigned alct1_quality
Definition: CSCALCTHeader2006.h:111
CSCALCTs2006::alct1_key_wire
unsigned alct1_key_wire
Definition: CSCALCTHeader2006.h:114
CSCALCTs2006::addALCT0
void addALCT0(const CSCALCTDigi &digi)
Definition: CSCALCTHeader2006.cc:65
CSCALCTs2006::alct0_reserved
unsigned alct0_reserved
Definition: CSCALCTHeader2006.h:105
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCALCTs2006::flag_5
unsigned flag_5
DDU+LCT special word flags.
Definition: CSCALCTHeader2006.h:107
CSCALCTHeader2006::reserved_1
unsigned reserved_1
reserved, set to 0
Definition: CSCALCTHeader2006.h:56
CSCALCTHeader2006::nTBins
unsigned nTBins
Definition: CSCALCTHeader2006.h:46
CSCALCTs2006::alct1_bxn_low
unsigned alct1_bxn_low
Definition: CSCALCTHeader2006.h:115
CSCALCTs2006::alct1_bxn_high
unsigned alct1_bxn_high
Definition: CSCALCTHeader2006.h:118
CSCALCTHeader2006::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2006.h:22
CSCALCTHeader2006::reserved_2
unsigned reserved_2
reserved, set to 0
Definition: CSCALCTHeader2006.h:63
CSCALCTs2006::flag_4
unsigned flag_4
DDU+LCT special word flags.
Definition: CSCALCTHeader2006.h:102
CSCDMBHeader
Definition: CSCDMBHeader.h:15
CSCALCTHeader2006::flag_3
unsigned flag_3
DDU+LCT special word flags.
Definition: CSCALCTHeader2006.h:72
CSCALCTHeader2006::l1aMatch
unsigned l1aMatch
exteran L1A arrived in L1A window
Definition: CSCALCTHeader2006.h:48
CSCALCTHeader2006::flag_1
unsigned flag_1
DDU+LCT special word flags.
Definition: CSCALCTHeader2006.h:58
CSCALCTHeader2006::BXNCount
unsigned short int BXNCount() const
Definition: CSCALCTHeader2006.h:26
CSCALCTDigi
Definition: CSCALCTDigi.h:17
CSCALCTHeader2006::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2006.h:16
CSCALCTs2006::alct0_accel
unsigned alct0_accel
Definition: CSCALCTHeader2006.h:97
CSCALCTHeader2006::boardID
unsigned boardID
ALCT2000 board ID.
Definition: CSCALCTHeader2006.h:39
CSCALCTHeader2006::nLCTChipRead
unsigned short nLCTChipRead() const
Definition: CSCALCTHeader2006.cc:35
CSCALCTs2006::alct0_bxn_high
unsigned alct0_bxn_high
Definition: CSCALCTHeader2006.h:104
CSCALCTs2006::addALCT1
void addALCT1(const CSCALCTDigi &digi)
Definition: CSCALCTHeader2006.cc:75
CSCALCTHeader2006::flag_2
unsigned flag_2
DDU+LCT special word flags.
Definition: CSCALCTHeader2006.h:65
CSCALCTHeader2006
ALCT Header consists of several modular units that are defined as structs below.
Definition: CSCALCTHeader2006.h:11