CMS 3D CMS Logo

HtrXmlPatternSet.h
Go to the documentation of this file.
1 #ifndef HtrXmlPatternSet_h_included
2 #define HtrXmlPatternSet_h_included 1
3 
7 
9 public:
10  static const int SAMPLES = 512;
11  static const int NUM_CRATES = 18;
12  //this is one larger than it 'needs' to be so that the array index can match the physical slot number
13  static const int NUM_SLOTS = 22;
14 
16  void setLoc(int crate, int slot, int tb, int chan) {
17  m_crate = crate;
18  m_slot = slot;
19  m_tb = tb;
20  m_chan = chan;
21  }
22  int getCrate() const { return m_crate; }
23  int getSlot() const { return m_slot; }
24  int getTB() const { return m_tb; }
25  int getChan() const { return m_chan; }
26  double& operator[](int bc) { return fCReal[bc]; }
27  const double operator[](int bc) const { return fCReal[bc]; }
28  void encode();
29  int getCoded(int bc) const { return fCCoded[bc]; }
30  double getQuantized(int bc) const { return fCQuantized[bc]; }
34  void Fill_by_hand(const HcalElectronicsMap*, int);
35 
36 private:
37  double fCReal[SAMPLES];
42 };
43 
44 class HalfHtrData {
45 public:
46  HalfHtrData(int crate, int slot, int tb);
47  ChannelPattern* getPattern(int chan) { return (chan >= 1 && chan <= 24) ? (&m_patterns[chan - 1]) : (nullptr); }
48  int getCrate() const { return m_crate; }
49  int getSlot() const { return m_slot; }
50  int getTB() const { return m_tb; }
51  int getSpigot() const { return m_spigot; }
52  int getDCC() const { return m_dcc; }
53  void setSpigot(int spigot) { m_spigot = spigot; }
54  void setDCC(int dcc) { m_dcc = dcc; }
55 
56 private:
60 };
61 
62 class CrateData {
63 public:
64  CrateData(int crate, int slotsActive[ChannelPattern::NUM_SLOTS]);
65  ~CrateData();
66  HalfHtrData* getHalfHtrData(int slot, int one_two_tb);
67 
68 private:
70 };
71 
73 public:
74  HtrXmlPatternSet(int cratesActive[ChannelPattern::NUM_CRATES], int slotsActive[ChannelPattern::NUM_SLOTS]);
76  CrateData* getCrate(int crate);
77 
78 private:
80 };
81 
82 #endif
void Fill_by_hand(const HcalElectronicsMap *, int)
HalfHtrData * m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
int getCrate() const
std::vector< T >::const_iterator const_iterator
int getSpigot() const
int getSlot() const
int fCCoded[SAMPLES]
const double operator[](int bc) const
int getTB() const
int getChan() const
static const int NUM_CRATES
void Fill(HtrXmlPatternToolParameters *params, HBHEDigiCollection::const_iterator data)
int getCrate() const
double fCQuantized[SAMPLES]
static const int SAMPLES
double & operator[](int bc)
ChannelPattern * getPattern(int chan)
ChannelPattern m_patterns[24]
int getCoded(int bc) const
int getSlot() const
CrateData(int crate, int slotsActive[ChannelPattern::NUM_SLOTS])
static const int NUM_SLOTS
double getQuantized(int bc) const
void setLoc(int crate, int slot, int tb, int chan)
HalfHtrData(int crate, int slot, int tb)
HalfHtrData * getHalfHtrData(int slot, int one_two_tb)
int getTB() const
CrateData * getCrate(int crate)
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
HtrXmlPatternSet(int cratesActive[ChannelPattern::NUM_CRATES], int slotsActive[ChannelPattern::NUM_SLOTS])
double fCReal[SAMPLES]
void setSpigot(int spigot)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
void setDCC(int dcc)
int getDCC() const
CrateData * m_crates[ChannelPattern::NUM_CRATES]