CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimCalorimetry/HcalSimAlgos/interface/HPDNoiseReader.h

Go to the documentation of this file.
00001 #ifndef HPDLibrary_HPDNoiseReader_h
00002 #define HPDLibrary_HPDNoiseReader_h
00003 
00004 // --------------------------------------------------------
00005 // Engine to read HPD noise events from the library
00006 // Project: HPD noise library
00007 // Author: F.Ratnikov UMd, Jan. 15, 2008
00008 // $Id: HPDNoiseReader.h,v 1.3 2008/07/21 18:30:03 tyetkin Exp $
00009 // --------------------------------------------------------
00010 
00011 #include <string>
00012 #include <vector>
00013 
00014 class TFile;
00015 class TTree;
00016 class HPDNoiseData;
00017 
00018 class HPDNoiseReader {
00019  public:
00020   typedef int Handle;
00021   HPDNoiseReader (const std::string& fFileName);
00022   ~HPDNoiseReader ();
00023 
00025   std::vector<std::string> allNames () const;
00027   Handle getHandle (const std::string& fName);
00029   bool valid (Handle fHandle) const {return fHandle >= 0;}
00031   float dischargeRate (Handle fHandle) const;
00033   float ionFeedbackFirstPeakRate (Handle fHandle) const;
00034   float ionFeedbackSecondPeakRate (Handle fHandle) const;
00036   float emissionRate (Handle fHandle) const;
00038   unsigned long totalEntries (Handle fHandle) const;
00040   void getEntry (Handle fHandle, HPDNoiseData** fData);
00042   void getEntry (Handle fHandle, unsigned long fEntry, HPDNoiseData** fData);
00043   
00044  private:
00045   HPDNoiseReader (const HPDNoiseReader&); // no copy
00046   HPDNoiseReader& operator=(const HPDNoiseReader&); // no copy
00047   void grabEntry (Handle fHandle, unsigned long fEntry);
00048 
00049   TFile* mFile;
00050   std::vector <TTree*> mTrees;
00051   std::vector<float> mDischargeRate;//HPD discharge rate
00052   std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
00053   std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
00054   std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
00055   std::vector <size_t> mCurrentEntry;
00056   HPDNoiseData* mBuffer;
00057 };
00058 
00059 #endif