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++) data_[i]=0;
5 }
6 
8  for (int i=0; i<MAXSAMPLES; i++) data_[i]=0;
9 }
10 
12  presamples_=pre;
13 }
14 
15 
16 std::ostream& operator<<(std::ostream& s, const IntegerCaloSamples& samples) {
17  s << "DetId=" << samples.id().rawId();
18  s << ", "<< samples.size() << "samples" << std::endl;
19  for (int i=0; i<samples.size(); i++)
20  s << i << ":" << samples[i] << std::endl;
21  return s;
22 }
uint32_t data_[MAXSAMPLES]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
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