Ignore:
Timestamp:
06/24/11 16:14:49 (13 years ago)
Author:
tbretz
Message:
Added more infos to debugRead; some fixed to CompareBit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/EventBuilder.c

    r11134 r11181  
    4848extern void debugHead(int i, void *buf);
    4949
    50 extern void debugRead(int isock, int ibyte, int32_t event, int state,
     50extern void debugRead(int isock, int ibyte, int32_t event,int32_t ftmevt, int32_t runnr, int state,
    5151                      uint32_t tsec, uint32_t tusec ) ;
    5252extern void debugStream(int isock, void *buf, int len) ;
     
    129129  int  evtID  ;          // event ID of event currently read
    130130  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
    132133  int  fadVers ;         // Version of FAD
    133134  int  board ;           // boardID (softwareID: 0..40 )
     
    612613             rd[i].bufPos += jrd ;        //==> prepare for continuation
    613614             rd[i].bufLen -= jrd ;
    614              debugRead(i,jrd,rd[i].evtID, 0,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 0=reading data
     615             debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 0,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 0=reading data
    615616           } else {                     //full dataset read
    616617             rd[i].bufLen  = 0 ;
     
    624625
    625626             }
    626              debugRead(i,jrd,rd[i].evtID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event
     627             debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event
    627628
    628629             //we have a complete buffer, copy to WORK area
     
    760761                 rd[i].fadVers= ntohs(rd[i].rBuf->S[2]) ;
    761762                 rd[i].evtID  = ntohl(rd[i].rBuf->I[4]) ; //(FADevt)
     763                 rd[i].ftmID  = ntohl(rd[i].rBuf->I[5]) ; //(FTMevt)
    762764                 rd[i].runID  = ntohl(rd[i].rBuf->I[11]) ;
    763765                 if (rd[i].runID ==0 ) rd[i].runID = myRun ;
     
    766768                 if (rd[i].bufLen <=0 ) rd[i].bufLen = 100000 ;    //?
    767769                 debugHead(i,rd[i].rBuf);
    768                  debugRead(i,jrd,rd[i].evtID,-1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid;-1=start event
     770                 debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID,-1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid;-1=start event
    769771              } else {
    770                  debugRead(i,jrd,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet
     772                 debugRead(i,jrd,0,0,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet
    771773              }
    772774           } else {
    773               debugRead(i,jrd,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet
     775              debugRead(i,jrd,0,0,0,-2,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; -2=start event, unknown id yet
    774776           }
    775777
     
    13391341
    13401342
    1341 /*
     1343
    13421344     xwait.tv_sec = 20;;
    13431345     xwait.tv_nsec= 0 ;  // sleep for ~20sec
     
    13571359
    13581360     g_runStat = -1 ;
    1359 */
     1361
    13601362
    13611363
     
    14231425
    14241426
    1425 void debugRead(int isock, int ibyte, int32_t event, int state, uint32_t tsec, uint32_t tusec ) {
     1427void debugRead(int isock, int ibyte, int32_t event, int32_t ftmevt, int32_t runnr, int state, uint32_t tsec, uint32_t tusec ) {
    14261428//  printf("%3d %5d %9d %3d %12d\n",isock, ibyte, event, state, tusec) ;
    14271429}
Note: See TracChangeset for help on using the changeset viewer.