16 #include "Riostream.h"
27 #include <QButtonGroup>
35 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
36 RateEvents->setDigitCount(7);
37 SumEvents->setDigitCount(12);
38 RateBytes->setDigitCount(7);
39 SumBytes->setDigitCount(8);
40 ServerPercent->setDigitCount(3);
41 SumBytesFile->setDigitCount(9);
43 RateEvents->setNumDigits(7);
44 SumEvents->setNumDigits(12);
45 RateBytes->setNumDigits(7);
46 SumBytes->setNumDigits(8);
47 ServerPercent->setNumDigits(3);
48 SumBytesFile->setNumDigits(9);
66 TrendCheck->setChecked(fbTrending);
90 QString moviepath =
":/icons/mbslogorun.gif";
133 fxTimer->start(1000*FrequencyBox->value());
151 setWindowTitle(
"MBS Status - "+NodeEdit->text());
174 OutfileLabel->setText(
"- file closed -") ;
184 RunPix->setWindowIcon(QIcon(
":/icons/mbsbutton.png" ));
194 std::cerr <<
fxMessage.toLatin1().constData() << std::endl;
205 if(
fxNode.isEmpty())
return;
208 fxMessage.sprintf(
"MBS Status refresh node %s returned error %d at ",
209 fxNode.toLatin1().constData(), state);
210 fxMessage += QDateTime::currentDateTime().toString();
217 int deltat=FrequencyBox->value();
219 int deltamilsecs=deltat*1000.0;
227 int deltasecs=deltamilsecs/1000;
231 std::cout <<
"Warning: MBS monitor found measuring interval:"<<deltasecs<<
" s ("<<deltamilsecs <<
" ms) exceeding timer period "<<deltat<<
" s" << std::endl;
232 std::cout <<
" Maybe timer was skipped?" << std::endl;
234 numperiods=(deltat/ (int) FrequencyBox->value());
235 std::cout <<
" Correcting number of measuring periods to:"<<numperiods << std::endl;
338 while((numperiods--) > 0)
370 std::cout <<
fxMessage.toLatin1().constData() << std::endl;
374 std::cout <<
"\n------------------------------------------------" << std::endl;
404 if(
fxNode.isEmpty())
return;
412 fxMessage.sprintf(
"MBS Setup refresh returned error %d at ",state);
413 fxMessage+=QDateTime::currentDateTime().toString();
426 fxMessage.sprintf(
"MBS Setup ML refresh returned error %d at",state);
427 fxMessage+=QDateTime::currentDateTime().toString();
439 fxMessage.sprintf(
"MBS Setup MO refresh returned error %d at",state);
440 fxMessage+=QDateTime::currentDateTime().toString();
474 int bins=histo->GetNbinsX();
481 for(
int i=0;i<bins;i++)
487 int oldval=histo->GetBinContent(j+dj);
488 histo->SetBinContent(j,oldval);
490 histo->SetBinContent(j+dj,value);
518 his=
new TH1F(name.toLatin1(), title.toLatin1() ,
fiTrendBins,lo,up);
519 TAxis* xax=his->GetXaxis();
582 NodeEdit->setText(txt);
QString fxHistoEvRatioAccessName
virtual void StateGroup_clicked(int id)
TString SaveToMemory(const char *pathname, TObject *obj, Bool_t ownership, Bool_t overwrite=kFALSE)
void setMbsMonitorMonitorActive(bool on=true)
void setMbsMonitorTrend(bool on=true)
virtual void MoreBox_toggled(bool on)
virtual void StartMovieReset()
virtual void PrintStatus()
virtual void TrendSwitched(bool on)
TH1 * TrendHisto(QString &refname, const QString &name, const QString &title, int value)
INTS4 f_mbs_status(CHARS *c_node, s_daqst *ps_daqst)
QString fxHistoAccessName
virtual void StoreSettings()
virtual void FrequencyBox_valueChanged(int)
INTS4 f_mbs_mo_setup(CHARS *c_node, s_set_mo *ps_set_mo)
virtual void TrendBinsBox_valueChanged(int i)
QButtonGroup * StateGroup
INTU4 bl_n_strserv_kbytes
TGo4Slot * DataSlot(const char *item)
virtual void UpdateTrending()
TObject * GetAssignedObject()
INTS4 f_mbs_ml_setup(CHARS *c_node, s_set_ml *ps_set_ml)
virtual void IncTrending(TH1 *histo, int value, bool forwards)
virtual void SetNode(const QString &txt)
INTU4 bh_event_serv_ready
INTS4 f_mbs_setup(CHARS *c_node, s_setup *ps_setup)
virtual void RefreshButtonClick()
bool getMbsMonitorTrend()
INTU4 bl_r_strserv_kbytes
void setMbsMonitorNode(const QString &name)
QString fxHistokBAccessName
TGo4MBSViewer(QWidget *parent=0, const char *name=0)
virtual void NodeEditEnter()
TGo4Slot * BrowserSlot(const char *item)
INTS4 f_ut_seg_show(s_daqst *ps_daqst, s_setup *ps_setup, s_set_ml *ps_set_ml, s_set_mo *ps_set_mo)
bool getMbsMonitorBackwardsTrending()
CHARS c_date[SBS__STR_LEN_64]
QString getMbsMonitorNode()
void ForwardEvent(TGo4Slot *source, Int_t id, void *param=0)
virtual void ResetRunIcon()
Bool_t AssignObject(TObject *obj, Bool_t owner)
QTimer * fxMovieResetTimer
void setMbsMonitorBins(int num)
INTU4 bh_running[SYS__N_MAX_PROCS]
void setMbsMonitorBackwardsTrending(bool on=true)
virtual void NodeChanged(const QString &txt)
virtual void TimerStart()
void setMbsMonitorFreq(int secs)
static void SetItemTimeDate(TGo4Slot *slot, const char *stime=0, const char *sdate=0)
void setMbsMonitorMore(bool on=true)
virtual void ShowStatus()