Changeset 15379
- Timestamp:
- 04/19/13 14:20:33 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r15360 r15379 866 866 evtCtrl.lastPtr %= MAX_EVT * MAX_RUN; 867 867 868 gi.evtGet++;868 //gi.evtGet++; 869 869 870 870 return i; … … 939 939 } /*-----------------------------------------------------------------*/ 940 940 941 941 /* 942 942 void 943 943 resetEvtStat () … … 973 973 974 974 return; 975 } /*-----------------------------------------------------------------*/975 }*/ /*-----------------------------------------------------------------*/ 976 976 977 977 void reportIncomplete(int k0) … … 1223 1223 for (int k = 0; k < NBOARDS; k++) { 1224 1224 gi_NumConnect[k] = 0; 1225 gi.numConn[k] = 0;1225 //gi.numConn[k] = 0; 1226 1226 gj.numConn[k] = 0; 1227 gj.errConn[k] = 0;1227 //gj.errConn[k] = 0; 1228 1228 gj.rateBytes[k] = 0; 1229 1229 gj.totBytes[k] = 0; … … 1234 1234 1235 1235 if (gi_resetR > 0) { 1236 resetEvtStat ();1236 //resetEvtStat (); 1237 1237 gj.bufTot = gj.maxEvt = gj.xxxEvt = 0; 1238 1238 gj.usdMem = gj.maxMem = gj.xxxMem = 0; … … 1276 1276 1277 1277 gi_NumConnect[b] = 0; //must close all connections 1278 gi.numConn[b] = 0;1278 //gi.numConn[b] = 0; 1279 1279 gj.numConn[b] = 0; 1280 1280 … … 1303 1303 1304 1304 //count number of succesfull actions 1305 int numok = 0; 1305 // int numok = 0; 1306 1306 1307 1307 /* … … 1363 1363 gi_NumConnect[b] += cntsock; 1364 1364 1365 gi.numConn[b]++;1365 //gi.numConn[b]++; 1366 1366 gj.numConn[b]++; 1367 1367 1368 factPrintf(kInfo, -1, "New connection %d (number of connections: %d)", b, g i.numConn[b]);1368 factPrintf(kInfo, -1, "New connection %d (number of connections: %d)", b, gj.numConn[b]); 1369 1369 } 1370 1370 … … 1373 1373 continue; 1374 1374 1375 numok++;1375 //numok++; 1376 1376 1377 1377 const int32_t jrd = … … 1385 1385 if (errno==EWOULDBLOCK || errno==EAGAIN) 1386 1386 { 1387 numok--;1387 //numok--; 1388 1388 continue; 1389 1389 } 1390 1390 1391 1391 factPrintf(kError, 442, "Reading from socket %d failed: %m (recv,rc=%d)", i, errno); 1392 gi.gotErr[b]++;1392 //gi.gotErr[b]++; 1393 1393 continue; 1394 1394 } … … 1402 1402 GenSock(s0, i, 0, NULL, &rd[i]); 1403 1403 1404 gi.gotErr[b]++;1404 //gi.gotErr[b]++; 1405 1405 1406 1406 gi_NumConnect[b]-= cntsock ; 1407 gi.numConn[b]--;1407 //gi.numConn[b]--; 1408 1408 gj.numConn[b]--; 1409 1409 … … 1413 1413 // Success (jrd > 0) 1414 1414 1415 gi.gotByte[b] += jrd;1415 //gi.gotByte[b] += jrd; 1416 1416 gj.rateBytes[b] += jrd; 1417 1417 … … 1438 1438 rd[i].rBuf->B[rd[i].fadLen - 2] != stop.B[1]) 1439 1439 { 1440 gi.evtErr++;1440 //gi.evtErr++; 1441 1441 factPrintf(kError, 301, "End-of-event flag wrong on socket %3d for event %4d (len=%5d), expected %3d %3d, got %3d %3d", 1442 1442 i, rd[i].evtID, rd[i].fadLen, stop.B[0], stop.B[1], … … 1531 1531 { 1532 1532 evtCtrl.evtStat[iDx] = 99; 1533 gi.evtTot++;1533 //gi.evtTot++; 1534 1534 } 1535 1535 } … … 1624 1624 } // end for loop over all sockets 1625 1625 1626 gi.numRead[numok]++;1626 //gi.numRead[numok]++; 1627 1627 1628 1628 g_actTime = time (NULL); … … 1661 1661 1662 1662 evtCtrl.evtStat[k0] = 91; //timeout for incomplete events 1663 gi.evtSkp++;1664 gi.evtTot++;1663 //gi.evtSkp++; 1664 //gi.evtTot++; 1665 1665 gj.evtSkip++; 1666 1666 … … 1753 1753 1754 1754 gi_NumConnect[i / 7]-= cntsock ; 1755 gi.numConn[i / 7]--;1755 //gi.numConn[i / 7]--; 1756 1756 gj.numConn[i / 7]--; 1757 1757 sockDef[i / 7] = 0; //flag ro recreate the sockets ... … … 1769 1769 { 1770 1770 evtCtrl.evtStat[k0] = 91; 1771 gi.evtSkp++;1772 gi.evtTot++;1771 //gi.evtSkp++; 1772 //gi.evtTot++; 1773 1773 } 1774 1774 } … … 2123 2123 const int rc = eventCheck(mBuffer[id].runNum, mBuffer[id].FADhead, 2124 2124 mBuffer[id].fEvent); 2125 gi.procTot++;2125 //gi.procTot++; 2126 2126 numProc++; 2127 2127 … … 2129 2129 { 2130 2130 evtCtrl.evtStat[k0] = 9999; //flag event to be skipped 2131 gi.procErr++;2131 //gi.procErr++; 2132 2132 } 2133 2133 else … … 2307 2307 const int32_t ievt = mBuffer[id].evNum; 2308 2308 2309 gi.wrtTot++;2309 //gi.wrtTot++; 2310 2310 2311 2311 int j = lastRun; … … 2323 2323 { 2324 2324 factPrintf(kFatal, 901, "writeEvt: Can not find run %d for event %d in %d", irun, ievt, id); 2325 gi.wrtErr++;2325 //gi.wrtErr++; 2326 2326 } 2327 2327 … … 2371 2371 } 2372 2372 evtCtrl.evtStat[k0] = 9903; 2373 gi.wrtErr++;2373 //gi.wrtErr++; 2374 2374 } else { 2375 2375 // snprintf (str, MXSTR,"write event %d size %d",ievt,sizeof (mBuffer[id])); … … 2388 2388 factPrintf(kError, 503, "writeEvt: Writing event for run %d failed (runWrite)", irun); 2389 2389 evtCtrl.evtStat[k0] = 9902; 2390 gi.wrtErr++;2390 //gi.wrtErr++; 2391 2391 } 2392 2392 -
trunk/FACT++/src/EventBuilderWrapper.h
r15355 r15379 102 102 DimDescribedService fDimDrsCalibration; 103 103 DimDescribedService fDimStatistics1; 104 DimDescribedService fDimStatistics2;104 //DimDescribedService fDimStatistics2; 105 105 DimDescribedService fDimFileFormat; 106 106 DimDescribedService fDimIncomplete; … … 233 233 "|roi:Region of interest of secondary baseline" 234 234 "|run:Run numbers of DRS runs (0=none)"), 235 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40; I:40;X:40",235 fDimStatistics1 ("FAD_CONTROL/STATISTICS1", "I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40;X:40", 236 236 "Event Builder status for GUI display" 237 237 "|threadInfo[int]:Number of read, proc and writes" … … 244 244 "|rateNew[int]:Number of new start events received" 245 245 "|numConn[int]:Number of connections per board" 246 "|errConn[int]:IO errors per board"247 246 "|rateBytes[int]:Bytes read this cycle" 248 247 "|totBytes[int]:Bytes read (counter)"), 249 fDimStatistics2 ("FAD_CONTROL/STATISTICS2", "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40",248 /*fDimStatistics2 ("FAD_CONTROL/STATISTICS2", "I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40", 250 249 "Event Builder status, events oriented" 251 250 "|reset[int]:If increased, reset all counters" … … 258 257 "|wrtStat[int]:number of evts written to disk, with errors" 259 258 "|runStat[int]:number of run opened, closed, with open or close errors" 260 "|numConn[int]:number of sockets successfully opened per board"), 259 "|numConn[int]:number of sockets successfully opened per board"),*/ 261 260 fDimFileFormat("FAD_CONTROL/FILE_FORMAT", "S:1", "|format[int]:Current file format"), 262 261 fDimIncomplete("FAD_CONTROL/INCOMPLETE", "X:1", "|incomplete[bits]:One bit per board"), … … 1239 1238 void factStat(const EVT_STAT &stat) 1240 1239 { 1241 fDimStatistics2.Update(stat);1240 //fDimStatistics2.Update(stat); 1242 1241 } 1243 1242 -
trunk/FACT++/src/FAD.h
r12267 r15379 336 336 //connections 337 337 int8_t numConn[NBOARDS] ; //#connections per board (at the moment) 338 int32_t errConn[NBOARDS] ; //#I/O errors per board (counter)338 //int32_t errConn[NBOARDS] ; //#I/O errors per board (counter) 339 339 int32_t rateBytes[NBOARDS]; //#Bytes read this cycle ** 340 340 int64_t totBytes[NBOARDS]; //#Bytes read (counter)
Note:
See TracChangeset
for help on using the changeset viewer.