CMS 3D CMS Logo

ESDataFrame.cc

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

Generated on Tue Jun 9 17:30:42 2009 for CMSSW by  doxygen 1.5.4