CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
7 IntegerCaloSamples::IntegerCaloSamples(const DetId& id, int size) : id_(id), size_(size), presamples_(0) {
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 }
int i
Definition: DBlmapReader.cc:9
uint32_t data_[MAXSAMPLES]
void setPresamples(int pre)
set presample information
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
int size() const
get the size
Definition: DetId.h:20
static const int MAXSAMPLES
string s
Definition: asciidump.py:422
DetId id() const
get the (generic) id
tuple size
Write out results.