CMS 3D CMS Logo

HcalHistogramDigi.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALDIGI_HCALHISTOGRAMDIGI_H
2 #define DATAFORMATS_HCALDIGI_HCALHISTOGRAMDIGI_H 1
3 
4 #include <ostream>
6 #include <cstdint>
7 
13 public:
14  typedef HcalDetId key_type;
15 
16  HcalHistogramDigi(); // For persistence
17  explicit HcalHistogramDigi(const HcalDetId& id);
18 
19  const HcalDetId& id() const { return id_; }
21  uint16_t get(int capid, int bin) const;
23  int getSum(int bin) const;
24 
26  uint16_t* getArray(int capid);
27 
28  static const int BINS_PER_HISTOGRAM = 32;
29 
30 private:
32  uint16_t bins_[BINS_PER_HISTOGRAM * 4];
33 };
34 
35 std::ostream& operator<<(std::ostream&, const HcalHistogramDigi& digi);
36 
37 #endif
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
HcalHistogramDigi::id_
HcalDetId id_
Definition: HcalHistogramDigi.h:31
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
HcalHistogramDigi::key_type
HcalDetId key_type
For the sorted collection.
Definition: HcalHistogramDigi.h:14
HcalHistogramDigi::bins_
uint16_t bins_[BINS_PER_HISTOGRAM *4]
Definition: HcalHistogramDigi.h:32
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.h
HcalDetId
Definition: HcalDetId.h:12
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
operator<<
std::ostream & operator<<(std::ostream &, const HcalHistogramDigi &digi)
Definition: HcalHistogramDigi.cc:29
HcalHistogramDigi::getArray
uint16_t * getArray(int capid)
get the array for the specified capid
Definition: HcalHistogramDigi.cc:24
HcalHistogramDigi
Definition: HcalHistogramDigi.h:12