CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDNoiseDataCatalog.h
Go to the documentation of this file.
1 #ifndef HPDLibrary_HPDNoiseDataCatalog_h
2 #define HPDLibrary_HPDNoiseDataCatalog_h
3 
4 // --------------------------------------------------------
5 // Object to store HPD instance name and noise rate for the instance
6 // Project: HPD noise library
7 // Author: F.Ratnikov UMd, Jan. 15, 2008
8 // $Id: HPDNoiseDataCatalog.h,v 1.3 2008/07/21 18:30:03 tyetkin Exp $
9 // --------------------------------------------------------
10 
11 #include <iostream>
12 #include <vector>
13 #include <string>
14 
16  public:
18  virtual ~HPDNoiseDataCatalog ();
19 
21  void addHpd (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate){
22  mHpdName.push_back (fName), mDischargeRate.push_back (fDischargeRate),
23  mIonFeedbackFirstPeakRate.push_back(fIonFeedbackFirstPeakRate),
24  mIonFeedbackSecondPeakRate.push_back(fIonFeedbackSecondPeakRate),
25  mElectronEmissionRate.push_back(fElectronEmissionRate);
26  }
28  size_t size () const {return mDischargeRate.size();}
30  const std::vector<std::string>& allNames () const {return mHpdName;}
32  float getDischargeRate (size_t i) const {return (i < mDischargeRate.size()) ? mDischargeRate[i] : 0.;}
34  float getIonFeedbackFirstPeakRate (size_t i) const {return (i < mIonFeedbackFirstPeakRate.size()) ? mIonFeedbackFirstPeakRate[i] : 0.;}
35  float getIonFeedbackSecondPeakRate (size_t i) const {return (i < mIonFeedbackSecondPeakRate.size()) ? mIonFeedbackSecondPeakRate[i] : 0.;}
37  float getElectronEmissionRate (size_t i) const {return (i < mElectronEmissionRate.size()) ? mElectronEmissionRate[i] : 0.;}
39  const std::string& getName (size_t i) const {return mHpdName[i];}
41  void setRate (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate);
43  static const char* className () {return "HPDNoiseDataCatalog";}
45  static const char* objectName () {return "catalog";}
46  private:
47  std::vector<std::string> mHpdName;
48  std::vector<float> mDischargeRate;//HPD discharge rate
49  std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
50  std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
51  std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
52 
53 };
54 
56 std::ostream& operator<< (std::ostream&, const HPDNoiseDataCatalog&);
57 
58 #endif
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
static const char * objectName()
object name
float getIonFeedbackSecondPeakRate(size_t i) const
float getIonFeedbackFirstPeakRate(size_t i) const
get ion feedback noise rate for the HPD instance
const std::vector< std::string > & allNames() const
all HPD instance names
float getDischargeRate(size_t i) const
get noise rate for the HPD instance
void addHpd(const std::string &fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate)
add new HPD instance to the catalog
std::vector< std::string > mHpdName
static const char * className()
class name