00001 #ifndef HPDLibrary_HPDNoiseMaker_h 00002 #define HPDLibrary_HPDNoiseMaker_h 00003 00004 // -------------------------------------------------------- 00005 // Engine to store HPD noise events in the library 00006 // Project: HPD noise library 00007 // Author: F.Ratnikov UMd, Jan. 15, 2008 00008 // $Id: HPDNoiseMaker.h,v 1.3 2008/07/21 18:30:03 tyetkin Exp $ 00009 // -------------------------------------------------------- 00010 00011 #include <string> 00012 #include <vector> 00013 00014 class HPDNoiseData; 00015 class HPDNoiseDataCatalog; 00016 class TFile; 00017 class TTree; 00018 00019 class HPDNoiseMaker { 00020 public: 00021 HPDNoiseMaker (const std::string& fFileName); 00022 ~HPDNoiseMaker (); 00023 00025 int addHpd (const std::string& fName); 00027 void setRate (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate); 00029 void newHpdEvent (const std::string& mName, const HPDNoiseData& mData); 00031 void newHpdEvent (size_t i, const HPDNoiseData& mData); 00033 unsigned long totalEntries (const std::string& mName) const; 00034 00035 private: 00036 HPDNoiseMaker (const HPDNoiseMaker&); 00037 HPDNoiseMaker& operator=(const HPDNoiseMaker&); 00038 00039 TFile* mFile; 00040 std::vector <TTree*> mTrees; 00041 std::vector <std::string> mNames; 00042 HPDNoiseDataCatalog* mCatalog; 00043 }; 00044 00045 #endif