- Timestamp:
- 07/20/11 20:19:39 (13 years ago)
- Location:
- trunk/FACT++/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11464 r11497 2763 2763 fClockCondFreq->addItem("5 GHz", QVariant(5000)); 2764 2764 2765 fMcpNumEvents->addItem("unlimited", QVariant(0)); 2766 fMcpNumEvents->addItem("100", QVariant(100)); 2767 fMcpNumEvents->addItem("300", QVariant(500)); 2768 fMcpNumEvents->addItem("1000", QVariant(1000)); 2769 fMcpNumEvents->addItem("3000", QVariant(3000)); 2770 fMcpNumEvents->addItem("10000", QVariant(10000)); 2771 fMcpNumEvents->addItem("30000", QVariant(30000)); 2772 2773 fMcpTime->addItem("unlimited", QVariant(0)); 2774 fMcpTime->addItem("00:30", QVariant(30)); 2775 fMcpTime->addItem("01:00", QVariant(60)); 2776 fMcpTime->addItem("02:30", QVariant(150)); 2777 fMcpTime->addItem("05:00", QVariant(300)); 2778 fMcpTime->addItem("10:00", QVariant(600)); 2779 fMcpTime->addItem("15:00", QVariant(900)); 2780 fMcpTime->addItem("20:00", QVariant(1200)); 2781 fMcpTime->addItem("30:00", QVariant(1800)); 2782 fMcpTime->addItem("60:00", QVariant(3600)); 2783 2784 fMcpRunType->addItem("Data", QVariant("data")); 2785 fMcpRunType->addItem("Pedestal", QVariant("pedestal")); 2786 fMcpRunType->addItem("DRS Calib", QVariant("drs-calib")); 2787 2765 2788 fTriggerWidget->setEnabled(false); 2766 2789 fFtuWidget->setEnabled(false); -
trunk/FACT++/gui/MainWindow.cc
r11354 r11497 148 148 } 149 149 150 void MainWindow::on_fMcpStartRun_clicked() 151 { 152 struct Value 153 { 154 uint64_t time; 155 uint64_t nevts; 156 char type[]; 157 }; 158 159 const int idx1 = fMcpRunType->currentIndex(); 160 const int idx2 = fMcpTime->currentIndex(); 161 const int idx3 = fMcpNumEvents->currentIndex(); 162 163 const int64_t v2 = fMcpTime->itemData(idx2).toInt(); 164 const int64_t v3 = fMcpNumEvents->itemData(idx3).toInt(); 165 166 const QString rt = fMcpRunType->itemData(idx1).toString(); 167 168 const size_t len = sizeof(Value)+rt.length()+1; 169 170 char *buf = new char[len]; 171 172 Value *val = reinterpret_cast<Value*>(buf); 173 174 val->time = v2; 175 val->nevts = v3; 176 177 strcpy(val->type, rt.toStdString().c_str()); 178 179 Dim::SendCommand("MCP/START", buf, len); 180 181 delete buf; 182 183 } 184 void MainWindow::on_fMcpStopRun_clicked() 185 { 186 Dim::SendCommand("MCP/STOP"); 187 } 188 150 189 void MainWindow::on_fLoggerStart_clicked() 151 190 { -
trunk/FACT++/gui/MainWindow.h
r11342 r11497 42 42 void on_fLoggerStart_clicked(); 43 43 void on_fLoggerStop_clicked(); 44 45 void on_fMcpStartRun_clicked(); 46 void on_fMcpStopRun_clicked(); 44 47 45 48 // System status -
trunk/FACT++/gui/design.ui
r11419 r11497 12 12 <y>0</y> 13 13 <width>1201</width> 14 <height> 768</height>14 <height>855</height> 15 15 </rect> 16 16 </property> … … 53 53 </property> 54 54 <property name="currentIndex"> 55 <number> 3</number>55 <number>0</number> 56 56 </property> 57 57 <property name="documentMode"> … … 7254 7254 <property name="minimumSize"> 7255 7255 <size> 7256 <width>20 7</width>7257 <height>6 20</height>7256 <width>208</width> 7257 <height>685</height> 7258 7258 </size> 7259 7259 </property> … … 8031 8031 </property> 8032 8032 </widget> 8033 </item> 8034 </layout> 8035 </item> 8036 <item> 8037 <spacer name="verticalSpacer_36"> 8038 <property name="orientation"> 8039 <enum>Qt::Vertical</enum> 8040 </property> 8041 <property name="sizeType"> 8042 <enum>QSizePolicy::Fixed</enum> 8043 </property> 8044 <property name="sizeHint" stdset="0"> 8045 <size> 8046 <width>20</width> 8047 <height>3</height> 8048 </size> 8049 </property> 8050 </spacer> 8051 </item> 8052 <item> 8053 <widget class="QLabel" name="label_155"> 8054 <property name="text"> 8055 <string>MCP</string> 8056 </property> 8057 </widget> 8058 </item> 8059 <item> 8060 <layout class="QGridLayout" name="gridLayout_55"> 8061 <property name="topMargin"> 8062 <number>0</number> 8063 </property> 8064 <item row="0" column="0"> 8065 <widget class="QPushButton" name="fMcpStartRun"> 8066 <property name="text"> 8067 <string>Start Run</string> 8068 </property> 8069 </widget> 8070 </item> 8071 <item row="0" column="1"> 8072 <widget class="QPushButton" name="fMcpStop"> 8073 <property name="text"> 8074 <string>Stop Run</string> 8075 </property> 8076 </widget> 8077 </item> 8078 <item row="2" column="0"> 8079 <widget class="QComboBox" name="fMcpNumEvents"/> 8080 </item> 8081 <item row="2" column="1"> 8082 <widget class="QComboBox" name="fMcpTime"/> 8083 </item> 8084 <item row="1" column="0" colspan="2"> 8085 <widget class="QComboBox" name="fMcpRunType"/> 8033 8086 </item> 8034 8087 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.