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 // --------------------------------------------------------
6 
8 
10 
11 void HPDNoiseDataCatalog::setRate (const std::string& fName, float fDischargeRate,
12  float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate,
13  float fElectronEmissionRate){
14  for (size_t i = 0; i < mHpdName.size(); ++i) {
15  if (fName == mHpdName[i]){
16  mDischargeRate[i] = fDischargeRate;
17  mIonFeedbackFirstPeakRate[i] = fIonFeedbackFirstPeakRate;
18  mIonFeedbackSecondPeakRate[i] = fIonFeedbackSecondPeakRate;
19  mElectronEmissionRate[i] = fElectronEmissionRate;
20  }
21  }
22 }
23 
24 
25 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseDataCatalog& fCatalog) {
26  fStream << "Name:DischargeRate:IonFeedbackRate:ElectronEmissionRate";
27  for (size_t i = 0; i < fCatalog.size(); ++i) fStream << ' ' << fCatalog.getName (i) << ':'
28  << fCatalog.getDischargeRate(i) << ':'
29  << fCatalog.getIonFeedbackFirstPeakRate(i) << ':' << fCatalog.getIonFeedbackSecondPeakRate(i) << ':'
30  << fCatalog.getElectronEmissionRate(i);
31  return fStream;
32 }
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:188
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