CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDNoiseReader.h
Go to the documentation of this file.
1 #ifndef HPDLibrary_HPDNoiseReader_h
2 #define HPDLibrary_HPDNoiseReader_h
3 
4 // --------------------------------------------------------
5 // Engine to read HPD noise events from the library
6 // Project: HPD noise library
7 // Author: F.Ratnikov UMd, Jan. 15, 2008
8 // $Id: HPDNoiseReader.h,v 1.3 2008/07/21 18:30:03 tyetkin Exp $
9 // --------------------------------------------------------
10 
11 #include <string>
12 #include <vector>
13 
14 class TFile;
15 class TTree;
16 class HPDNoiseData;
17 
19  public:
20  typedef int Handle;
21  HPDNoiseReader (const std::string& fFileName);
22  ~HPDNoiseReader ();
23 
25  std::vector<std::string> allNames () const;
27  Handle getHandle (const std::string& fName);
29  bool valid (Handle fHandle) const {return fHandle >= 0;}
31  float dischargeRate (Handle fHandle) const;
33  float ionFeedbackFirstPeakRate (Handle fHandle) const;
34  float ionFeedbackSecondPeakRate (Handle fHandle) const;
36  float emissionRate (Handle fHandle) const;
38  unsigned long totalEntries (Handle fHandle) const;
40  void getEntry (Handle fHandle, HPDNoiseData** fData);
42  void getEntry (Handle fHandle, unsigned long fEntry, HPDNoiseData** fData);
43 
44  private:
45  HPDNoiseReader (const HPDNoiseReader&); // no copy
46  HPDNoiseReader& operator=(const HPDNoiseReader&); // no copy
47  void grabEntry (Handle fHandle, unsigned long fEntry);
48 
49  TFile* mFile;
50  std::vector <TTree*> mTrees;
51  std::vector<float> mDischargeRate;//HPD discharge rate
52  std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
53  std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
54  std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
55  std::vector <size_t> mCurrentEntry;
57 };
58 
59 #endif
float dischargeRate(Handle fHandle) const
discharge rate for the instance
Handle getHandle(const std::string &fName)
get handle to access data for one HPD instance
std::vector< float > mElectronEmissionRate
unsigned long totalEntries(Handle fHandle) const
total number of noise events for the HPD instance in the library
HPDNoiseReader & operator=(const HPDNoiseReader &)
float ionFeedbackSecondPeakRate(Handle fHandle) const
bool valid(Handle fHandle) const
test if handle is valid
float emissionRate(Handle fHandle) const
ithermal/field emission rate for the instance
std::vector< float > mIonFeedbackSecondPeakRate
HPDNoiseReader(const std::string &fFileName)
HPDNoiseData * mBuffer
std::vector< float > mIonFeedbackFirstPeakRate
std::vector< std::string > allNames() const
all HPD instances in the library
std::pair< double, double > fEntry
Definition: CrossSection.h:40
float ionFeedbackFirstPeakRate(Handle fHandle) const
ionfeedback rate for the instance
void getEntry(Handle fHandle, HPDNoiseData **fData)
retrive one entry from the sequentially
std::vector< TTree * > mTrees
std::vector< size_t > mCurrentEntry
void grabEntry(Handle fHandle, unsigned long fEntry)
std::vector< float > mDischargeRate