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 // $Id: HPDNoiseData.cc,v 1.2 2012/06/07 18:12:43 wmtan Exp $
6 // --------------------------------------------------------
7 
9 
11 
12 void HPDNoiseData::addChannel (HcalDetId fId, const float* fCharges) {
13  mData.emplace_back (fId, fCharges);
14 }
15 
16 std::vector<HcalDetId> HPDNoiseData::getAllDetIds () const {
17  std::vector<HcalDetId> result;
18  for (size_t i = 0; i < mData.size(); ++i) result.push_back (getDataFrame(i).id());
19  return result;
20 }
21 
23  return mData[i];
24 }
25 
26 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseData& fData) {
27  for (size_t i = 0; i < fData.size (); ++i) fStream << fData.getDataFrame (i) << std::endl;
28  return fStream;
29 }
30 
int i
Definition: DBlmapReader.cc:9
const HPDNoiseDataFrame & getDataFrame(size_t i) const
retrive frame for the given index
Definition: HPDNoiseData.cc:22
virtual ~HPDNoiseData()
Definition: HPDNoiseData.cc:10
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
tuple result
Definition: query.py:137
void addChannel(HcalDetId fId, const float *fCharges)
add another noise channel to the event
Definition: HPDNoiseData.cc:12
std::vector< HcalDetId > getAllDetIds() const
all channels contributing to the event
Definition: HPDNoiseData.cc:16
unsigned size() const
number of noise channels in the event
Definition: HPDNoiseData.h:25
std::vector< HPDNoiseDataFrame > mData
Definition: HPDNoiseData.h:39