CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/CalibFormats/CaloObjects/src/IntegerCaloSamples.cc

Go to the documentation of this file.
00001 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
00002 
00003 IntegerCaloSamples::IntegerCaloSamples() : id_(), size_(0), presamples_(0) {
00004   for (int i=0; i<MAXSAMPLES; i++) data_[i]=0;
00005 }
00006 
00007 IntegerCaloSamples::IntegerCaloSamples(const DetId& id, int size) : id_(id), size_(size), presamples_(0) {
00008   for (int i=0; i<MAXSAMPLES; i++) data_[i]=0;
00009 }
00010 
00011 void IntegerCaloSamples::setPresamples(int pre) {
00012   presamples_=pre;
00013 }
00014 
00015 
00016 std::ostream& operator<<(std::ostream& s, const IntegerCaloSamples& samples) {
00017   s << "DetId=" << samples.id().rawId();
00018   s << ", "<<  samples.size() << "samples" << std::endl;
00019   for (int i=0; i<samples.size(); i++)
00020     s << i << ":" << samples[i] << std::endl;
00021   return s;
00022 }