CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDNoiseDataCatalog.cc
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // Object to store HPD instance name and noise rate for the instance
3 // Project: HPD noise library
4 // Author: F.Ratnikov UMd, Jan. 15, 2008
5 // $Id: HPDNoiseDataCatalog.cc,v 1.3 2008/07/21 18:30:03 tyetkin Exp $
6 // --------------------------------------------------------
7 
9 
11 
12 void HPDNoiseDataCatalog::setRate (const std::string& fName, float fDischargeRate,
13  float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate,
14  float fElectronEmissionRate){
15  for (size_t i = 0; i < mHpdName.size(); ++i) {
16  if (fName == mHpdName[i]){
17  mDischargeRate[i] = fDischargeRate;
18  mIonFeedbackFirstPeakRate[i] = fIonFeedbackFirstPeakRate;
19  mIonFeedbackSecondPeakRate[i] = fIonFeedbackSecondPeakRate;
20  mElectronEmissionRate[i] = fElectronEmissionRate;
21  }
22  }
23 }
24 
25 
26 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseDataCatalog& fCatalog) {
27  fStream << "Name:DischargeRate:IonFeedbackRate:ElectronEmissionRate";
28  for (size_t i = 0; i < fCatalog.size(); ++i) fStream << ' ' << fCatalog.getName (i) << ':'
29  << fCatalog.getDischargeRate(i) << ':'
30  << fCatalog.getIonFeedbackFirstPeakRate(i) << ':' << fCatalog.getIonFeedbackSecondPeakRate(i) << ':'
31  << fCatalog.getElectronEmissionRate(i);
32  return fStream;
33 }
std::vector< float > mIonFeedbackSecondPeakRate
int i
Definition: DBlmapReader.cc:9
std::vector< float > mIonFeedbackFirstPeakRate
const std::string & getName(size_t i) const
get name of the instance
std::vector< float > mElectronEmissionRate
float getElectronEmissionRate(size_t i) const
get thermal electron emission noise rate for the HPD instance
size_t size() const
total number
void setRate(const std::string &fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate)
set discharge/IonFeedback/Electron emission noise rates
std::vector< float > mDischargeRate
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
float getIonFeedbackSecondPeakRate(size_t i) const
float getIonFeedbackFirstPeakRate(size_t i) const
get ion feedback noise rate for the HPD instance
float getDischargeRate(size_t i) const
get noise rate for the HPD instance
std::vector< std::string > mHpdName