CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/DataFormats/EcalDigi/src/EcalPnDiodeDigi.cc

Go to the documentation of this file.
00001 #include "DataFormats/EcalDigi/interface/EcalPnDiodeDigi.h"
00002 
00003 
00004 EcalPnDiodeDigi::EcalPnDiodeDigi() : size_(0), data_(MAXSAMPLES) {
00005 }
00006 EcalPnDiodeDigi::EcalPnDiodeDigi(const EcalPnDiodeDetId& id) : id_(id),
00007                                                                                    size_(0), data_(MAXSAMPLES) {
00008 }
00009   
00010 void EcalPnDiodeDigi::setSize(int size) {
00011   if (size<0) size_=0;
00012   else if (size>MAXSAMPLES) size_=MAXSAMPLES;
00013   else size_=size;
00014 }
00015 
00016   
00017 std::ostream& operator<<(std::ostream& s, const EcalPnDiodeDigi& digi) {
00018   s << digi.id() << " " << digi.size() << " samples " << std::endl;
00019   for (int i=0; i<digi.size(); i++) 
00020     s << "  " << digi.sample(i) << std::endl;
00021   return s;
00022 }