19 mFile =
new TFile (fFileName.c_str(),
"READ");
26 for (
size_t i = 0;
i < names.size(); ++
i) {
27 TTree*
tree = (TTree*)
mFile->Get (names[
i].c_str());
37 std::cerr <<
"HPDNoiseReader::HPDNoiseReader-> Can not open tree " << names[
i] <<
" in file " << fFileName << std::endl;
42 std::cerr <<
"HPDNoiseReader::HPDNoiseReader-> Can not open catalog infile " << fFileName << std::endl;
47 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
56 std::vector<std::string>
result;
57 for (
size_t i = 0;
i <
mTrees.size(); ++
i) result.push_back (
mTrees[
i]->GetName ());
62 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
69 if (!
valid (fHandle))
return 0;
73 if (!
valid (fHandle))
return 0;
77 if (!
valid (fHandle))
return 0;
81 if (!
valid (fHandle))
return 0;
86 if (!
valid (fHandle))
return 0;
87 return mTrees[fHandle]->GetEntries ();
91 if (!
valid (fHandle))
return;
94 branch->GetEntry (fEntry);
99 if (!
valid (fHandle))
return;
static const HistoName names[]
float getElectronEmissionRate(size_t i) const
get thermal electron emission noise rate for the HPD instance
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
static const char * objectName()
object name
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)
float getIonFeedbackSecondPeakRate(size_t i) const
float getIonFeedbackFirstPeakRate(size_t i) const
get ion feedback noise rate for the HPD instance
const std::vector< std::string > & allNames() const
all HPD instance names
static const char * branchName()
branch name
std::vector< float > mIonFeedbackFirstPeakRate
std::vector< std::string > allNames() const
all HPD instances in the library
std::pair< double, double > fEntry
float getDischargeRate(size_t i) const
get noise rate for the HPD instance
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