20 mFile =
new TFile (fFileName.c_str(),
"READ");
27 for (
size_t i = 0;
i < names.size(); ++
i) {
28 TTree*
tree = (TTree*)
mFile->Get (names[
i].c_str());
38 std::cerr <<
"HPDNoiseReader::HPDNoiseReader-> Can not open tree " << names[
i] <<
" in file " << fFileName << std::endl;
43 std::cerr <<
"HPDNoiseReader::HPDNoiseReader-> Can not open catalog infile " << fFileName << std::endl;
48 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
57 std::vector<std::string>
result;
58 for (
size_t i = 0;
i <
mTrees.size(); ++
i) result.push_back (
mTrees[
i]->GetName ());
63 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
70 if (!
valid (fHandle))
return 0;
74 if (!
valid (fHandle))
return 0;
78 if (!
valid (fHandle))
return 0;
82 if (!
valid (fHandle))
return 0;
87 if (!
valid (fHandle))
return 0;
88 return mTrees[fHandle]->GetEntries ();
92 if (!
valid (fHandle))
return;
95 branch->GetEntry (fEntry);
100 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)
std::pair< std::string, MonitorElement * > entry
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