CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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) { m_crate=crate; m_slot=slot; m_tb=tb; m_chan=chan; }
17  int getCrate() const { return m_crate; }
18  int getSlot() const { return m_slot; }
19  int getTB() const { return m_tb; }
20  int getChan() const { return m_chan; }
21  double& operator[](int bc) { return fCReal[bc]; }
22  const double operator[](int bc) const { return fCReal[bc]; }
23  void encode();
24  int getCoded(int bc) const { return fCCoded[bc]; }
25  double getQuantized(int bc) const { return fCQuantized[bc]; }
29  void Fill_by_hand(const HcalElectronicsMap*,int);
30 private:
31  double fCReal[SAMPLES];
36 };
37 
38 class HalfHtrData {
39 public:
40  HalfHtrData(int crate, int slot, int tb);
41  ChannelPattern* getPattern(int chan) { return (chan>=1 && chan<=24)?(&m_patterns[chan-1]):(0); }
42  int getCrate() const { return m_crate; }
43  int getSlot() const { return m_slot; }
44  int getTB() const { return m_tb; }
45  int getSpigot() const { return m_spigot; }
46  int getDCC() const { return m_dcc; }
47  void setSpigot(int spigot) { m_spigot = spigot; }
48  void setDCC(int dcc) { m_dcc = dcc; }
49 private:
53 };
54 
55 class CrateData {
56 public:
57  CrateData(int crate, int slotsActive[ChannelPattern::NUM_SLOTS]);
58  ~CrateData();
59  HalfHtrData* getHalfHtrData(int slot, int one_two_tb);
60 private:
62 };
63 
65 public:
66  HtrXmlPatternSet(int cratesActive[ChannelPattern::NUM_CRATES], int slotsActive[ChannelPattern::NUM_SLOTS]);
68  CrateData* getCrate(int crate);
69 private:
71 };
72 
73 #endif
int getCoded(int bc) const
void Fill_by_hand(const HcalElectronicsMap *, int)
HalfHtrData * m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
int getSlot() const
int getChan() const
std::vector< HBHEDataFrame >::const_iterator const_iterator
int fCCoded[SAMPLES]
int getTB() const
int getSpigot() const
int getCrate() const
static const int NUM_CRATES
int getTB() const
const double operator[](int bc) const
void Fill(HtrXmlPatternToolParameters *params, HBHEDigiCollection::const_iterator data)
double fCQuantized[SAMPLES]
static const int SAMPLES
double & operator[](int bc)
ChannelPattern * getPattern(int chan)
ChannelPattern m_patterns[24]
CrateData(int crate, int slotsActive[ChannelPattern::NUM_SLOTS])
int getDCC() const
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)
CrateData * getCrate(int crate)
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:82
void setDCC(int dcc)
int getSlot() const
CrateData * m_crates[ChannelPattern::NUM_CRATES]
int getCrate() const