test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDNoiseData.cc
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // Object to store correlated noise data for one HPD
3 // Project: HPD noise library
4 // Author: F.Ratnikov UMd, Jan. 15, 2008
5 // --------------------------------------------------------
6 
8 
10 
11 void HPDNoiseData::addChannel (HcalDetId fId, const float* fCharges) {
12  mData.emplace_back (fId, fCharges);
13 }
14 
15 std::vector<HcalDetId> HPDNoiseData::getAllDetIds () const {
16  std::vector<HcalDetId> result;
17  for (size_t i = 0; i < mData.size(); ++i) result.push_back (getDataFrame(i).id());
18  return result;
19 }
20 
22  return mData[i];
23 }
24 
25 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseData& fData) {
26  for (size_t i = 0; i < fData.size (); ++i) fStream << fData.getDataFrame (i) << std::endl;
27  return fStream;
28 }
29 
int i
Definition: DBlmapReader.cc:9
const HPDNoiseDataFrame & getDataFrame(size_t i) const
retrive frame for the given index
Definition: HPDNoiseData.cc:21
virtual ~HPDNoiseData()
Definition: HPDNoiseData.cc:9
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
tuple result
Definition: mps_fire.py:84
void addChannel(HcalDetId fId, const float *fCharges)
add another noise channel to the event
Definition: HPDNoiseData.cc:11
std::vector< HcalDetId > getAllDetIds() const
all channels contributing to the event
Definition: HPDNoiseData.cc:15
unsigned size() const
number of noise channels in the event
Definition: HPDNoiseData.h:24
std::vector< HPDNoiseDataFrame > mData
Definition: HPDNoiseData.h:38