Changeset 11279 for trunk/FACT++/gui/FactGui.h
- Timestamp:
- 07/07/11 19:50:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r11266 r11279 20 20 #include "src/DimNetwork.h" 21 21 #include "src/tools.h" 22 #include "src/FAD.h" 22 23 23 24 … … 394 395 DimStampedInfo fDimFadRefClock; 395 396 DimStampedInfo fDimFadStatus; 396 DimStampedInfo fDimFadStatistics; 397 DimStampedInfo fDimFadStatistics1; 398 DimStampedInfo fDimFadStatistics2; 397 399 398 400 map<string, DimInfo*> fServices; … … 922 924 fFadTempMin->setEnabled(false); 923 925 fFadTempMax->setEnabled(false); 926 SetLedColor(fFadLedTemp, kLedGray, d.time); 924 927 return; 925 928 } … … 1084 1087 { 1085 1088 if (!CheckSize(d, 41)) 1086 return; 1089 { 1090 fStatusEventBuilderLabel->setText("Offline"); 1091 fStatusEventBuilderLabel->setToolTip("FADs or fadctrl seems to be offline."); 1092 fEvtBldWidget->setEnabled(false); 1093 1094 SetLedColor(fStatusEventBuilderLed, kLedGray, d.time); 1095 return; 1096 } 1087 1097 1088 1098 const uint8_t *ptr = d.ptr<uint8_t>(); … … 1266 1276 } 1267 1277 1268 void handleFadStatistics(const DimData &d) 1269 { 1270 if (!CheckSize(d, 8*sizeof(int64_t))) 1271 return; 1272 1273 const int64_t *stat = d.ptr<int64_t>(); 1274 1275 fFadBufferMax->setValue(stat[0]/1000000); 1276 fFadBuffer->setMaximum(stat[0]); 1277 fFadBuffer->setValue(stat[5]); 1278 1278 void handleFadStatistics1(const DimData &d) 1279 { 1280 if (!CheckSize(d, sizeof(GUI_STAT))) 1281 return; 1282 1283 const GUI_STAT &stat = d.ref<GUI_STAT>(); 1284 1285 /* 1286 //info about status of the main threads 1287 int32_t readStat ; //read thread 1288 int32_t procStat ; //processing thread(s) 1289 int32_t writStat ; //write thread 1290 1291 //info about some rates 1292 int32_t deltaT ; //time in milli-seconds for rates 1293 int32_t readEvt ; //#events read 1294 int32_t procEvt ; //#events processed 1295 int32_t writEvt ; //#events written 1296 int32_t skipEvt ; //#events skipped 1297 1298 //some info about current state of event buffer (snapspot) 1299 int32_t evtBuf; //#Events currently waiting in Buffer 1300 uint64_t totMem; //#Bytes available in Buffer 1301 uint64_t usdMem; //#Bytes currently used 1302 uint64_t maxMem; //max #Bytes used during past Second 1303 */ 1304 1305 fFadBufferMax->setValue(stat.totMem/1000000); 1306 fFadBuffer->setMaximum(stat.totMem/100); 1307 fFadBuffer->setValue(stat.maxMem/100); 1308 1309 cout << stat.totMem << " " << stat.maxMem << endl; 1310 1311 /* 1279 1312 fFadEvtWait->setValue(stat[1]); 1280 1313 fFadEvtSkip->setValue(stat[2]); … … 1284 1317 fFadEthernetRateAvg->setValue(stat[6]/1024./stat[7]); 1285 1318 fFadEvtConn->setValue(stat[7]); 1286 } 1287 1319 */ 1320 } 1321 1322 void handleFadStatistics2(const DimData &d) 1323 { 1324 if (!CheckSize(d, sizeof(EVT_STAT))) 1325 return; 1326 1327 const EVT_STAT &stat = d.ref<EVT_STAT>(); 1328 1329 /* 1330 //some info about what happened since start of program (or last 'reset') 1331 uint32_t reset ; //#if increased, reset all counters 1332 uint32_t numRead[MAX_SOCK] ; //how often succesfull read from N sockets per loop 1333 1334 uint64_t gotByte[NBOARDS] ; //#Bytes read per Board 1335 uint32_t gotErr[NBOARDS] ; //#Communication Errors per Board 1336 1337 uint32_t evtGet; //#new Start of Events read 1338 uint32_t evtTot; //#complete Events read 1339 1340 uint32_t evtErr; //#Events with Errors 1341 uint32_t evtSkp; //#Events incomplete (timeout) 1342 1343 1344 uint32_t procTot; //#Events processed 1345 uint32_t procErr; //#Events showed problem in processing 1346 uint32_t procTrg; //#Events accepted by SW trigger 1347 uint32_t procSkp; //#Events rejected by SW trigger 1348 1349 uint32_t feedTot; //#Events used for feedBack system 1350 uint32_t feedErr; //#Events rejected by feedBack 1351 1352 uint32_t wrtTot; //#Events written to disk 1353 uint32_t wrtErr; //#Events with write-error 1354 1355 uint32_t runOpen; //#Runs opened 1356 uint32_t runClose; //#Runs closed 1357 uint32_t runErr; //#Runs with open/close errors 1358 1359 1360 //info about current connection status 1361 uint8_t numConn[NBOARDS] ; //#Sockets succesfully open per board 1362 */ 1363 } 1288 1364 1289 1365 // ===================== FTM ============================================ … … 1808 1884 SetLedColor(fStatusFADLed, kLedGray, time); 1809 1885 1810 fStatusEventBuilderLabel->setText("Offline"); 1811 fStatusEventBuilderLabel->setToolTip("No connection to fadctrl."); 1812 fEvtBldWidget->setEnabled(false); 1813 1814 SetLedColor(fStatusEventBuilderLed, kLedGray, time); 1886 /* 1887 fStatusEventBuilderLabel->setText("Offline"); 1888 fStatusEventBuilderLabel->setToolTip("No connection to fadctrl."); 1889 fEvtBldWidget->setEnabled(false); 1890 1891 SetLedColor(fStatusEventBuilderLed, kLedGray, time); 1892 */ 1815 1893 } 1816 1894 if (s.index==FAD::kOffline) // Dim connection / FTM disconnected … … 2094 2172 return PostInfoHandler(&FactGui::handleFadStatus); 2095 2173 2096 if (getInfo()==&fDimFadStatistics) 2097 return PostInfoHandler(&FactGui::handleFadStatistics); 2174 if (getInfo()==&fDimFadStatistics1) 2175 return PostInfoHandler(&FactGui::handleFadStatistics1); 2176 2177 if (getInfo()==&fDimFadStatistics2) 2178 return PostInfoHandler(&FactGui::handleFadStatistics2); 2098 2179 2099 2180 if (getInfo()==&fDimFadEvents) … … 2539 2620 fDimFadRefClock ("FAD_CONTROL/REFERENCE_CLOCK", (void*)NULL, 0, this), 2540 2621 fDimFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, this), 2541 fDimFadStatistics ("FAD_CONTROL/STATISTICS", (void*)NULL, 0, this), 2622 fDimFadStatistics1 ("FAD_CONTROL/STATISTICS1", (void*)NULL, 0, this), 2623 fDimFadStatistics2 ("FAD_CONTROL/STATISTICS2", (void*)NULL, 0, this), 2542 2624 //- 2543 2625 fEventData(0) … … 2554 2636 fFtuWidget->setEnabled(false); 2555 2637 fRatesWidget->setEnabled(false); 2556 // fFadWidget->setEnabled(false); 2638 fFadWidget->setEnabled(false); 2639 fEvtBldWidget->setEnabled(false); 2557 2640 fLoggerWidget->setEnabled(false); 2558 2641
Note:
See TracChangeset
for help on using the changeset viewer.