CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimCalorimetry/HcalSimAlgos/src/HPDNoiseData.cc

Go to the documentation of this file.
00001 // --------------------------------------------------------
00002 // Object to store correlated noise data for one HPD 
00003 // Project: HPD noise library
00004 // Author: F.Ratnikov UMd, Jan. 15, 2008
00005 // $Id: HPDNoiseData.cc,v 1.1 2008/01/16 02:12:40 fedor Exp $
00006 // --------------------------------------------------------
00007 
00008 #include "SimCalorimetry/HcalSimAlgos/interface/HPDNoiseData.h"
00009 
00010 HPDNoiseData::~HPDNoiseData () {}
00011 
00012 void HPDNoiseData::addChannel (HcalDetId fId, const float* fCharges) {
00013   mData.push_back (HPDNoiseDataFrame (fId, fCharges));
00014 }
00015 
00016 std::vector<HcalDetId> HPDNoiseData::getAllDetIds () const {
00017   std::vector<HcalDetId> result;
00018   for (size_t i = 0; i < mData.size(); ++i) result.push_back (getDataFrame(i).id());
00019   return result;
00020 }
00021 
00022 const HPDNoiseDataFrame& HPDNoiseData::getDataFrame (size_t i) const {
00023   return mData[i];
00024 }
00025 
00026 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseData& fData) {
00027   for (size_t i = 0; i < fData.size (); ++i) fStream << fData.getDataFrame (i) << std::endl;
00028   return fStream;
00029 }
00030