Public Member Functions | |
QGuiScope (const TGWindow *parent, UInt_t w, UInt_t h) | |
ctor | |
virtual | ~QGuiScope () |
dtor | |
void | ChannelChanged (Int_t id) |
slot function triggered when something changes in any of the channel-based widgets. | |
void | CloseWindow () |
close window and emit signal when the close button is clicked | |
void | HandleTimeout () |
slot function triggered when the display timeout expires | |
void | HandlePause () |
slot function triggered when the pause button is clicked | |
void | HandleSave () |
slot function triggered when the save button is clicked | |
Private Member Functions | |
void | CreateFrames () |
void | MakeConnections () |
void | InitWidgets () |
void | GetActiveChannels () |
void | SetAvailableChannels () |
void | SetupDisplayManager () |
void | SetupTimer () |
Private Attributes | |
const Long_t | kTimeoutMs |
const UInt_t | kControlFrameHeight |
const UInt_t | kNumChannels |
std::map< Int_t, ULong_t > | fDefaultColors |
Bool_t | fIsPaused |
std::map< Int_t, UInt_t > | fWindowLengthsMs |
std::map< Int_t, UInt_t > | fSubSamplings |
std::map< Int_t, QGSChannelFrame * > | fChannelFrames |
std::set< Int_t > | fChannelsToUpdate |
std::set< int > | fActiveChannels |
QGSDisplayManager * | fDisplayManager |
TTimer * | fTimer |
TRootEmbeddedCanvas * | fEmbCanvas |
TGComboBox * | fXAxisRangeBox |
TGComboBox * | fSubSamplingBox |
TGTextButton * | fSaveButton |
TGTextButton * | fPauseButton |
TGTextButton * | fCloseButton |
void QGuiScope::ChannelChanged | ( | Int_t | id | ) |
slot function triggered when something changes in any of the channel-based widgets.
id | scope channel id |
References fChannelsToUpdate, and SetAvailableChannels().
void QGuiScope::CreateFrames | ( | ) | [private] |
graphic setup
References fChannelFrames, fCloseButton, fEmbCanvas, fPauseButton, fSaveButton, fSubSamplingBox, fSubSamplings, fWindowLengthsMs, fXAxisRangeBox, QScopeChannelInfo::GetAvailableSubSamplings(), QScopeChannelInfo::GetAvailableWindowLengthsMs(), kControlFrameHeight, and kNumChannels.
Referenced by QGuiScope().
void QGuiScope::MakeConnections | ( | ) | [private] |
perform signal/slot connections
References fChannelFrames, fCloseButton, fPauseButton, and fSaveButton.
Referenced by QGuiScope().
void QGuiScope::InitWidgets | ( | ) | [private] |
set default values in all widgets
References fActiveChannels, fChannelFrames, fChannelsToUpdate, fDefaultColors, fSaveButton, fSubSamplingBox, fSubSamplings, fWindowLengthsMs, fXAxisRangeBox, kNumChannels, QScopeChannelInfo::SetAdjustOffset(), QScopeChannelInfo::SetAutoScale(), SetAvailableChannels(), QScopeChannelInfo::SetEnabled(), QScopeChannelInfo::SetLgChannel(), and QScopeChannelInfo::SetWaveformColor().
Referenced by QGuiScope().
void QGuiScope::GetActiveChannels | ( | ) | [private] |
retrieve list of logical channels from db or elsewhere
References fActiveChannels, QApolloDb::GetCurrentProfile(), QApolloDb::GetCurrentRunNumber(), QApolloDb::GetListOfChannels(), and QApolloDbGui::ResetRun().
Referenced by QGuiScope().
void QGuiScope::SetAvailableChannels | ( | ) | [private] |
This method sets the list of lg channels available for selection for each QGSChannelFrame object.
Since the same lg channel cannot be displayed by two scope channels at the same time, the lg channels currently displayed by other scope channels must be removed from the selector of each scope channel.
References fActiveChannels, fChannelFrames, QScopeChannelInfo::GetEnabled(), QScopeChannelInfo::GetId(), and QScopeChannelInfo::GetLgChannel().
Referenced by ChannelChanged(), and InitWidgets().
void QGuiScope::SetupDisplayManager | ( | ) | [private] |
perform display manager initialization
References QGSDisplayManager::AddChannel(), fChannelFrames, fDisplayManager, fEmbCanvas, fWindowLengthsMs, fXAxisRangeBox, kTimeoutMs, QGSDisplayManager::SetCanvas(), QGSDisplayManager::SetUpdatePeriodMs(), and QGSDisplayManager::SetWindowLengthMs().
Referenced by QGuiScope().
void QGuiScope::SetupTimer | ( | ) | [private] |
perform display update timer initialization
References fTimer, and kTimeoutMs.
Referenced by QGuiScope().
const Long_t QGuiScope::kTimeoutMs [private] |
display update period in ms
Referenced by SetupDisplayManager(), and SetupTimer().
const UInt_t QGuiScope::kControlFrameHeight [private] |
height of control frame
Referenced by CreateFrames().
const UInt_t QGuiScope::kNumChannels [private] |
number of channels to be shown
Referenced by CreateFrames(), InitWidgets(), and QGuiScope().
std::map<Int_t, ULong_t> QGuiScope::fDefaultColors [private] |
key: scope channel id, value: default waveform color
Referenced by InitWidgets(), and QGuiScope().
Bool_t QGuiScope::fIsPaused [private] |
whether the scope should be updated at timeout
Referenced by HandlePause(), and HandleTimeout().
std::map<Int_t, UInt_t> QGuiScope::fWindowLengthsMs [private] |
key: entry id used in fAxisRangeBox
value: corresponding window length in ms
Referenced by CreateFrames(), HandleTimeout(), InitWidgets(), and SetupDisplayManager().
std::map<Int_t, UInt_t> QGuiScope::fSubSamplings [private] |
key: entry id used in fSubSamplingBox
value: corresponding subsampling value (e.g. N means 1 every N samples)
Referenced by CreateFrames(), and InitWidgets().
std::map<Int_t, QGSChannelFrame*> QGuiScope::fChannelFrames [private] |
key: scope channel id
value: ptr to frame handling channel based informations
Referenced by CreateFrames(), HandleTimeout(), InitWidgets(), MakeConnections(), SetAvailableChannels(), SetupDisplayManager(), and ~QGuiScope().
std::set<Int_t> QGuiScope::fChannelsToUpdate [private] |
scope channels whose configuration changed since last display update
Referenced by ChannelChanged(), HandleTimeout(), and InitWidgets().
std::set<int> QGuiScope::fActiveChannels [private] |
list of valid logical channels
Referenced by GetActiveChannels(), InitWidgets(), and SetAvailableChannels().
QGSDisplayManager* QGuiScope::fDisplayManager [private] |
ptr to object that handles histogram display
Referenced by HandlePause(), HandleSave(), HandleTimeout(), SetupDisplayManager(), and ~QGuiScope().
TTimer* QGuiScope::fTimer [private] |
used for display update
Referenced by HandleTimeout(), QGuiScope(), SetupTimer(), and ~QGuiScope().
TRootEmbeddedCanvas* QGuiScope::fEmbCanvas [private] |
canvas containing waveform
Referenced by CreateFrames(), and SetupDisplayManager().
TGComboBox* QGuiScope::fXAxisRangeBox [private] |
x axis range selector
Referenced by CreateFrames(), HandleTimeout(), InitWidgets(), and SetupDisplayManager().
TGComboBox* QGuiScope::fSubSamplingBox [private] |
subsampling selector
Referenced by CreateFrames(), and InitWidgets().
TGTextButton* QGuiScope::fSaveButton [private] |
save displayed waveforms
Referenced by CreateFrames(), HandlePause(), HandleSave(), InitWidgets(), and MakeConnections().
TGTextButton* QGuiScope::fPauseButton [private] |
pause histo update
Referenced by CreateFrames(), HandlePause(), and MakeConnections().
TGTextButton* QGuiScope::fCloseButton [private] |
close window
Referenced by CreateFrames(), and MakeConnections().