Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:11

0001 #include "CalibFormats/CaloObjects/interface/IntegerCaloSamples.h"
0002 
0003 IntegerCaloSamples::IntegerCaloSamples() : id_(), size_(0), presamples_(0) {
0004   for (int i = 0; i < MAXSAMPLES; i++)
0005     data_[i] = 0;
0006 }
0007 
0008 IntegerCaloSamples::IntegerCaloSamples(const DetId &id, int size) : id_(id), size_(size), presamples_(0) {
0009   for (int i = 0; i < MAXSAMPLES; i++)
0010     data_[i] = 0;
0011 }
0012 
0013 void IntegerCaloSamples::setPresamples(int pre) { presamples_ = pre; }
0014 
0015 std::ostream &operator<<(std::ostream &s, const IntegerCaloSamples &samples) {
0016   s << "DetId=" << samples.id().rawId();
0017   s << ", " << samples.size() << "samples" << std::endl;
0018   for (int i = 0; i < samples.size(); i++)
0019     s << i << ":" << samples[i] << std::endl;
0020   return s;
0021 }