CMS 3D CMS Logo

CSCAnodeData2007.h
Go to the documentation of this file.
1 #ifndef CSCAnodeData2007_h
2 #define CSCAnodeData2007_h
3 
6 #include <cassert>
7 class CSCALCTHeader;
8 
10 public:
11  explicit CSCAnodeDataFrame2007(unsigned short data) { data_ = data; }
13 
15  bool isHit(unsigned wireGroup) const {
16  assert(wireGroup < 12);
17  return ((data_ >> wireGroup) & 0x1);
18  }
19 
20  void addHit(unsigned wireGroup) { data_ |= (1 << wireGroup); }
21 
22  unsigned short data() const { return data_; }
23 
24 private:
25  unsigned short data_ : 12;
26  unsigned short reserved_ : 3;
27  unsigned short flag_ : 1;
28 };
29 
31 public:
33  explicit CSCAnodeData2007(const CSCALCTHeader &);
35  CSCAnodeData2007(const CSCALCTHeader &, const unsigned short *buf);
36 
37  unsigned short *data() override { return theDataFrames; }
39  unsigned short int sizeInWords() const override { return sizeInWords2007_; }
40 
42  std::vector<CSCWireDigi> wireDigis(int layer) const override;
43 
44  void add(const CSCWireDigi &, int layer) override;
45 
46  static void selfTest();
47 
48 private:
49  void init(const CSCALCTHeader &);
50  int index(int tbin, int layer, int layerPart) const;
51  CSCAnodeDataFrame2007 findFrame(int tbin, int layer, int layerPart) const;
52 
54  enum { MAXFRAMES = 2700 };
55  unsigned short theDataFrames[MAXFRAMES];
56  unsigned short int sizeInWords2007_;
57  unsigned short int nAFEBs_;
58  unsigned short int nTimeBins_;
59 
60  unsigned short int layerParts_;
61  unsigned short int maxWireGroups_;
62  unsigned int alctBX_;
63 };
64 
65 #endif
CSCAnodeDataFrame2007::CSCAnodeDataFrame2007
CSCAnodeDataFrame2007(unsigned short data)
Definition: CSCAnodeData2007.h:11
CSCAnodeData2007::theDataFrames
unsigned short theDataFrames[MAXFRAMES]
Definition: CSCAnodeData2007.h:55
CSCAnodeDataFormat
Definition: CSCAnodeDataFormat.h:5
cms::cuda::assert
assert(be >=bs)
CSCAnodeData2007::findFrame
CSCAnodeDataFrame2007 findFrame(int tbin, int layer, int layerPart) const
Definition: CSCAnodeData2007.cc:70
CSCAnodeData2007::add
void add(const CSCWireDigi &, int layer) override
Definition: CSCAnodeData2007.cc:83
CSCAnodeDataFrame2007::flag_
unsigned short flag_
Definition: CSCAnodeData2007.h:27
CSCAnodeData2007::nTimeBins_
unsigned short int nTimeBins_
Definition: CSCAnodeData2007.h:58
CSCALCTHeader
Definition: CSCALCTHeader.h:21
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
CSCALCTDigi.h
CSCAnodeData2007::maxWireGroups_
unsigned short int maxWireGroups_
number of layer parts in the ALCT
Definition: CSCAnodeData2007.h:61
CSCAnodeData2007::nAFEBs_
unsigned short int nAFEBs_
Definition: CSCAnodeData2007.h:57
CSCAnodeData2007::alctBX_
unsigned int alctBX_
number of wiregroups in the ALCT
Definition: CSCAnodeData2007.h:62
CSCAnodeDataFrame2007::CSCAnodeDataFrame2007
CSCAnodeDataFrame2007()
Definition: CSCAnodeData2007.h:12
CSCAnodeData2007::init
void init(const CSCALCTHeader &)
Definition: CSCAnodeData2007.cc:23
CSCAnodeDataFrame2007::isHit
bool isHit(unsigned wireGroup) const
given a wiregroup between 0 and 11, it tells whether this bit was on
Definition: CSCAnodeData2007.h:15
CSCAnodeData2007::index
int index(int tbin, int layer, int layerPart) const
Definition: CSCAnodeData2007.cc:74
CSCAnodeDataFrame2007::data_
unsigned short data_
Definition: CSCAnodeData2007.h:25
CSCAnodeDataFrame2007::reserved_
unsigned short reserved_
Definition: CSCAnodeData2007.h:26
CSCAnodeData2007
Definition: CSCAnodeData2007.h:30
CSCWireDigi
Definition: CSCWireDigi.h:14
CSCAnodeData2007::wireDigis
std::vector< CSCWireDigi > wireDigis(int layer) const override
input layer is from 1 to 6
Definition: CSCAnodeData2007.cc:36
CSCAnodeDataFrame2007::data
unsigned short data() const
Definition: CSCAnodeData2007.h:22
CSCAnodeData2007::CSCAnodeData2007
CSCAnodeData2007(const CSCALCTHeader &)
a blank one, for Monte Carlo
Definition: CSCAnodeData2007.cc:7
CSCAnodeData2007::MAXFRAMES
Definition: CSCAnodeData2007.h:54
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCAnodeData2007::sizeInWords
unsigned short int sizeInWords() const override
the amount of the input binary buffer read, in 16-bit words
Definition: CSCAnodeData2007.h:39
CSCAnodeData2007::data
unsigned short * data() override
Definition: CSCAnodeData2007.h:37
CSCAnodeData2007::layerParts_
unsigned short int layerParts_
Definition: CSCAnodeData2007.h:60
CSCAnodeDataFrame2007
Definition: CSCAnodeData2007.h:9
CSCAnodeDataFormat.h
CSCAnodeData2007::sizeInWords2007_
unsigned short int sizeInWords2007_
Definition: CSCAnodeData2007.h:56
CSCAnodeDataFrame2007::addHit
void addHit(unsigned wireGroup)
Definition: CSCAnodeData2007.h:20
CSCAnodeData2007::selfTest
static void selfTest()
Definition: CSCAnodeData2007.cc:111