Public Member Functions | |
QMonitorHistogramReader () | |
ctor | |
virtual | ~QMonitorHistogramReader () |
dtor | |
bool | Read (const std::string &fileName) |
read root file | |
void | Close () |
const QError & | GetError () const |
get QError associated to the last failed operation | |
bool | GetTimeSec (Double_t &timeSec) |
get time from run start in s | |
bool | GetTimeUnix (time_t &timeUnix) |
get time of run start in unix time format | |
bool | GetSamplingRate (UInt_t &rate) |
get ADC sampling rate | |
bool | GetLgChannel (Int_t &channel) |
get logical channel | |
bool | GetEventType (QApolloMonitorDefs::QMonitorEventType_t &type) |
get event type | |
bool | GetPulse (TH1F &pulse) |
get histogram containing waveform | |
bool | GetRateHistogram (TH1F &rateHisto, QApolloMonitorDefs::QMonitorEventType_t type) |
get counting rate histogram for events of the given type | |
bool | GetSpectrum (TH1F &spectrum, QApolloMonitorDefs::QMonitorEventType_t type) |
get amplitude spectrum for events of the given type | |
Private Member Functions | |
bool | CheckOpen () |
check whether file is open | |
void | ResetError () |
bool | GetVariable (QApolloMonitorDefs::QMonitorVariable_t var, Double_t &val) |
const TH1 * | GetHistogram (const std::string &hName) |
read histogram whose key in root file is hName | |
Private Attributes | |
QError | fError |
TFile * | fFile |
TH1D | fVariablesHisto |
bool QMonitorHistogramReader::CheckOpen | ( | ) | [private] |
check whether file is open
References fError, fFile, ResetError(), and QError::Set().
Referenced by GetHistogram(), and GetVariable().
void QMonitorHistogramReader::ResetError | ( | ) | [inline, private] |
reset internal error
References fError, and QError::Set().
Referenced by CheckOpen(), GetHistogram(), GetVariable(), and Read().
bool QMonitorHistogramReader::GetVariable | ( | QApolloMonitorDefs::QMonitorVariable_t | var, | |
Double_t & | val | |||
) | [private] |
get varible named var from fVariablesHisto
References CheckOpen(), fError, fVariablesHisto, ResetError(), and QError::Set().
Referenced by GetEventType(), GetLgChannel(), GetSamplingRate(), GetTimeSec(), and GetTimeUnix().
const TH1 * QMonitorHistogramReader::GetHistogram | ( | const std::string & | hName | ) | [private] |
read histogram whose key in root file is hName
References CheckOpen(), fError, fFile, ResetError(), and QError::Set().
Referenced by GetPulse(), GetRateHistogram(), GetSpectrum(), and Read().
QError QMonitorHistogramReader::fError [private] |
error associated to last failed operation
Referenced by CheckOpen(), GetError(), GetHistogram(), GetRateHistogram(), GetSpectrum(), GetVariable(), Read(), and ResetError().
TFile* QMonitorHistogramReader::fFile [private] |
input file handler
Referenced by CheckOpen(), GetHistogram(), and Read().
TH1D QMonitorHistogramReader::fVariablesHisto [private] |
Histogram used to store bare variables.
This histogram is read once when the Read() method is called and is used to extract bare variables until the file is closed or Read() is called again.
Referenced by GetVariable(), and Read().