CMS 3D CMS Logo

IntegerCaloSamples.cc
Go to the documentation of this file.
2 
3 IntegerCaloSamples::IntegerCaloSamples() : id_(), size_(0), presamples_(0) {
4  for (int i = 0; i < MAXSAMPLES; i++)
5  data_[i] = 0;
6 }
7 
9  for (int i = 0; i < MAXSAMPLES; i++)
10  data_[i] = 0;
11 }
12 
14 
15 std::ostream &operator<<(std::ostream &s, const IntegerCaloSamples &samples) {
16  s << "DetId=" << samples.id().rawId();
17  s << ", " << samples.size() << "samples" << std::endl;
18  for (int i = 0; i < samples.size(); i++)
19  s << i << ":" << samples[i] << std::endl;
20  return s;
21 }
uint32_t data_[MAXSAMPLES]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
void setPresamples(int pre)
set presample information
int size() const
get the size
std::ostream & operator<<(std::ostream &s, const IntegerCaloSamples &samples)
Definition: DetId.h:18
static const int MAXSAMPLES
DetId id() const
get the (generic) id