Public Member Functions | |
QMonitorConfigHandler () | |
ctor | |
virtual | ~QMonitorConfigHandler () |
dtor | |
void | SetLockFile (const std::string &fileName) |
set lockfile name | |
void | SetCfg (const std::string &fileName) |
set name of cfg file | |
bool | SetDataPath (const std::string &path) |
void | SetLgChannel (UInt_t lgChannel) |
set logical channel to be written to cfg | |
bool | WriteCfg (bool force) |
updates config file with new informations | |
bool | CheckLockFile () |
bool | DumpLockFile () |
create lock file and set permission to 666 | |
bool | UnlinkLockFile () |
remove lock file | |
bool | Inhibit () |
inhibit communication mechanism by removing lock file and cfgfile | |
const QError & | GetError () const |
bool | CfgUpdated (bool &updated, Int_t &channel) |
check whether cfg was updated since it was read | |
Private Member Functions | |
void | ResetError () |
Private Attributes | |
QError | fError |
UInt_t | fLgCh |
std::string | fLockFileName |
std::string | fCfgFileName |
std::string | fPath |
time_t | fLastUpdate |
bool QMonitorConfigHandler::SetDataPath | ( | const std::string & | path | ) |
set directory containing monitor files
References fPath, ResetError(), and QError::Set().
bool QMonitorConfigHandler::WriteCfg | ( | bool | force | ) |
updates config file with new informations
force | whether or not to force root file update even if no new events occurred on current channel |
References DumpLockFile(), fCfgFileName, fLgCh, ResetError(), QError::Set(), and UnlinkLockFile().
Referenced by QGUIHistogramHandler::ForceUpdate(), and QGUIHistogramHandler::SetChannel().
bool QMonitorConfigHandler::CheckLockFile | ( | ) |
References fLockFileName.
Referenced by CfgUpdated(), and QGUIHistogramHandler::CheckUpdate().
bool QMonitorConfigHandler::DumpLockFile | ( | ) |
create lock file and set permission to 666
References fLockFileName, ResetError(), and QError::Set().
Referenced by QGUIHistogramHandler::CheckUpdate(), and WriteCfg().
bool QMonitorConfigHandler::UnlinkLockFile | ( | ) |
remove lock file
References fLockFileName, and QError::Set().
Referenced by MApolloHistoMaker::UpdateFile(), and WriteCfg().
bool QMonitorConfigHandler::Inhibit | ( | ) |
inhibit communication mechanism by removing lock file and cfgfile
References fCfgFileName, and fLockFileName.
Referenced by QGUIHistogramHandler::Inhibit().
bool QMonitorConfigHandler::CfgUpdated | ( | bool & | updated, | |
Int_t & | channel | |||
) |
check whether cfg was updated since it was read
updated | is filled with cfg status | |
channel | is filled with new channel read from cfg |
References CheckLockFile(), fCfgFileName, and QError::Set().
Referenced by MApolloHistoMaker::Do().
void QMonitorConfigHandler::ResetError | ( | ) | [inline, private] |
reset QError
References QError::Set().
Referenced by DumpLockFile(), QMonitorConfigHandler(), SetDataPath(), and WriteCfg().
UInt_t QMonitorConfigHandler::fLgCh [private] |
logical channel
Referenced by SetLgChannel(), and WriteCfg().
std::string QMonitorConfigHandler::fLockFileName [private] |
lockfile name (including path)
Referenced by CheckLockFile(), DumpLockFile(), Inhibit(), SetLockFile(), UnlinkLockFile(), and ~QMonitorConfigHandler().
std::string QMonitorConfigHandler::fCfgFileName [private] |
cfg file name (including path)
Referenced by CfgUpdated(), Inhibit(), SetCfg(), and WriteCfg().
std::string QMonitorConfigHandler::fPath [private] |
name of directory containing monitor files
Referenced by SetDataPath().