Read root files created by diana module MApolloHistoMaker.
Public Member Functions | |
QGUIHistogramHandler () | |
ctor | |
virtual | ~QGUIHistogramHandler () |
dtor | |
void | SetChannel (unsigned int channel) |
set channel to be displayed | |
unsigned int | GetChannel () const |
get current channel | |
TH1F & | GetRateHistogram () |
histogram content makes sense only if this method is called after a successful call to CheckUpdate() | |
TH1F & | GetPulseHistogram () |
histogram content makes sense only if this method is called after a successful call to CheckUpdate() | |
TH1F & | GetSpectrumHistogram () |
histogram content makes sense only if this method is called after a successful call to CheckUpdate() | |
bool | CheckUpdate () |
check whether new histograms are available | |
void | ForceUpdate () const |
force histograms update even if there is no new event for current channel | |
void | Inhibit () const |
inhibit communication with MApolloHistoMaker by deleting config file and lock file | |
void | UpdateSpectrumRange () |
scedule spectrum range update next time histogram is update | |
Private Member Functions | |
bool | UpdateConfigFile (bool force=false) const |
write current channel to config file | |
bool | UpdateHistograms () |
read root file and update histograms | |
void | ResetHistograms () |
reset all histograms | |
void | DressHistograms () |
perform graphical manipulation on histograms | |
void | EvalSpectrumRange () |
evaluate x axis range for current spectrum histo | |
bool | DumpLockFile () const |
dump empty "lock" file used to tell MApolloHistoMaker that we are waiting for new data | |
std::string | GetTimeString (const time_t &time, const std::string &format) |
utility function to convert from time_t to string | |
Private Attributes | |
unsigned int | fChannel |
std::string | fFilesPath |
std::string | fLockFile |
std::string | fConfigFile |
std::string | fRootFile |
TH1F | fRateHisto |
TH1F | fPulseHisto |
TH1F | fSpectrumHisto |
bool | fUpdateSpectrumRange |
int | fLastSpectrumBin |
time_t | fTimeFromStart |
time_t | fEventTime |
unsigned int | fSamplingRate |
void QGUIHistogramHandler::SetChannel | ( | unsigned int | channel | ) |
set channel to be displayed
channel | daq logical channel |
bool QGUIHistogramHandler::CheckUpdate | ( | ) |
check whether new histograms are available
bool QGUIHistogramHandler::UpdateConfigFile | ( | bool | force = false |
) | const [private] |
write current channel to config file
force | if true, -1*fChannel (instead of bare fChannel) is dumped into config file |
bool QGUIHistogramHandler::UpdateHistograms | ( | ) | [private] |
read root file and update histograms
bool QGUIHistogramHandler::DumpLockFile | ( | ) | const [private] |
dump empty "lock" file used to tell MApolloHistoMaker that we are waiting for new data
std::string QGUIHistogramHandler::GetTimeString | ( | const time_t & | time, | |
const std::string & | format | |||
) | [private] |
utility function to convert from time_t to string
time | value to be converted | |
format | date format as specified in strftime() |