test
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 // --------------------------------------------------------
9 
10 #include <iostream>
11 #include <vector>
12 #include <string>
13 
15  public:
17  virtual ~HPDNoiseDataCatalog ();
18 
20  void addHpd (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate){
21  mHpdName.push_back (fName), mDischargeRate.push_back (fDischargeRate),
22  mIonFeedbackFirstPeakRate.push_back(fIonFeedbackFirstPeakRate),
23  mIonFeedbackSecondPeakRate.push_back(fIonFeedbackSecondPeakRate),
24  mElectronEmissionRate.push_back(fElectronEmissionRate);
25  }
27  size_t size () const {return mDischargeRate.size();}
29  const std::vector<std::string>& allNames () const {return mHpdName;}
31  float getDischargeRate (size_t i) const {return (i < mDischargeRate.size()) ? mDischargeRate[i] : 0.;}
33  float getIonFeedbackFirstPeakRate (size_t i) const {return (i < mIonFeedbackFirstPeakRate.size()) ? mIonFeedbackFirstPeakRate[i] : 0.;}
34  float getIonFeedbackSecondPeakRate (size_t i) const {return (i < mIonFeedbackSecondPeakRate.size()) ? mIonFeedbackSecondPeakRate[i] : 0.;}
36  float getElectronEmissionRate (size_t i) const {return (i < mElectronEmissionRate.size()) ? mElectronEmissionRate[i] : 0.;}
38  const std::string& getName (size_t i) const {return mHpdName[i];}
40  void setRate (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate);
42  static const char* className () {return "HPDNoiseDataCatalog";}
44  static const char* objectName () {return "catalog";}
45  private:
46  std::vector<std::string> mHpdName;
47  std::vector<float> mDischargeRate;//HPD discharge rate
48  std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
49  std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
50  std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
51 
52 };
53 
55 std::ostream& operator<< (std::ostream&, const HPDNoiseDataCatalog&);
56 
57 #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:188
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