Go to the documentation of this file.00001 #ifndef HPDLibrary_HPDNoiseDataCatalog_h
00002 #define HPDLibrary_HPDNoiseDataCatalog_h
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <iostream>
00012 #include <vector>
00013 #include <string>
00014
00015 class HPDNoiseDataCatalog {
00016 public:
00017 HPDNoiseDataCatalog () {}
00018 virtual ~HPDNoiseDataCatalog ();
00019
00021 void addHpd (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate){
00022 mHpdName.push_back (fName), mDischargeRate.push_back (fDischargeRate),
00023 mIonFeedbackFirstPeakRate.push_back(fIonFeedbackFirstPeakRate),
00024 mIonFeedbackSecondPeakRate.push_back(fIonFeedbackSecondPeakRate),
00025 mElectronEmissionRate.push_back(fElectronEmissionRate);
00026 }
00028 size_t size () const {return mDischargeRate.size();}
00030 const std::vector<std::string>& allNames () const {return mHpdName;}
00032 float getDischargeRate (size_t i) const {return (i < mDischargeRate.size()) ? mDischargeRate[i] : 0.;}
00034 float getIonFeedbackFirstPeakRate (size_t i) const {return (i < mIonFeedbackFirstPeakRate.size()) ? mIonFeedbackFirstPeakRate[i] : 0.;}
00035 float getIonFeedbackSecondPeakRate (size_t i) const {return (i < mIonFeedbackSecondPeakRate.size()) ? mIonFeedbackSecondPeakRate[i] : 0.;}
00037 float getElectronEmissionRate (size_t i) const {return (i < mElectronEmissionRate.size()) ? mElectronEmissionRate[i] : 0.;}
00039 const std::string& getName (size_t i) const {return mHpdName[i];}
00041 void setRate (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate);
00043 static const char* className () {return "HPDNoiseDataCatalog";}
00045 static const char* objectName () {return "catalog";}
00046 private:
00047 std::vector<std::string> mHpdName;
00048 std::vector<float> mDischargeRate;
00049 std::vector<float> mIonFeedbackFirstPeakRate;
00050 std::vector<float> mIonFeedbackSecondPeakRate;
00051 std::vector<float> mElectronEmissionRate;
00052
00053 };
00054
00056 std::ostream& operator<< (std::ostream&, const HPDNoiseDataCatalog&);
00057
00058 #endif