test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
21  {
22  data_ |= (1 << wireGroup);
23  }
24 
25  unsigned short data() const {return data_;}
26 
27  private:
28  unsigned short data_ : 12;
29  unsigned short reserved_ : 3;
30  unsigned short flag_ : 1;
31 };
32 
33 
35 
36 public:
38  explicit CSCAnodeData2007(const CSCALCTHeader &);
40  CSCAnodeData2007(const CSCALCTHeader &, const unsigned short *buf);
41 
42  virtual unsigned short * data() {return theDataFrames;}
44  virtual unsigned short int sizeInWords() const {return sizeInWords2007_;}
45 
47  virtual std::vector<CSCWireDigi> wireDigis(int layer) const;
48 
49  virtual void add(const CSCWireDigi &, int layer);
50 
51  static void selfTest();
52 
53 private:
54  void init(const CSCALCTHeader &);
55  int index(int tbin, int layer, int layerPart) const;
56  CSCAnodeDataFrame2007 findFrame(int tbin, int layer, int layerPart) const;
57 
59  enum {MAXFRAMES=2700};
60  unsigned short theDataFrames[MAXFRAMES];
61  unsigned short int sizeInWords2007_;
62  unsigned short int nAFEBs_;
63  unsigned short int nTimeBins_;
64 
65  unsigned short int layerParts_;
66  unsigned short int maxWireGroups_;
67  unsigned int alctBX_;
68 };
69 
70 #endif
71 
72 
unsigned short reserved_
assert(m_qm.get())
void init(const CSCALCTHeader &)
CSCAnodeData2007(const CSCALCTHeader &)
a blank one, for Monte Carlo
CSCAnodeDataFrame2007(unsigned short data)
bool isHit(unsigned wireGroup) const
given a wiregroup between 0 and 11, it tells whether this bit was on
static void selfTest()
virtual unsigned short * data()
int index(int tbin, int layer, int layerPart) const
unsigned short int nAFEBs_
CSCAnodeDataFrame2007 findFrame(int tbin, int layer, int layerPart) const
unsigned int alctBX_
number of wiregroups in the ALCT
unsigned short theDataFrames[MAXFRAMES]
virtual unsigned short int sizeInWords() const
the amount of the input binary buffer read, in 16-bit words
unsigned short int sizeInWords2007_
virtual void add(const CSCWireDigi &, int layer)
unsigned short int maxWireGroups_
number of layer parts in the ALCT
void addHit(unsigned wireGroup)
unsigned short data() const
unsigned short int nTimeBins_
unsigned short int layerParts_
virtual std::vector< CSCWireDigi > wireDigis(int layer) const
input layer is from 1 to 6