Changeset 11181
- Timestamp:
- 06/24/11 16:14:49 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r11134 r11181 48 48 extern void debugHead(int i, void *buf); 49 49 50 extern void debugRead(int isock, int ibyte, int32_t event, int state,50 extern void debugRead(int isock, int ibyte, int32_t event,int32_t ftmevt, int32_t runnr, int state, 51 51 uint32_t tsec, uint32_t tusec ) ; 52 52 extern void debugStream(int isock, void *buf, int len) ; … … 129 129 int evtID ; // event ID of event currently read 130 130 int runID ; // run " 131 uint fadLen ; // FADlength of event currently read 131 int ftmID ; // event ID from FTM 132 uint fadLen ; // FADlength of event currently read 132 133 int fadVers ; // Version of FAD 133 134 int board ; // boardID (softwareID: 0..40 ) … … 612 613 rd[i].bufPos += jrd ; //==> prepare for continuation 613 614 rd[i].bufLen -= jrd ; 614 debugRead(i,jrd,rd[i].evtID, 0,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 0=reading data615 debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 0,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 0=reading data 615 616 } else { //full dataset read 616 617 rd[i].bufLen = 0 ; … … 624 625 625 626 } 626 debugRead(i,jrd,rd[i].evtID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event627 debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event 627 628 628 629 //we have a complete buffer, copy to WORK area … … 760 761 rd[i].fadVers= ntohs(rd[i].rBuf->S[2]) ; 761 762 rd[i].evtID = ntohl(rd[i].rBuf->I[4]) ; //(FADevt) 763 rd[i].ftmID = ntohl(rd[i].rBuf->I[5]) ; //(FTMevt) 762 764 rd[i].runID = ntohl(rd[i].rBuf->I[11]) ; 763 765 if (rd[i].runID ==0 ) rd[i].runID = myRun ; … … 766 768 if (rd[i].bufLen <=0 ) rd[i].bufLen = 100000 ; //? 767 769 debugHead(i,rd[i].rBuf); 768 debugRead(i,jrd,rd[i].evtID, -1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid;-1=start event770 debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID,-1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid;-1=start event 769 771 } else { 770 debugRead(i,jrd,0, -2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet772 debugRead(i,jrd,0,0,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet 771 773 } 772 774 } else { 773 debugRead(i,jrd,0, -2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet775 debugRead(i,jrd,0,0,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet 774 776 } 775 777 … … 1339 1341 1340 1342 1341 /* 1343 1342 1344 xwait.tv_sec = 20;; 1343 1345 xwait.tv_nsec= 0 ; // sleep for ~20sec … … 1357 1359 1358 1360 g_runStat = -1 ; 1359 */ 1361 1360 1362 1361 1363 … … 1423 1425 1424 1426 1425 void debugRead(int isock, int ibyte, int32_t event, int state, uint32_t tsec, uint32_t tusec ) {1427 void debugRead(int isock, int ibyte, int32_t event, int32_t ftmevt, int32_t runnr, int state, uint32_t tsec, uint32_t tusec ) { 1426 1428 // printf("%3d %5d %9d %3d %12d\n",isock, ibyte, event, state, tusec) ; 1427 1429 } -
trunk/FACT++/src/EventBuilderWrapper.h
r11180 r11181 1075 1075 ofstream fDumpRead; // Stream to possibly dump docket events 1076 1076 1077 void debugRead(int isock, int ibyte, int32_t event, int state, uint32_t tsec, uint32_t tusec)1077 void debugRead(int isock, int ibyte, uint32_t event, uint32_t ftmevt, uint32_t runno, int state, uint32_t tsec, uint32_t tusec) 1078 1078 { 1079 1079 // isock = socketID (0-279) … … 1103 1103 1104 1104 fMsg.Message("Opened file 'socket_events.txt' for writing."); 1105 1106 fDumpRead << "# START: " << Time().GetAsStr() << endl; 1107 fDumpRead << "# state time_sec time_usec socket slot runno event_id trigger_id bytes_received" << endl; 1105 1108 } 1106 1109 … … 1111 1114 << setw(3) << isock << " " 1112 1115 << setw(2) << isock/7 << " " 1113 << event << " " 1116 << runno << " " 1117 << event << " " 1118 << ftmevt << " " 1114 1119 << ibyte << endl; 1115 1120 } … … 1358 1363 1359 1364 if (gi_NumConnect[i/7]!=7) 1365 { 1366 vec[i+3] = -1; 1360 1367 continue; 1368 } 1361 1369 1362 1370 if (!val) … … 1407 1415 1408 1416 if (gi_NumConnect[i/7]!=7) 1417 { 1418 vec[i+2] = 0; 1409 1419 continue; 1420 } 1410 1421 1411 1422 if (first) … … 1413 1424 first = false; 1414 1425 val = *ref; 1415 rc = ~0;1426 rc = 0; 1416 1427 } 1417 1428 … … 1419 1430 } 1420 1431 1421 vec[0] = rc;1432 vec[0] = ~rc; 1422 1433 vec[1] = val; 1423 1434 … … 1552 1563 } 1553 1564 1554 void debugRead(int isock, int ibyte, int32_t event, int state, uint32_t tsec, uint32_t tusec)1555 { 1556 return EventBuilderWrapper::This->debugRead(isock, ibyte, event, state, tsec, tusec);1565 void debugRead(int isock, int ibyte, int32_t event, int32_t ftmevt, int32_t runno, int state, uint32_t tsec, uint32_t tusec) 1566 { 1567 return EventBuilderWrapper::This->debugRead(isock, ibyte, event, ftmevt, runno, state, tsec, tusec); 1557 1568 } 1558 1569
Note:
See TracChangeset
for help on using the changeset viewer.