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)
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_
int init
Definition: HydjetWrapper.h:67
CSCAnodeDataFrame2007(unsigned short data)
bool isHit(unsigned wireGroup) const
given a wiregroup between 0 and 11, it tells whether this bit was on
virtual unsigned short * data()
unsigned short int nAFEBs_
unsigned int alctBX_
number of wiregroups in the ALCT
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
virtual unsigned short int sizeInWords() const
the amount of the input binary buffer read, in 16-bit words
unsigned short int sizeInWords2007_
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_