Changeset 11443 for trunk/FACT++
- Timestamp:
- 07/18/11 16:24:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r11343 r11443 41 41 extern int runClose(FileHandle_t fileHd , RUN_TAIL *runth, size_t len ) ; 42 42 extern void factOut(int severity, int err, char* message ) ; 43 extern void gotNewRun( int runnr, PEVNT_HEADER *headers ); 44 43 45 44 46 extern void factStat(GUI_STAT gj) ; … … 58 60 59 61 uint g_actTime ; 62 uint g_actUsec ; 60 63 int g_runStat ; 61 64 int g_reset ; … … 77 80 int gi_memStat = +1 ; 78 81 79 uint32_t gi_myRun ;80 82 uint32_t gi_myRun = 9876789 ; 83 uint32_t actrun ; 81 84 82 85 … … 118 121 119 122 typedef union { 120 int8_t B[MAX_LEN /8];121 int16_t S[MAX_LEN/ 4];122 int32_t I[MAX_LEN/ 2];123 int64_t L[MAX_LEN 123 int8_t B[MAX_LEN ]; 124 int16_t S[MAX_LEN/2]; 125 int32_t I[MAX_LEN/4]; 126 int64_t L[MAX_LEN/8]; 124 127 } CNV_FACT ; 125 128 … … 137 140 int runID ; // run " 138 141 int ftmID ; // event ID from FTM 139 uint 142 uint fadLen ; // FADlength of event currently read 140 143 int fadVers ; // Version of FAD 141 144 int board ; // boardID (softwareID: 0..40 ) 142 145 int Port ; 143 146 147 CNV_FACT *xBuf ; //a copy of rBuf (temporary for debuging) 144 148 CNV_FACT *rBuf ; 149 145 150 146 151 } READ_STRUCT ; … … 199 204 if (flag < 0) { 200 205 free(rd->rBuf) ; //and never open again 206 free(rd->xBuf) ; //and never open again 201 207 rd->rBuf = NULL ; 202 208 rd->sockStat = 99 ; … … 211 217 rd->SockAddr.sin_addr = sockAddr->sin_addr ; 212 218 219 rd->xBuf = malloc(sizeof(CNV_FACT) ) ; 213 220 rd->rBuf = malloc(sizeof(CNV_FACT) ) ; 214 221 if ( rd->rBuf == NULL ) { … … 270 277 271 278 272 int mBufEvt( int evID, uint runID, int nRoi ) {279 int mBufEvt( int evID, uint runID, int nRoi, int sk, int fadlen) { 273 280 // generate a new Event into mBuffer: 274 281 // make sure only complete Event are possible, so 'free' will always work … … 316 323 if (gi_memStat>0 ) { 317 324 gi_memStat = -99 ; 318 snprintf(str,MXSTR,"no memory left to keep event % d",evID) ;325 snprintf(str,MXSTR,"no memory left to keep event %6d sock %3d",evID,sk) ; 319 326 factOut(kError,882, str ) ; 327 } else { 328 snprintf(str,MXSTR,"no memory left to keep event %6d sock %3d",evID,sk) ; 329 factOut(kDebug,882, str ) ; 320 330 } 321 331 return -11 ; … … 354 364 } 355 365 366 mBuffer[i].fEvent->PCTime[0] = g_actTime ; 367 mBuffer[i].fEvent->PCTime[1] = g_actUsec ; 356 368 mBuffer[i].pcTime = g_actTime ; 357 369 mBuffer[i].nRoi = nRoi ; … … 373 385 374 386 375 snprintf(str,MXSTR,"%5d start new evt %8d %8d %2d",evID,i,evtCtrl.lastPtr,0); 376 factOut(kDebug,-11, str ) ; 387 snprintf(str,MXSTR,"%5d start new evt %8d %8d sock %3d len %5d t %10d", 388 evID,i,evtCtrl.lastPtr,sk,fadlen,mBuffer[i].pcTime); 389 factOut(kDebug,-11, str ) ; 377 390 evtCtrl.lastPtr++ ; 378 391 if (evtCtrl.lastPtr == MAX_EVT*MAX_RUN ) evtCtrl.lastPtr = 0; … … 393 406 runCtrl[evFree].runId = runID ; 394 407 runCtrl[evFree].fileId = -2 ; 408 runCtrl[evFree].lastEvt= -1 ; 395 409 runCtrl[evFree].nextEvt= 0; 396 410 runCtrl[evFree].actEvt = 0; … … 419 433 420 434 int headmem=0 ; 435 int evid ; 421 436 size_t freemem = 0 ; 422 437 438 evid = mBuffer[i].evNum ; 423 439 freemem = mBuffer[i].evtLen ; 424 440 … … 488 504 void *readFAD( void *ptr ) { 489 505 /* *** main loop reading FAD data and sorting them to complete events */ 490 int head_len,frst_len,numok,numok2, dest,evID,i,k ;506 int head_len,frst_len,numok,numok2,numokx,dest,evID,i,k ; 491 507 int actBoards = 0, minLen ; 492 508 int32_t jrd ; … … 498 514 499 515 int sockDef[NBOARDS]; //internal state of sockets 500 516 int jrdx ; 501 517 502 518 … … 509 525 510 526 527 gi_myRun = g_actTime ; 511 528 snprintf(str,MXSTR,"start initializing"); 512 529 factOut(kInfo,-1, str ) ; … … 546 563 evtCtrl.lastPtr = 0 ; 547 564 548 gi_myRun = g_actTime ;549 565 gi_SecTime = g_actTime ; 550 566 gi_runStat = g_runStat ; … … 602 618 gi.numConn[ b ] = 0; 603 619 gj.numConn[ b ] = 0; 604 if ( sockDef[b] == 0) s0= 0 ; //sockets to be defined and opened605 else if (g_port[b].sockDef == 0) s0= -1 ; //sockets to be destroyed606 else s0= +1 ; //sockets to be closed and reopened620 if ( sockDef[b] == 0) s0= 0 ; //sockets to be defined and opened 621 else if (g_port[b].sockDef == 0) s0= -1 ; //sockets to be destroyed 622 else s0= +1 ; //sockets to be closed and reopened 607 623 608 624 if (s0 == 0) p0=ntohs(g_port[b].sockAddr.sin_port); … … 625 641 626 642 627 628 643 jrdx = 0; 644 numokx= 0; 629 645 numok = 0 ; //count number of succesfull actions 630 646 631 647 for (i=0; i<MAX_SOCK; i++) { //check all sockets if something to read 632 648 b = i / 7 ; 633 if (sockDef[b] > 0) s0= +1 ;634 else s0= -1 ;649 if (sockDef[b] > 0) s0= +1 ; 650 else s0= -1 ; 635 651 636 652 gettimeofday( tv, NULL); 637 653 g_actTime = tsec = atv.tv_sec ; 638 tusec= atv.tv_usec ;654 g_actUsec = tusec= atv.tv_usec ; 639 655 640 656 if (rd[i].sockStat <0 ) { //try to connect if not yet done … … 647 663 } else { 648 664 rd[i].bufTyp = -1 ; // full data to be skipped 649 rd[i].bufLen = sizeof(CNV_FACT) ;//huge for skipping665 rd[i].bufLen = MAX_LEN ; //huge for skipping 650 666 } 651 667 rd[i].bufPos = 0 ; // no byte read so far … … 666 682 if (jrd >0 ) { 667 683 debugStream(i,&rd[i].rBuf->B[ rd[i].bufPos],jrd) ; 684 memcpy(&rd[i].xBuf->B[ rd[i].bufPos], &rd[i].rBuf->B[ rd[i].bufPos], jrd) ; 685 snprintf(str,MXSTR,"read sock %3d bytes %5d , %5d",i,jrd,rd[i].bufLen); 686 factOut(kDebug,301, str ) ; 668 687 } 669 688 … … 685 704 jrd = 0 ; 686 705 } 687 } else jrd = 0 ; //did read nothing as requested 706 } else { 707 jrd = 0 ; //did read nothing as requested 708 snprintf(str,MXSTR,"do not read from socket %d %d",i,rd[i].bufLen ) ; 709 factOut(kDebug,301, str ) ; 710 } 688 711 689 712 gi.gotByte[ b ] += jrd ; 690 713 gj.rateBytes[b] += jrd ; 714 715 if (jrd>0) {numokx++ ; jrdx+= jrd; } 716 691 717 692 718 if ( rd[i].bufTyp <0 ) { // we are skipping this board ... … … 702 728 rd[i].bufPos = rd[i].fadLen ; 703 729 if ( rd[i].rBuf->B[ rd[i].bufPos-1] != stop.B[0] 704 && rd[i].rBuf->B[ rd[i].bufPos] != stop.B[1]) {730 || rd[i].rBuf->B[ rd[i].bufPos-2] != stop.B[1]) { 705 731 gi.evtErr++ ; 706 snprintf(str,MXSTR,"wrong end of buffer found %d",rd[i].bufPos); 732 snprintf(str,MXSTR,"wrong end of buffer found sock %3d ev %4d len %5d %3d %3d - %3d %3d ", 733 i,rd[i].fadLen, rd[i].evtID, rd[i].rBuf->B[0], rd[i].rBuf->B[1], rd[i].rBuf->B[ rd[i].bufPos-2], 734 rd[i].rBuf->B[ rd[i].bufPos-1]); 707 735 factOut(kError,301, str ) ; 708 736 goto EndBuf ; 709 737 710 } 711 debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event 738 // } else { 739 // snprintf(str,MXSTR,"good end of buffer found sock %3d len %5d %d %d : %d %d - %d %d : %d %d", 740 // i,rd[i].fadLen, 741 // rd[i].rBuf->B[ 0 ], rd[i].rBuf->B[ 1 ], start.B[1],start.B[0], 742 // rd[i].rBuf->B[ rd[i].bufPos-2], rd[i].rBuf->B[ rd[i].bufPos-1], stop.B[1], stop.B[0]); 743 // factOut(kDebug,301, str ) ; 744 } 745 746 if (jrd>0) debugRead(i,jrd,rd[i].evtID,rd[i].ftmID,rd[i].runID, 1,tsec,tusec) ; // i=socket; jrd=#bytes; ievt=eventid; 1=finished event 712 747 713 748 //we have a complete buffer, copy to WORK area 714 749 roi = ntohs(rd[i].rBuf->S[ head_len/2 + 2 ]) ; 715 750 //get index into mBuffer for this event (create if needed) 716 evID = mBufEvt( rd[i].evtID, rd[i].runID, roi ) ;751 evID = mBufEvt( rd[i].evtID, rd[i].runID, roi, i, rd[i].fadLen ) ; 717 752 718 753 if (evID <-9000) goto EndBuf ; //illegal event, skip it ... 719 754 if (evID < 0) { 755 756 if ( rd[i].bufLen != 0) { 757 snprintf(str,MXSTR,"something screwed up"); 758 factOut(kFatal, 1, str ) ; 759 } 720 760 xwait.tv_sec = 0; 721 761 xwait.tv_nsec= 10000000 ; // sleep for ~10 msec … … 726 766 727 767 //we have a valid entry in mBuffer[]; fill it 768 769 int xchk = memcmp(&rd[i].xBuf->B[0], &rd[i].rBuf->B[0], rd[i].fadLen ) ; 770 if (xchk != 0) { 771 snprintf(str,MXSTR,"ERROR OVERWRITE %d %d on port %d",xchk,rd[i].fadLen,i) ; 772 factOut(kFatal, 1, str ) ; 773 774 uint iq; 775 for (iq=0; iq < rd[i].fadLen ; iq++) { 776 if (rd[i].rBuf->B[iq] != rd[i].xBuf->B[iq] ) { 777 snprintf(str,MXSTR,"ERROR %4d %4d %x %x",i,iq,rd[i].rBuf->B[iq], rd[i].xBuf->B[iq]); 778 factOut(kFatal, 1, str ) ; 779 } 780 } 781 } 782 728 783 729 784 boardId = b ; … … 735 790 } 736 791 if ( mBuffer[evID].board[ boardId ] != -1) { 737 snprintf(str,MXSTR,"double board %d for event %d",boardId,evID) ; 792 snprintf(str,MXSTR,"double board: ev %5d, b %3d, %3d; len %5d %3d %3d - %3d %3d ", 793 evID,boardId,i,rd[i].fadLen, rd[i].rBuf->B[0], 794 rd[i].rBuf->B[1], rd[i].rBuf->B[ rd[i].bufPos-2], rd[i].rBuf->B[ rd[i].bufPos-1]); 738 795 factOut(kWarn,501, str ) ; 739 796 goto EndBuf ; //--> skip Board … … 749 806 tmS = boardId*4 -1 ; // 750 807 src = head_len/2 ; 808 for ( px=0; px<9; px++ ) { //different sort in FAD board..... 751 809 for ( drs=0; drs<4; drs++ ) { 752 for ( px=0; px<9; px++ ) {753 810 pixH= ntohs(rd[i].rBuf->S[src++]) ; 754 811 pixC= ntohs(rd[i].rBuf->S[src++]) ; … … 796 853 snprintf(str,MXSTR,"%5d complete event %8d %8d %2d",mBuffer[evID].evNum,evtCtrl.evtBuf[iDx],iDx,evtCtrl.evtStat[ iDx ]); 797 854 factOut(kDebug,-1, str ) ; 855 856 if (mBuffer[evID].runNum != actrun ) { // have we already reported first event of this run ??? 857 actrun = mBuffer[i].runNum ; 858 int ir ; 859 for ( ir=0; ir<MAX_RUN; ir++) { 860 if ( runCtrl[ir].runId == actrun) { 861 if ( runCtrl[ir].lastEvt <0 ) { 862 runCtrl[ir].lastEvt = +1 ; 863 gotNewRun( actrun, mBuffer[evID].FADhead ); 864 snprintf(str,MXSTR,"gotNewRun %d (ev %d)",mBuffer[evID].runNum,mBuffer[evID].evNum); 865 factOut(kInfo,1, str ) ; 866 break ; 867 } 868 } 869 } 870 } 871 798 872 //complete event read ---> flag for next processing 799 873 evtCtrl.evtStat[ iDx ] = 99; … … 821 895 822 896 if (k >= rd[i].bufPos-1 ) { //no start of header found 823 // snprintf(str,MXSTR,"no start of header on port%d", i ) ;824 // factOut(kWarn,666, str ) ;825 826 897 rd[i].bufPos = 0 ; 827 898 rd[i].bufLen = head_len ; … … 830 901 rd[i].bufLen += k ; 831 902 memcpy(&rd[i].rBuf->B[0], &rd[i].rBuf->B[k], rd[i].bufPos ) ; 903 memcpy(&rd[i].xBuf->B[0], &rd[i].xBuf->B[k], rd[i].bufPos ) ; 832 904 } 833 905 if ( rd[i].bufPos >= minLen ) { … … 843 915 rd[i].ftmID = ntohl(rd[i].rBuf->I[5]) ; //(FTMevt) 844 916 rd[i].runID = ntohl(rd[i].rBuf->I[11]) ; 845 if (rd[i].runID ==0 ) rd[i].runID = gi_myRun ;846 917 rd[i].bufTyp = 1 ; //ready to read full record 847 918 rd[i].bufLen = rd[i].fadLen - rd[i].bufPos ; 848 if (rd[i].bufLen <=0 ) rd[i].bufLen = 100000 ; //? 919 920 int fadboard = ntohs(rd[i].rBuf->S[12] ) ; 921 int fadcrate = fadboard/256 ; 922 fadboard = (fadcrate*10 + fadboard%256) ; 923 snprintf(str,MXSTR,"sk %3d head: %5d %5d %5d %10d %4d %6d",i,rd[i].fadLen,rd[i].evtID,rd[i].ftmID,rd[i].runID,fadboard,jrd) ; 924 factOut(kDebug,1, str ) ; 925 926 if (rd[i].runID ==0 ) rd[i].runID = gi_myRun ; 927 928 if (rd[i].bufLen <=head_len || rd[i].bufLen > MAX_LEN ) { 929 snprintf(str,MXSTR,"illegal event-length on port %d",i) ; 930 factOut(kFatal,881, str ) ; 931 rd[i].bufLen = 100000 ; //? 932 } 849 933 int fadBoard = ntohs(rd[i].rBuf->S[12] ) ; 850 934 debugHead(i,fadBoard,rd[i].rBuf); … … 861 945 } //finished trying to read all sockets 862 946 947 snprintf(str,MXSTR,"Loop ---- %3d --- %8d",numokx,jrdx); 948 factOut(kDebug,-1, str ) ; 863 949 gi.numRead[ numok ] ++ ; 864 950 … … 897 983 898 984 int id =evtCtrl.evtBuf[k0] ; 899 snprintf(str,MXSTR,"%5d free event buffer (written)%3d", mBuffer[id].evNum, mBuffer[id].nBoard ) ;985 snprintf(str,MXSTR,"%5d free event buffer, nb=%3d", mBuffer[id].evNum, mBuffer[id].nBoard ) ; 900 986 factOut(kDebug,-1, str ) ; 901 987 mBufFree(id) ; //event written--> free memory … … 954 1040 } else { 955 1041 gi_reset = 0; 956 if ( g_runStat== -1 ) gi_resetR = 1 ;1042 if ( g_runStat== -1 ) gi_resetR = 1 ; 957 1043 else gi_resetR = 7 ; 958 1044 gi_resetS = 7 ; //close all sockets … … 971 1057 for (i=0; i<MAX_SOCK; i++) { 972 1058 if (rd[i].sockStat ==0 ) { 973 GenSock(-1, i, 0, NULL, &rd[i]) ; //close and destroy socket 974 gi_NumConnect[ i/7 ]-- ; 975 gi.numConn[ i/7 ]-- ; 976 gj.numConn[ i/7 ]-- ; 1059 GenSock(-1, i, 0, NULL, &rd[i]) ; //close and destroy open socket 1060 if ( i%7 == 0 ) { 1061 gi_NumConnect[ i/7 ]-- ; 1062 gi.numConn[ i/7 ]-- ; 1063 gj.numConn[ i/7 ]-- ; 1064 sockDef[i/7] = 0 ; //flag ro recreate the sockets ... 1065 rd[i/7].sockStat = -1; //and try to open asap 1066 } 977 1067 } 978 1068 } … … 1022 1112 if (evtCtrl.evtStat[k0] > minclear ) { 1023 1113 int id =evtCtrl.evtBuf[k0] ; 1114 snprintf(str,MXSTR,"ev %5d free event buffer, nb=%3d", mBuffer[id].evNum, mBuffer[id].nBoard ) ; 1115 factOut(kDebug,-1, str ) ; 1024 1116 mBufFree(id) ; //event written--> free memory 1025 1117 evtCtrl.evtStat[k0] = -1; … … 1309 1401 actRun.NTm = NTMARK ; 1310 1402 actRun.Nroi = mBuffer[id].nRoi ; 1311 // actRun.FADhead = mBuffer[id].FADhead ; //to be corrected 1403 memcpy(actRun.FADhead, mBuffer[id].FADhead, NBOARDS* sizeof(PEVNT_HEADER) ) ; 1312 1404 1313 1405 runCtrl[j].fileHd = runOpen(irun, &actRun, sizeof(actRun) ) ; … … 1315 1407 snprintf(str,MXSTR,"W could not open a file for run %d",irun); 1316 1408 factOut(kError,502, str ) ; 1317 runCtrl[j].fileId = 9 9;1409 runCtrl[j].fileId = 91 ; 1318 1410 } else { 1319 1411 snprintf(str,MXSTR,"W opened new run_file %d",irun) ; … … 1325 1417 1326 1418 if (runCtrl[j].fileId != 0 ) { 1327 snprintf(str,MXSTR,"W no open file for this run %d",irun) ; 1328 factOut(kWarn,123,str) ; 1419 if (runCtrl[j].fileId < 0 ) { 1420 snprintf(str,MXSTR,"W never opened file for this run %d",irun) ; 1421 factOut(kError,123,str) ; 1422 } else if (runCtrl[j].fileId < 100 ) { 1423 snprintf(str,MXSTR,"W.file for this run is closed %d",irun) ; 1424 factOut(kWarn,123,str) ; 1425 runCtrl[j].fileId += 100 ; 1426 } else { 1427 snprintf(str,MXSTR,"W:file for this run is closed %d",irun) ; 1428 factOut(kDebug,123,str) ; 1429 } 1329 1430 evtCtrl.evtStat[k0] = 903 ; 1330 1431 gi.wrtErr++ ; … … 1363 1464 snprintf(str,MXSTR,"error closing run %d %d AAA",runCtrl[j].runId,i) ; 1364 1465 factOut(kError,503, str ) ; 1365 runCtrl[j].fileId = 9 001;1466 runCtrl[j].fileId = 92 ; 1366 1467 } else { 1367 1468 snprintf(str,MXSTR,"W closed run %d AAA %d",irun,ii) ; 1368 1469 factOut(kInfo,503, str ) ; 1369 runCtrl[j].fileId = 9 01;1470 runCtrl[j].fileId = 93 ; 1370 1471 } 1371 1472 } … … 1393 1494 snprintf(str,MXSTR,"error closing run %d %d BBB",runCtrl[j].runId,i) ; 1394 1495 factOut(kError,506, str ) ; 1395 runCtrl[j].fileId = 9 011;1496 runCtrl[j].fileId = 94 ; 1396 1497 } else { 1397 1498 snprintf(str,MXSTR,"W closed run %d BBB %d",runCtrl[j].runId,ii) ; 1398 1499 factOut(kInfo,507, str ) ; 1399 runCtrl[j].fileId = 9 11;1500 runCtrl[j].fileId = 95 ; 1400 1501 } 1401 1502 } … … 1439 1540 snprintf(str,MXSTR,"error closing run %d %d CCC",runCtrl[j].runId,i) ; 1440 1541 factOut(kError,506, str ) ; 1441 runCtrl[j].fileId = 9 021;1542 runCtrl[j].fileId = 96 ; 1442 1543 } else { 1443 1544 snprintf(str,MXSTR,"W closed run %d CCC %d",runCtrl[j].runId,ii) ; 1444 1545 factOut(kInfo,507, str ) ; 1445 runCtrl[j].fileId = 9 21;1546 runCtrl[j].fileId = 97 ; 1446 1547 } 1447 1548 } … … 1470 1571 gj.readStat= gj.procStat= gj.writStat= 0 ; 1471 1572 1472 snprintf(str,MXSTR,"Starting EventBuilder ");1573 snprintf(str,MXSTR,"Starting EventBuilder V15.07 A"); 1473 1574 factOut(kInfo,-1, str ) ; 1474 1575 1475 / * initialize run control logics */1576 //initialize run control logics 1476 1577 for (i=0; i<MAX_RUN; i++) { 1477 1578 runCtrl[i].runId = 0 ; … … 1479 1580 } 1480 1581 1481 / * partially initialize event control logics */1582 //partially initialize event control logics 1482 1583 evtCtrl.frstPtr = 0 ; 1483 1584 evtCtrl.lastPtr = 0 ; … … 1501 1602 1502 1603 #ifdef BILAND 1503 xwait.tv_sec = 20;;1604 xwait.tv_sec = 30;; 1504 1605 xwait.tv_nsec= 0 ; // sleep for ~20sec 1505 1606 nanosleep( &xwait , NULL ) ; … … 1509 1610 CloseRunFile( 0, time(NULL)+2, 0) ; 1510 1611 1511 xwait.tv_sec = 5;;1612 xwait.tv_sec = 1;; 1512 1613 xwait.tv_nsec= 0 ; // sleep for ~20sec 1513 1614 nanosleep( &xwait , NULL ) ; … … 1563 1664 1564 1665 int runWrite(FileHandle_t fileHd , EVENT *event, size_t len ) 1565 { return 1; } ; 1666 { return 1; usleep(10000); return 1; } 1667 1668 1669 //{ return 1; } ; 1566 1670 1567 1671 int runClose(FileHandle_t fileHd , RUN_TAIL *runth, size_t len ) … … 1574 1678 int i=0; 1575 1679 1576 1577 1578 1579 1680 // printf("------------%d\n",ntohl(fadhd[7].fad_evt_counter) ); 1681 // for (i=0; i<NBOARDS; i++) { 1682 // printf("b=%2d,=%5d\n",i,fadhd[i].board_id); 1683 // } 1580 1684 return 0; 1581 1685 } … … 1585 1689 int i ; 1586 1690 1587 1588 1589 1590 1691 //for (i=0;i<MAX_SOCK;i++) { 1692 // printf("%4d",gi.numRead[i]); 1693 // if (i%20 == 0 ) printf("\n"); 1694 //} 1591 1695 } 1592 1696 1697 void gotNewRun( int runnr, PEVNT_HEADER *headers ) 1698 { printf("got new run %d\n",runnr); return; } 1593 1699 1594 1700 void factStat(GUI_STAT gj) { … … 1635 1741 1636 1742 g_maxMem = 1024*1024 ; //MBytes 1637 g_maxMem = g_maxMem * 1024 *10 ; //10GBytes 1743 //g_maxMem = g_maxMem * 1024 *10 ; //10GBytes 1744 g_maxMem = g_maxMem * 200; //100MBytes 1638 1745 1639 1746 … … 1661 1768 for (b=0; b<10; b++) { 1662 1769 sprintf(ipStr,"10.0.%d.11",128+c) ; 1663 if (c==0) sprintf(ipStr,"10.0.100.11") ; 1770 if (c<2) sprintf(ipStr,"10.0.%d.11",128) ; 1771 else sprintf(ipStr,"10.0.%d.11",131) ; 1772 // if (c==0) sprintf(ipStr,"10.0.100.11") ; 1664 1773 1665 1774 inet_pton(PF_INET, ipStr, &IPaddr) ;
Note:
See TracChangeset
for help on using the changeset viewer.