CMS 3D CMS Logo

HcalHistogramDigi.cc
Go to the documentation of this file.
2 #include <iomanip>
3 
5  for (int i = 0; i < BINS_PER_HISTOGRAM * 4; i++)
6  bins_[i] = 0;
7 }
8 
10  for (int i = 0; i < BINS_PER_HISTOGRAM * 4; i++)
11  bins_[i] = 0;
12 }
13 
14 uint16_t HcalHistogramDigi::get(int capid, int bin) const {
15  return bins_[(capid % 4) * BINS_PER_HISTOGRAM + (bin % BINS_PER_HISTOGRAM)];
16 }
17 
22 }
23 
24 uint16_t* HcalHistogramDigi::getArray(int capid) {
25  int offset = (capid % 4) * BINS_PER_HISTOGRAM;
26  return &(bins_[offset]);
27 }
28 
29 std::ostream& operator<<(std::ostream& s, const HcalHistogramDigi& digi) {
30  s << digi.id() << std::endl;
31  for (int i = 0; i < HcalHistogramDigi::BINS_PER_HISTOGRAM; i++) {
32  s << ' ' << std::setw(2) << i;
33  for (int capid = 0; capid < 4; capid++)
34  s << std::setw(6) << digi.get(capid, i) << " ";
35  s << std::endl;
36  }
37  return s;
38 }
HcalHistogramDigi::HcalHistogramDigi
HcalHistogramDigi()
Definition: HcalHistogramDigi.cc:4
HcalHistogramDigi::getSum
int getSum(int bin) const
get the contents of the specified bin summed over capids
Definition: HcalHistogramDigi.cc:18
mps_fire.i
i
Definition: mps_fire.py:428
HcalHistogramDigi::get
uint16_t get(int capid, int bin) const
get the contents of the specified bin for the specified capid (0-3)
Definition: HcalHistogramDigi.cc:14
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HcalHistogramDigi::bins_
uint16_t bins_[BINS_PER_HISTOGRAM *4]
Definition: HcalHistogramDigi.h:32
operator<<
std::ostream & operator<<(std::ostream &s, const HcalHistogramDigi &digi)
Definition: HcalHistogramDigi.cc:29
HcalHistogramDigi::id
const HcalDetId & id() const
Definition: HcalHistogramDigi.h:19
HcalHistogramDigi::BINS_PER_HISTOGRAM
static const int BINS_PER_HISTOGRAM
Definition: HcalHistogramDigi.h:28
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HcalHistogramDigi.h
HcalHistogramDigi::getArray
uint16_t * getArray(int capid)
get the array for the specified capid
Definition: HcalHistogramDigi.cc:24
HcalHistogramDigi
Definition: HcalHistogramDigi.h:12
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82