00001 #ifndef HPDLibrary_HPDNoiseDataCatalog_h 00002 #define HPDLibrary_HPDNoiseDataCatalog_h 00003 00004 // -------------------------------------------------------- 00005 // Object to store HPD instance name and noise rate for the instance 00006 // Project: HPD noise library 00007 // Author: F.Ratnikov UMd, Jan. 15, 2008 00008 // $Id: HPDNoiseDataCatalog.h,v 1.2 2008/01/17 23:35:52 fedor Exp $ 00009 // -------------------------------------------------------- 00010 00011 #include <iostream> 00012 #include <vector> 00013 #include <string> 00014 00015 #include "TObject.h" 00016 00017 class HPDNoiseDataCatalog : public TObject { 00018 public: 00019 HPDNoiseDataCatalog () {} 00020 virtual ~HPDNoiseDataCatalog (); 00021 00023 void addHpd (const std::string& fName, float fRate) {mHpdName.push_back (fName), mRate.push_back (fRate);} 00025 size_t size () const {return mRate.size();} 00027 const std::vector<std::string>& allNames () const {return mHpdName;} 00029 float getRate (size_t i) const {return (i < mRate.size()) ? mRate[i] : 0.;} 00031 const std::string& getName (size_t i) const {return mHpdName[i];} 00033 void setRate (const std::string& fName, float fRate); 00034 private: 00035 std::vector<std::string> mHpdName; 00036 std::vector<float> mRate; 00037 00038 ClassDef(HPDNoiseDataCatalog,1) 00039 }; 00040 00042 std::ostream& operator<< (std::ostream&, const HPDNoiseDataCatalog&); 00043 00044 #endif