Public Member Functions | |
QGuiControlWindow (const TGWindow *parent, Int_t w, Int_t h) | |
ctor | |
virtual | ~QGuiControlWindow () |
dtor | |
void | HandleStartStop () |
slot function triggered when start/stop button is clicked | |
void | HandleQuit () |
slot function triggered when start/stop button is clicked | |
void | HandleMonitor () |
slot function triggered when monitor window button is clicked | |
void | HandleScope () |
slot function triggered when start scope button is clicked | |
void | HandleScopeClosed () |
slot function triggered when the scope window is closed | |
void | HandleMonitorClosed () |
slot function triggered when the monitor window is closed | |
void | Update () |
slot function triggered when update timer expires | |
void | CloseWindow () |
close window and emit signal when the close button is clicked | |
void | SetLogLevel (MsgLevel level) |
set log level for logger window | |
void | SetLogFile (std::ostream &os) |
set stream associated to log file | |
Private Types | |
enum | GuiStatus { QGuiBlockedStatus, QGuiIdleStatus, QGuiRunningStatus } |
possible gui statuses More... | |
Private Member Functions | |
void | CreateFrames () |
void | MakeConnections () |
void | UpdateDaqStatus () |
void | SetFormattedMessage (const std::string &message, MsgLevel level=InfoMsg) |
void | SetFormattedMessage (const QLogInfo &info) |
void | SetMessage (const std::string &message) |
void | UpdateGuiStatus () |
void | UpdateStatusBar () |
void | StartUpdateTimer () |
Bool_t | StartRun () |
Bool_t | StopRun () |
void | CheckAuth () |
void | UpdateAuth () |
Bool_t | Authenticate () |
Private Attributes | |
Int_t | fRun |
Int_t | fBasket |
std::string | fRunType |
QGUIDataCollector * | fCollector |
QGuiScope * | fScope |
QGUIHistogramDisplay * | fMonitor |
MsgLevel | fLogLevel |
GuiStatus | fGuiStatus |
std::ostream * | fLogFile |
TTimer * | fTimer |
std::pair< std::string, std::string > | fAuthInfo |
TGTextButton * | fStartStopButton |
TGTextButton * | fQuitButton |
TGTextButton * | fMonitorButton |
TGTextButton * | fScopeButton |
TGTextView * | fLogger |
TGStatusBar * | fStatusBar |
const Int_t | kStatusBarHeight |
enum QGuiControlWindow::GuiStatus [private] |
void QGuiControlWindow::CreateFrames | ( | ) | [private] |
create window frames
References fLogger, fMonitorButton, fQuitButton, fScopeButton, fStartStopButton, fStatusBar, and kStatusBarHeight.
Referenced by QGuiControlWindow().
void QGuiControlWindow::MakeConnections | ( | ) | [private] |
perform signal/slot connections
References fMonitorButton, fQuitButton, fScopeButton, and fStartStopButton.
Referenced by QGuiControlWindow().
void QGuiControlWindow::UpdateDaqStatus | ( | ) | [private] |
contact DaqServer and update daq status informations
References fBasket, fCollector, fGuiStatus, fRun, fRunType, QDaqClient::GetCurrentRunNumber(), QBaseClient::GetError(), QGUIDataCollector::GetMinRunNumber(), QGUIDataCollector::GetRunType(), QDbDetector::GetRunType(), QGUIDataCollector::GetSettingBasketId(), QGuiBlockedStatus, QGuiIdleStatus, QGuiRunningStatus, QGUIDataCollector::Reset(), QDbDetector::RunType2String(), and QDbDetector::SettingsBasket().
Referenced by HandleStartStop(), QGuiControlWindow(), StartRun(), StopRun(), and Update().
void QGuiControlWindow::SetFormattedMessage | ( | const std::string & | message, | |
MsgLevel | level = InfoMsg | |||
) | [private] |
add formatted message to the logger
References QLogInfo::Fill().
Referenced by Authenticate(), CheckAuth(), HandleQuit(), HandleScope(), HandleStartStop(), QGuiControlWindow(), StartRun(), StopRun(), Update(), and UpdateAuth().
void QGuiControlWindow::SetFormattedMessage | ( | const QLogInfo & | info | ) | [private] |
add formatted message to the logger
References fLogFile, fLogLevel, QLogInfo::GetLogLevel(), QLogInfo::GetMessage(), QLogInfo::GetSender(), QLogInfo::GetTimeString(), and SetMessage().
void QGuiControlWindow::SetMessage | ( | const std::string & | message | ) | [private] |
add message to the logger
References fLogger.
Referenced by QGuiControlWindow(), and SetFormattedMessage().
void QGuiControlWindow::UpdateGuiStatus | ( | ) | [private] |
update gui status
References fGuiStatus, fMonitor, fMonitorButton, fScope, fScopeButton, fStartStopButton, QGuiBlockedStatus, QGuiIdleStatus, QGuiRunningStatus, and UpdateStatusBar().
Referenced by HandleStartStop(), QGuiControlWindow(), StartRun(), StopRun(), and Update().
void QGuiControlWindow::UpdateStatusBar | ( | ) | [private] |
update bottom status bar
References fAuthInfo, fBasket, fGuiStatus, fRun, fRunType, fStatusBar, QStringHandler::IntToString(), QGuiBlockedStatus, QGuiIdleStatus, and QGuiRunningStatus.
Referenced by UpdateGuiStatus().
void QGuiControlWindow::StartUpdateTimer | ( | ) | [private] |
Bool_t QGuiControlWindow::StartRun | ( | ) | [private] |
start run -- return true on success
References Authenticate(), fAuthInfo, fCollector, fGuiStatus, QGUIDataCollector::GetComments(), QError::GetDescription(), QBaseClient::GetError(), QGUIDataCollector::GetIsValid(), QGUIDataCollector::GetRunNumber(), QGUIDataCollector::GetSettingBasketId(), QGUIDataCollector::GetShifterSet(), QStringHandler::IntToString(), QGuiBlockedStatus, QGuiIdleStatus, SetFormattedMessage(), QDaqClient::StartRun(), UpdateDaqStatus(), and UpdateGuiStatus().
Referenced by HandleStartStop().
Bool_t QGuiControlWindow::StopRun | ( | ) | [private] |
stop run -- return true on success
References Authenticate(), QGUIBaseFrame::CloseWindow(), QGuiScope::CloseWindow(), fAuthInfo, fCollector, fGuiStatus, fMonitor, fScope, QGUIDataCollector::GetComments(), QError::GetDescription(), QBaseClient::GetError(), QGUIDataCollector::GetIsValid(), QGUIDataCollector::GetLastPerformedRun(), QGUIDataCollector::GetShifterSet(), QStringHandler::IntToString(), QGuiBlockedStatus, QGuiRunningStatus, SetFormattedMessage(), QDaqClient::StopRun(), UpdateDaqStatus(), and UpdateGuiStatus().
Referenced by HandleStartStop().
void QGuiControlWindow::CheckAuth | ( | ) | [private] |
check authentication status
References fAuthInfo, QAuthManager::GetInstance(), QAuthManager::IsAuthenticated(), and SetFormattedMessage().
Referenced by Authenticate(), and Update().
void QGuiControlWindow::UpdateAuth | ( | ) | [private] |
renew authentication when user interaction is detected
References QAuthManager::Authenticate(), fAuthInfo, QAuthManager::GetInstance(), QAuthManager::IsAuthenticated(), and SetFormattedMessage().
Referenced by HandleMonitor(), HandleMonitorClosed(), HandleScope(), HandleScopeClosed(), and HandleStartStop().
Bool_t QGuiControlWindow::Authenticate | ( | ) | [private] |
launch authentication window
References QAuthManager::Authenticate(), CheckAuth(), fAuthInfo, fCollector, QAuthManager::GetInstance(), QGUIDataCollector::GetListOfUsers(), InvalidLevel, SetFormattedMessage(), QGUIDataCollector::SetMasterShifter(), and StartStopLevel.
Referenced by StartRun(), and StopRun().
Int_t QGuiControlWindow::fRun [private] |
current or next run number
Referenced by QGuiControlWindow(), Update(), UpdateDaqStatus(), and UpdateStatusBar().
Int_t QGuiControlWindow::fBasket [private] |
current settings basket
Referenced by UpdateDaqStatus(), and UpdateStatusBar().
std::string QGuiControlWindow::fRunType [private] |
run type string
Referenced by UpdateDaqStatus(), and UpdateStatusBar().
QGUIDataCollector* QGuiControlWindow::fCollector [private] |
stores run configuration infos
Referenced by Authenticate(), CloseWindow(), QGuiControlWindow(), StartRun(), StopRun(), and UpdateDaqStatus().
QGuiScope* QGuiControlWindow::fScope [private] |
software oscilloscope
Referenced by CloseWindow(), HandleScope(), HandleScopeClosed(), StopRun(), and UpdateGuiStatus().
QGUIHistogramDisplay* QGuiControlWindow::fMonitor [private] |
monitor histograms window
Referenced by CloseWindow(), HandleMonitor(), HandleMonitorClosed(), StopRun(), and UpdateGuiStatus().
MsgLevel QGuiControlWindow::fLogLevel [private] |
log level for logger window
Referenced by SetFormattedMessage(), and SetLogLevel().
GuiStatus QGuiControlWindow::fGuiStatus [private] |
gui status
Referenced by HandleStartStop(), QGuiControlWindow(), StartRun(), StopRun(), Update(), UpdateDaqStatus(), UpdateGuiStatus(), and UpdateStatusBar().
std::ostream* QGuiControlWindow::fLogFile [private] |
log file ostream
Referenced by SetFormattedMessage(), and SetLogFile().
TTimer* QGuiControlWindow::fTimer [private] |
timer for gui update
Referenced by HandleMonitor(), HandleMonitorClosed(), HandleScope(), HandleScopeClosed(), HandleStartStop(), StartUpdateTimer(), and ~QGuiControlWindow().
std::pair<std::string, std::string> QGuiControlWindow::fAuthInfo [private] |
auth info: <user, password>
Referenced by Authenticate(), CheckAuth(), QGuiControlWindow(), StartRun(), StopRun(), UpdateAuth(), and UpdateStatusBar().
TGTextButton* QGuiControlWindow::fStartStopButton [private] |
start/stop button
Referenced by CreateFrames(), MakeConnections(), and UpdateGuiStatus().
TGTextButton* QGuiControlWindow::fQuitButton [private] |
quit button
Referenced by CreateFrames(), and MakeConnections().
TGTextButton* QGuiControlWindow::fMonitorButton [private] |
monitor window button
Referenced by CreateFrames(), HandleMonitor(), HandleMonitorClosed(), MakeConnections(), and UpdateGuiStatus().
TGTextButton* QGuiControlWindow::fScopeButton [private] |
scope button
Referenced by CreateFrames(), HandleScope(), HandleScopeClosed(), MakeConnections(), and UpdateGuiStatus().
TGTextView* QGuiControlWindow::fLogger [private] |
logger window
Referenced by CreateFrames(), and SetMessage().
TGStatusBar* QGuiControlWindow::fStatusBar [private] |
bottom status bar
Referenced by CreateFrames(), and UpdateStatusBar().
const Int_t QGuiControlWindow::kStatusBarHeight [private] |
status bar height
Referenced by CreateFrames().