test
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 // --------------------------------------------------------
9 
10 #include <string>
11 #include <vector>
12 
13 class TFile;
14 class TTree;
15 class HPDNoiseData;
16 
18  public:
19  typedef int Handle;
20  HPDNoiseReader (const std::string& fFileName);
21  ~HPDNoiseReader ();
22 
24  std::vector<std::string> allNames () const;
28  bool valid (Handle fHandle) const {return fHandle >= 0;}
30  float dischargeRate (Handle fHandle) const;
32  float ionFeedbackFirstPeakRate (Handle fHandle) const;
33  float ionFeedbackSecondPeakRate (Handle fHandle) const;
35  float emissionRate (Handle fHandle) const;
37  unsigned long totalEntries (Handle fHandle) const;
39  void getEntry (Handle fHandle, HPDNoiseData** fData);
41  void getEntry (Handle fHandle, unsigned long fEntry, HPDNoiseData** fData);
42 
43  private:
44  HPDNoiseReader (const HPDNoiseReader&); // no copy
45  HPDNoiseReader& operator=(const HPDNoiseReader&); // no copy
46  void grabEntry (Handle fHandle, unsigned long fEntry);
47 
48  TFile* mFile;
49  std::vector <TTree*> mTrees;
50  std::vector<float> mDischargeRate;//HPD discharge rate
51  std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
52  std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
53  std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
54  std::vector <size_t> mCurrentEntry;
56 };
57 
58 #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