18 arr[0]->setToolTip(
"Crate 0, Board 0, Index 0");
20 for (
int i=1;
i<40;
i++)
22 QPushButton *b =
new QPushButton(static_cast<QWidget*>(arr[0]->parent()));
24 b->setEnabled(arr[0]->isEnabled());
25 b->setSizePolicy(arr[0]->sizePolicy());
26 b->setMaximumSize(arr[0]->maximumSize());
27 b->setIcon(arr[0]->icon());
28 b->setIconSize(arr[0]->iconSize());
29 b->setCheckable(arr[0]->isCheckable());
30 b->setFlat(arr[0]->isFlat());
33 str <<
"Crate " <<
i/10 <<
", Board " <<
i%10 <<
", Index " <<
i;
34 b->setToolTip(str.str().c_str());
36 lay->addWidget(b,
i/10+1,
i%10+1, 1, 1);
41 const QString name = arr[0]->objectName();
43 for (
int i=0;
i<40;
i++)
45 arr[
i]->setObjectName(name+QString::number(
i));
46 QObject::connect(arr[
i], SIGNAL(clicked()),
this, slot);
80 QTimer *timer =
new QTimer(
this);
90 QDateTime now = QDateTime::currentDateTime().toUTC();
91 now.setTimeSpec(Qt::LocalTime);
93 if (now.toTime_t()==fUTC->dateTime().toTime_t())
96 fUTC->setDateTime(now);
102 for (
int i=0;
i<fTabWidget->count();
i++)
103 if (fTabWidget->tabText(
i)==name)
105 fTabWidget->setCurrentIndex(
i);
112 if (fTableComments->model())
113 fTableComments->model()->insertRow(fTableComments->model()->rowCount());
118 const int32_t v[2] = { -1, val };
126 fRatesCanv->SetMin(min);
131 fRatesCanv->SetMax(max);
149 fTabWidget->setCurrentIndex(which);
151 QWidget *w = fTabWidget->currentWidget();
154 cout <<
"Weird... the tab requested to be closed doesn't exist!" << endl;
158 QDockWidget *d = w->findChild<QDockWidget*>();
161 cout <<
"Sorry, tab requested to be closed contains no QDockWidget!" << endl;
165 new DockWindow(d, fTabWidget->tabText(which));
166 fTabWidget->removeTab(which);
168 if (fTabWidget->count()==1)
169 fTabWidget->setTabsClosable(
false);
181 const int idx1 = fMcpRunType->currentIndex();
182 const int idx2 = fMcpTime->currentIndex();
183 const int idx3 = fMcpNumEvents->currentIndex();
185 const int64_t v2 = fMcpTime->itemData(idx2).toInt();
186 const int64_t v3 = fMcpNumEvents->itemData(idx3).toInt();
188 const QString rt = fMcpRunType->itemData(idx1).toString();
190 const size_t len =
sizeof(Value)+rt.length()+1;
192 char *buf =
new char[len];
194 Value *val =
reinterpret_cast<Value*
>(buf);
199 strcpy(val->type, rt.toStdString().c_str());
360 for (int32_t
i=0;
i<40;
i++)
380 const int32_t vals1[2] = { -1, fFadRoiCmd->value() };
383 for (
int ch=8; ch<36; ch+=9)
385 const int32_t vals2[2] = { ch, fFadRoiCh9Cmd->value() };
392 const uint32_t cmd[2] = { idx, val };
408 const uint16_t d[3] =
537 Dim::SendCommand(
"FTM_CONTROL/SET_CLOCK_FREQUENCY", fClockCondFreq->itemData(idx).toInt());
542 for (int32_t
i=0;
i<40;
i++)
558 static const struct Data { int32_t
id;
char on; }
__attribute__((__packed__)) d = { -1, 1 };
564 static const struct Data { int32_t
id;
char on; }
__attribute__((__packed__)) d = { -1, 0 };
606 fFeedbackDevCam->SetMin(min);
607 fFeedbackDevCam->updateCamera();
612 fFeedbackDevCam->SetMax(max);
613 fFeedbackDevCam->updateCamera();
618 fFeedbackCmdCam->SetMin(min);
619 fFeedbackCmdCam->updateCamera();
624 fFeedbackCmdCam->SetMax(max);
625 fFeedbackCmdCam->updateCamera();
631 (
float)fFeedbackOvervoltage->value());
646 fBiasVoltDacVolt->setValue(val*90./4096);
675 const struct Data { uint16_t ch;
float val; }
__attribute__((__packed__)) val = {
676 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()),
677 float(fBiasVolt->value())
688 const uint16_t val[2] =
690 uint16_t(fBiasHvBoard->value()*32+fBiasHvChannel->value()),
691 uint16_t(fBiasVoltDac->value())
700 Dim::SendCommand(
"BIAS_CONTROL/SET_GLOBAL_VOLTAGE",
float(fBiasVolt->value()));
706 Dim::SendCommand(
"BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(fBiasVoltDac->value()));
711 fBiasCamV->SetMin(min);
712 fBiasCamV->updateCamera();
717 fBiasCamV->SetMax(max);
718 fBiasCamV->updateCamera();
723 fBiasCamA->SetMin(min);
724 fBiasCamA->updateCamera();
729 fBiasCamA->SetMax(max);
730 fBiasCamA->updateCamera();
735 const string msg = fChatMessage->text().toStdString();
737 fChatMessage->clear();
void on_fFadSocket0_clicked()
void on_fFadBusyOnOff_clicked()
void on_fLpIntGroup1_stateChanged(int)
#define PACKAGE_BUGREPORT
void on_fLpExtIntensity_valueChanged(int)
void SelectTab(const QString &name)
void on_fDrsCalibReset_clicked()
A main window which can be used to display a QDockWidget from a tab.
A delegate which displays an arrow if there are sub items and raises an event if the checkbox is chec...
void on_fMcpReset_clicked()
void on_fTimeMarkerDelay_valueChanged(int)
void on_fBiasApplyChDac_clicked()
void on_fStatusFTMLed_clicked()
void on_fLpExtGroup2_stateChanged(int)
void on_fTabWidget_tabCloseRequested(int which)
void on_fFadResetTriggerId_clicked()
void on_fPhysicsWindow_valueChanged(int)
void on_fFadHardReset_clicked()
void on_fLpIntGroup2_stateChanged(int)
void on_fFadDwriteOn_clicked()
void on_fFeedbackDevMax_valueChanged(int)
void on_fEnableTrigger_stateChanged(int)
void on_fFeedbackStart_clicked()
void on_fRatesMax_valueChanged(int)
void on_fFtuPing_toggled(bool)
void on_fFadBusyOffOn_clicked()
void on_fFadSingleTrigger_clicked()
void on_fFadContTriggerOff_clicked()
void on_fFeedbackCmdMax_valueChanged(int)
void on_fMcpStartRun_clicked()
void on_fCalibCoincidence_valueChanged(int)
void on_fFeedbackCalibrate_clicked()
void on_fFtuAllOff_clicked()
void on_fShutdown_clicked()
void on_fClockCondFreq_activated(int)
void on_fBiasSetToZero_clicked()
void on_fFtuAllOn_clicked()
void on_fFadBusyOffOff_clicked()
void MakeLEDs(QPushButton **arr, QGridLayout *lay, const char *slot) const
void on_fStatusLoggerLed_clicked()
void on_fCalibWindow_valueChanged(int)
void on_fFadDrsOff_clicked()
void on_fFadRunNumberCmd_valueChanged(int)
void on_fFadTriggerLineOff_clicked()
void on_fFadBusyOnOn_clicked()
void on_fFadStop_clicked()
void on_fFadContTriggerOn_clicked()
void on_fLoggerStop_clicked()
void on_fNoutof4Val_valueChanged(int)
void on_fBiasApplyGlobalVolt_clicked()
void on_fFadDwriteOff_clicked()
void on_fMcpStopRun_clicked()
void on_fFadRoiCmd_valueChanged(int=0)
bool SendCommand(const std::string &command)
void on_fShutdownAll_clicked()
void on_fLoggerStart_clicked()
void on_fStatusChatLed_clicked()
void on_fPhysicsCoincidence_valueChanged(int)
void on_fLpIntIntensity_valueChanged(int)
void FadSetFileFormat(uint16_t fmt)
void on_fBiasApplyGlobalDac_clicked()
void on_fStatusFTULed_clicked()
void on_fFadStart_clicked()
void on_fFadPrescalerCmd_valueChanged(int)
void on_fEnableVeto_stateChanged(int)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
void on_fPixelEnableAll_clicked()
void on_fFeedbackCmdMin_valueChanged(int)
void on_fBiasVoltMin_valueChanged(int)
void on_fBiasApplyChVolt_clicked()
A Qt-Delegate to display HTML text (QTextDocument) in a list.
void on_fLpExtGroup1_stateChanged(int)
void FadDacCmd_valueChanged(uint16_t, uint16_t)
void on_fPrescalingVal_valueChanged(int)
void on_fBiasVoltDac_valueChanged(int)
void on_fBiasReset_clicked()
void on_fFtmStartRun_clicked()
void on_fDrsCalibStart_clicked()
void on_fDeadTime_valueChanged(int)
void on_fFadTriggerLineOn_clicked()
void on_fRatesMin_valueChanged(int)
void slot_fFadLED_clicked()
void on_fBiasVoltMax_valueChanged(int)
void on_fPixelDisableAll_clicked()
void on_fFadDrsOn_clicked()
void on_fFeedbackStop_clicked()
void SetTriggerSequence()
void on_fFeedbackDevMin_valueChanged(int)
void on_fStatusFADLed_clicked()
void on_fFadAbort_clicked()
void on_fCommentInsertRow_clicked()
void on_fTriggerInterval_valueChanged(int)
void on_fBiasCurrentMax_valueChanged(int)
QPushButton * fFtuLED[40]
void on_fEnableExt1_stateChanged(int)
void on_fBiasCurrentMin_valueChanged(int)
void on_fChatSend_clicked()
void on_fFadSocket17_clicked()
void on_fEnableClockCond_stateChanged(int)
void on_fTriggerDelay_valueChanged(int)
void on_fEnableExt2_stateChanged(int)
void slot_fFtuLED_clicked()
void on_fFadSoftReset_clicked()
void on_fFtmStopRun_clicked()
QPushButton * fFadLED[40]