- Timestamp:
- 11/13/11 16:50:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilder.c
r12491 r12506 191 191 if (EtiMemoryChunks[numAllocatedChunks].pointers[0] == NULL) 192 192 { 193 snprintf (str, MXSTR, " could not allocate %lu bytes. %d chunks are currently allocated (max allowed %lu bytes)", MAX_CHUNK_SIZE, numAllocatedChunks, g_maxMem);193 snprintf (str, MXSTR, "Allocation of %lu bytes failed. %d chunks are currently allocated (max allowed %lu bytes)", MAX_CHUNK_SIZE, numAllocatedChunks, g_maxMem); 194 194 factOut (kError, 000, str); 195 195 return NULL; … … 218 218 if (currentChunk->events[mBufferMapping[evtIndex].slot] != evtId) 219 219 { 220 snprintf (str, MXSTR, "Mismatch in chunk mapping table. expected evtId %d. Got %d. No memory was freed.", evtId, currentChunk->events[mBufferMapping[evtIndex].slot]);220 snprintf (str, MXSTR, "Mismatch in chunk mapping table. Expected evtId %d. Got %d. No memory was freed.", evtId, currentChunk->events[mBufferMapping[evtIndex].slot]); 221 221 factOut (kError, 000, str); 222 222 return; … … 233 233 if (EtiMemoryChunks[chunkIndex].pointers[0] == NULL) 234 234 { 235 snprintf(str, MXSTR, "Chunk %d not allocated as it ought to be. Skipping release", chunkIndex);235 snprintf(str, MXSTR, "Chunk %d not allocated as it ought to be. Skipping memory release.", chunkIndex); 236 236 factOut(kError, 000, str); 237 237 return; … … 367 367 j = close (rd->socket); 368 368 if (j > 0) { 369 snprintf (str, MXSTR, "Error closing socket %d | %m", sid);369 snprintf (str, MXSTR, "Closing socket %d failed: %m (close,rc=%d)", sid, errno); 370 370 factOut (kFatal, 771, str); 371 371 } else { … … 398 398 rd->rBuf = malloc (sizeof (CNV_FACT)); 399 399 if (rd->rBuf == NULL) { 400 snprintf (str, MXSTR, "Could not create local buffer %d ", sid);400 snprintf (str, MXSTR, "Could not create local buffer %d (malloc failed)", sid); 401 401 factOut (kFatal, 774, str); 402 402 rd->sockStat = 77; … … 407 407 408 408 if ((rd->socket = socket (PF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0)) <= 0) { 409 snprintf (str, MXSTR, "Could not generate socket %d | %m", sid);409 snprintf (str, MXSTR, "Generating socket %d failed: %m (socket,rc=%d)", sid, errno); 410 410 factOut (kFatal, 773, str); 411 411 rd->sockStat = 88; … … 414 414 optval = 1; 415 415 if (setsockopt (rd->socket, SOL_SOCKET, SO_KEEPALIVE, &optval, optlen) < 0) { 416 snprintf (str, MXSTR, "Could not set keepalive %d | %m", sid);416 snprintf (str, MXSTR, "Setting SO_KEEPALIVE for socket %d failed: %m (setsockopt,rc=%d)", sid, errno); 417 417 factOut (kInfo, 173, str); //but continue anyhow 418 418 } 419 419 optval = 10; //start after 10 seconds 420 420 if (setsockopt (rd->socket, SOL_TCP, TCP_KEEPIDLE, &optval, optlen) < 0) { 421 snprintf (str, MXSTR, " Could not set keepidle %d | %m", sid);421 snprintf (str, MXSTR, "Setting TCP_KEEPIDLE for socket %d failed: %m (setsockopt,rc=%d)", sid, errno); 422 422 factOut (kInfo, 173, str); //but continue anyhow 423 423 } 424 424 optval = 10; //do every 10 seconds 425 425 if (setsockopt (rd->socket, SOL_TCP, TCP_KEEPINTVL, &optval, optlen) < 0) { 426 snprintf (str, MXSTR, " Could not set keepintvl %d | %m", sid);426 snprintf (str, MXSTR, "Setting TCP_KEEPINTVL for socket %d failed: %m (setsockopt,rc=%d)", sid, errno); 427 427 factOut (kInfo, 173, str); //but continue anyhow 428 428 } 429 429 optval = 2; //close after 2 unsuccessful tries 430 430 if (setsockopt (rd->socket, SOL_TCP, TCP_KEEPCNT, &optval, optlen) < 0) { 431 snprintf (str, MXSTR, " Could not set keepalive probes %d | %m", sid);431 snprintf (str, MXSTR, "Setting TCP_KEEPCNT for socket %d failed: %m (setsockopt,rc=%d)", sid, errno); 432 432 factOut (kInfo, 173, str); //but continue anyhow 433 433 } 434 434 435 435 436 snprintf (str, MXSTR, "Successfully generated socket %d 436 snprintf (str, MXSTR, "Successfully generated socket %d", sid); 437 437 factOut (kInfo, 773, str); 438 438 rd->sockStat = -1; //try to (re)open socket … … 502 502 503 503 int i, b, evFree; 504 int headmem = 0;504 // int headmem = 0; 505 505 size_t needmem = 0; 506 506 … … 509 509 510 510 if (nRoi[0] < 0 || nRoi[0] > 1024) { 511 snprintf (str, MXSTR, "illegal nRoi[0]: %d", nRoi[0]);511 snprintf (str, MXSTR, "Illegal roi in channel 0: %d (allowed: 0<=roi<=1024)", nRoi[0]); 512 512 factOut (kError, 999, str); 513 513 gj.badRoiR++; … … 518 518 for (int jr = 1; jr < 8; jr++) { 519 519 if (nRoi[jr] != nRoi[0]) { 520 snprintf (str, MXSTR, "wrong nRoi[%d]: %d %d", jr, nRoi[jr], 521 nRoi[0]); 520 snprintf (str, MXSTR, "Mismatch of roi (%d) in channel %d with roi (%d) in channel 0.", nRoi[jr], jr, nRoi[0]); 522 521 factOut (kError, 711, str); 523 522 gj.badRoiB++; … … 527 526 } 528 527 if (nRoi[8] < nRoi[0]) { 529 snprintf (str, MXSTR, " wrong nRoi_TM: %d %d", nRoi[8], nRoi[0]);528 snprintf (str, MXSTR, "Mismatch of roi (%d) in channel 8. Should be larger or equal than the roi (%d) in channel 0.", nRoi[8], nRoi[0]); 530 529 factOut (kError, 712, str); 531 530 gj.badRoiB++; … … 543 542 if (mBuffer[i].nRoi != nRoi[0] 544 543 || mBuffer[i].nRoiTM != nRoi[8]) { 545 snprintf (str, MXSTR, " illegal evt_roi %d %d ; %d %d",546 nRoi[0], nRoi[8], mBuffer[i].nRoi, mBuffer[i].nRoiTM);544 snprintf (str, MXSTR, "Mismatch of roi within event. Expected roi=%d and roi_tm=%d, got %d and %d.", 545 mBuffer[i].nRoi, mBuffer[i].nRoiTM, nRoi[0], nRoi[8]); 547 546 factOut (kError, 821, str); 548 547 gj.badRoiE++; … … 570 569 //event does not yet exist; create it 571 570 if (evFree < 0) { //no space available in ctrl 572 snprintf (str, MXSTR, " no control slot to keep event %d", evID);571 snprintf (str, MXSTR, "No control slot to keep event %d", evID); 573 572 factOut (kError, 881, str); 574 573 return -1; … … 594 593 if (runCtrl[k].roi0 != nRoi[0] 595 594 || runCtrl[k].roi8 != nRoi[8]) { 596 snprintf (str, MXSTR, " illegal run_roi %d %d ; %d %d",597 nRoi[0], nRoi[8], runCtrl[k].roi0, runCtrl[k].roi8);595 snprintf (str, MXSTR, "Mismatch of roi within run. Expected roi=%d and roi_tm=%d, got %d and %d.", 596 runCtrl[k].roi0, runCtrl[k].roi8, nRoi[0], nRoi[8]); 598 597 factOut (kError, 931, str); 599 598 gj.badRoiR++; … … 613 612 614 613 if (evFree < 0 && jold < 0) { 615 snprintf (str, MXSTR, " not able to register the new run %d", runID);614 snprintf (str, MXSTR, "Not able to register the new run %d", runID); 616 615 factOut (kFatal, 883, str); 617 616 return -1001; … … 619 618 if (evFree < 0) 620 619 evFree = jold; 621 snprintf (str, MXSTR, " register new run %d(%d) roi: %d%d", runID,620 snprintf (str, MXSTR, "New run %d (evFree=%d) registered with roi=%d and roi_tm=%d", runID, 622 621 evFree, nRoi[0], nRoi[8]); 623 622 factOut (kInfo, 503, str); … … 678 677 if (gi_memStat > 0) { 679 678 gi_memStat = -99; 680 snprintf (str, MXSTR, " no memory left to keep event %6d sock %3d",679 snprintf (str, MXSTR, "No memory left to keep event %6d sock %3d", 681 680 evID, sk); 682 681 factOut (kError, 882, str); 683 682 } else { 684 snprintf (str, MXSTR, " no memory left to keep event %6d sock %3d",683 snprintf (str, MXSTR, "No memory left to keep event %6d sock %3d", 685 684 evID, sk); 686 685 factOut (kDebug, 882, str); … … 901 900 902 901 903 snprintf (str, MXSTR, " start initializing");902 snprintf (str, MXSTR, "Start initializing (readFAD)"); 904 903 factOut (kInfo, -1, str); 905 904 906 905 int cpu = 7; //read thread 907 cpu_set_t mask;906 // cpu_set_t mask; 908 907 909 908 /* CPU_ZERO initializes all the bits in the mask to zero. */ … … 980 979 gj.evtSkip = gj.evtWrite = gj.evtErr = 0; 981 980 982 int b ,p;981 int b; 983 982 for (b = 0; b < NBOARDS; b++) 984 983 gj.badRoi[b] = 0; … … 986 985 mBufInit (); //initialize buffers 987 986 988 snprintf (str, MXSTR, " end initializing");987 snprintf (str, MXSTR, "End initializing (readFAD)"); 989 988 factOut (kInfo, -1, str); 990 989 } … … 1087 1086 gi.numConn[b]++; 1088 1087 gj.numConn[b]++; 1089 snprintf (str, MXSTR, " +++connect %d %d", b, gi.numConn[b]);1088 snprintf (str, MXSTR, "New connection %d (number of connections: %d)", b, gi.numConn[b]); 1090 1089 factOut (kInfo, -1, str); 1091 1090 } … … 1127 1126 } else if (jrd < 0) { //did not read anything 1128 1127 if (errno != EAGAIN && errno != EWOULDBLOCK) { 1129 snprintf (str, MXSTR, "Error Reading from %d | %m", i);1128 snprintf (str, MXSTR, "Reading from socket %d failed: %m (recv,rc=%d)", i, errno); 1130 1129 factOut (kError, 442, str); 1131 1130 gi.gotErr[b]++; … … 1170 1169 gi.evtErr++; 1171 1170 snprintf (str, MXSTR, 1172 "wrong end of buffer found sock %3d ev %4d len %5d %3d %3d - %3d %3d ", 1173 i, rd[i].fadLen, rd[i].evtID, rd[i].rBuf->B[0], 1174 rd[i].rBuf->B[1], 1175 rd[i].rBuf->B[rd[i].bufPos - 2], 1176 rd[i].rBuf->B[rd[i].bufPos - 1]); 1171 "End-of-event flag wrong on socket %3d for event %4d (len=%5d), expected %3d %3d, got %3d %3d", 1172 i, rd[i].evtID, rd[i].fadLen, stop.B[0], stop.B[1], 1173 rd[i].rBuf->B[rd[i].bufPos - 1], rd[i].rBuf->B[rd[i].bufPos - 2]); 1177 1174 factOut (kError, 301, str); 1178 1175 goto EndBuf; … … 1251 1248 if (checkRoi != roi[0]) 1252 1249 { 1253 snprintf (str, MXSTR, "Inconsistent Roi accross board patches a %d %d%d", kr, checkRoi, roi[0]);1250 snprintf (str, MXSTR, "Inconsistent Roi accross boards B=%d, expected %d, got %d", kr, checkRoi, roi[0]); 1254 1251 factOut (kError, 1, str); 1255 1252 goto EndBuf; … … 1267 1264 if (checkRoi != roi[jr]) 1268 1265 { 1269 snprintf (str, MXSTR, "Inconsistent Roi accross board patches B=%d P=%d %d%d", kr, jr, roi[jr], checkRoi);1266 snprintf (str, MXSTR, "Inconsistent Roi accross patches B=%d P=%d, expected %d, got %d", kr, jr, roi[jr], checkRoi); 1270 1267 factOut (kFatal, 1, str); 1271 1268 goto EndBuf; … … 1325 1322 int fadCrate = fadBoard / 256; 1326 1323 if (boardId != (fadCrate * 10 + fadBoard % 256)) { 1327 snprintf (str, MXSTR, " wrong Board ID %d %d %d",1328 fadCrate, fadBoard % 256, boardId);1324 snprintf (str, MXSTR, "Board ID mismatch. Expected %d, got %d (C=%d, B=%d)", 1325 boardId, fadBoard, fadCrate, fadBoard % 256); 1329 1326 factOut (kWarn, 301, str); 1330 1327 } 1331 1328 if (mBuffer[evID].board[boardId] != -1) { 1332 1329 snprintf (str, MXSTR, 1333 " double board: ev %5d, b %3d, %3d; len %5d %3d %3d - %3d %3d",1330 "Got event %5d from board %3d (i=%3d, len=%5d) twice: Starts with %3d %3d - ends with %3d %3d", 1334 1331 evID, boardId, i, rd[i].fadLen, 1335 1332 rd[i].rBuf->B[0], rd[i].rBuf->B[1], … … 1403 1400 if (++runCtrl[ir].lastEvt == 0) { 1404 1401 gotNewRun (actrun, mBuffer[evID].FADhead); 1405 snprintf (str, MXSTR, "gotNewRun %d (ev %d)",1402 snprintf (str, MXSTR, "gotNewRun called for run %d, event %d", 1406 1403 mBuffer[evID].runNum, 1407 1404 mBuffer[evID].evNum); … … 1458 1455 if (rd[i].bufPos >= minLen) { 1459 1456 if (rd[i].skip > 0) { 1460 snprintf (str, MXSTR, " skipped %d bytes on port%d",1457 snprintf (str, MXSTR, "Skipped %d bytes on port %d", 1461 1458 rd[i].skip, i); 1462 1459 factOut (kInfo, 666, str); … … 1574 1571 for (ib=0; ib<NBOARDS; ib++) { 1575 1572 if (ib%10==0) { 1576 snprintf (&str[ik], MXSTR, " '");1573 snprintf (&str[ik], MXSTR, "|"); 1577 1574 ik++; 1578 1575 } … … 1589 1586 ik++; 1590 1587 } 1591 snprintf (&str[ik], MXSTR, " '");1588 snprintf (&str[ik], MXSTR, "|"); 1592 1589 factOut (kWarn, 601, str); 1593 1590 … … 1654 1651 1655 1652 1656 snprintf (str, MXSTR, " stop reading ... RESET=%d", g_reset);1653 snprintf (str, MXSTR, "Stop reading ... RESET=%d", g_reset); 1657 1654 factOut (kInfo, -1, str); 1658 1655 … … 1681 1678 if (gi_resetS > 0) { 1682 1679 //must close all open sockets ... 1683 snprintf (str, MXSTR, " close all sockets...");1680 snprintf (str, MXSTR, "Close all sockets..."); 1684 1681 factOut (kInfo, -1, str); 1685 1682 for (i = 0; i < MAX_SOCK; i++) { … … 1723 1720 if (gi_resetR == 1) { 1724 1721 minclear = 900; 1725 snprintf (str, MXSTR, " drain all buffers ...");1722 snprintf (str, MXSTR, "Drain all buffers ..."); 1726 1723 } else { 1727 1724 minclear = 0; 1728 snprintf (str, MXSTR, " flush all buffers ...");1725 snprintf (str, MXSTR, "Flush all buffers ..."); 1729 1726 } 1730 1727 factOut (kInfo, -1, str); … … 1792 1789 subProc (void *thrid) 1793 1790 { 1794 int threadID, status, numWait, numProc, kd, k1, k0, k, jret; 1791 int64_t threadID; 1792 int numWait, numProc, k, jret; 1795 1793 struct timespec xwait; 1796 1794 1797 int32_t cntr ;1798 1799 threadID = (int )thrid;1800 1801 snprintf (str, MXSTR, "Starting sub-process-thread % d", threadID);1795 // int32_t cntr ; 1796 1797 threadID = (int64_t)thrid; 1798 1799 snprintf (str, MXSTR, "Starting sub-process-thread %ld", threadID); 1802 1800 factOut (kInfo, -1, str); 1803 1801 … … 1826 1824 if (jret <= threadID) { 1827 1825 snprintf (str, MXSTR, 1828 " process %d wants to send to process %d",1826 "Process %ld wants to send event to process %d... not allowed.", 1829 1827 threadID, jret); 1830 1828 factOut (kError, -1, str); … … 1844 1842 1845 1843 if (gj.readStat < -10 && numWait == 0) { //nothing left to do 1846 snprintf (str, MXSTR, "Exit subProcessing Process %d", threadID);1844 snprintf (str, MXSTR, "Exit subProcessing in process %ld", threadID); 1847 1845 factOut (kInfo, -1, str); 1848 1846 return 0; … … 1856 1854 } 1857 1855 1858 snprintf (str, MXSTR, "Ending sub-process-thread % d", threadID);1856 snprintf (str, MXSTR, "Ending sub-process-thread %ld", threadID); 1859 1857 factOut (kInfo, -1, str); 1860 return ;1858 return 0; 1861 1859 } /*-----------------------------------------------------------------*/ 1862 1860 … … 1867 1865 /* *** main loop processing file, including SW-trigger */ 1868 1866 int numProc, numWait; 1869 int k,status, j;1867 int status, j; 1870 1868 struct timespec xwait; 1871 1869 char str[MXSTR]; … … 1875 1873 int lastRun = 0; //usually run from last event still valid 1876 1874 1877 cpu_set_t mask;1878 int cpu = 1; //process thread (will be several in final version)1879 1880 snprintf (str, MXSTR, "Starting process-thread with %d subprocess ",1875 // cpu_set_t mask; 1876 // int cpu = 1; //process thread (will be several in final version) 1877 1878 snprintf (str, MXSTR, "Starting process-thread with %d subprocesses", 1881 1879 gi_maxProc); 1882 1880 factOut (kInfo, -1, str); … … 1903 1901 int th_ret[100]; 1904 1902 1905 for ( k = 0; k < gi_maxProc; k++) {1903 for (long long k = 0; k < gi_maxProc; k++) { 1906 1904 th_ret[k] = pthread_create (&thread[k], NULL, subProc, (void *) k); 1907 1905 } … … 1915 1913 1916 1914 int k1 = evtCtrl.frstPtr; 1917 for ( k = k1; k < (k1 + kd); k++) {1915 for (int k = k1; k < (k1 + kd); k++) { 1918 1916 int k0 = k % (MAX_EVT * MAX_RUN); 1919 1917 //would be better to use bitmaps for evtStat (allow '&' instead of multi-if) … … 1939 1937 if (j >= MAX_RUN) { 1940 1938 snprintf (str, MXSTR, 1941 " P error: can not find run %d for event %d in %d",1939 "procEvt: Can not find run %d for event %d in %d", 1942 1940 irun, ievt, id); 1943 1941 factOut (kFatal, 901, str); … … 1955 1953 //---- problem: processing still going on ==> must wait for closing .... 1956 1954 snprintf (str, MXSTR, 1957 " P finishrun since new one opened %d",1955 "procEvt: Finished run since new one opened %d", 1958 1956 runCtrl[j1].runId); 1959 1957 runFinish1 (runCtrl[j1].runId); … … 1983 1981 if (runCtrl[j].fileHd == NULL) { 1984 1982 snprintf (str, MXSTR, 1985 " P could not open a file for run %d", irun);1983 "procEvt: Could not open a file for run %d (runOpen failed)", irun); 1986 1984 factOut (kError, 502, str); 1987 1985 runCtrl[j].fileId = 91; 1988 1986 runCtrl[j].procId = 91; 1989 1987 } else { 1990 snprintf (str, MXSTR, "P opened new run_file %d evt %d",1988 snprintf (str, MXSTR, "procEvt: Opened new file for run %d (evt=%d)", 1991 1989 irun, ievt); 1992 1990 factOut (kInfo, -1, str); … … 2002 2000 || runCtrl[j].maxEvt <= runCtrl[j].procEvt) { 2003 2001 snprintf (str, MXSTR, 2004 " P reached end of run condition for run %d",2002 "procEvt: Reached end of run condition for run %d", 2005 2003 irun); 2006 2004 factOut (kInfo, 502, str); … … 2011 2009 if (runCtrl[j].procId != 0) { 2012 2010 snprintf (str, MXSTR, 2013 " P skip event %d because no active run %d", ievt,2011 "procEvt: Skip event %d because no active run %d", ievt, 2014 2012 irun); 2015 2013 factOut (kDebug, 502, str); … … 2113 2111 kd += (MAX_EVT * MAX_RUN); 2114 2112 2115 for ( k = 0; k < gi_maxProc; k++) {2113 for (int k = 0; k < gi_maxProc; k++) { 2116 2114 pthread_join (thread[k], (void **) &status); 2117 2115 } 2118 2116 2119 2117 int k1 = evtCtrl.frstPtr; 2120 for ( k = k1; k < (k1 + kd); k++) {2118 for (int k = k1; k < (k1 + kd); k++) { 2121 2119 int k0 = k % (MAX_EVT * MAX_RUN); 2122 2120 if (evtCtrl.evtStat[k0] >= 0 && evtCtrl.evtStat[k0] < 1000) { … … 2180 2178 char str[MXSTR]; 2181 2179 2182 cpu_set_t mask;2183 int cpu = 1; //write thread2180 // cpu_set_t mask; 2181 // int cpu = 1; //write thread 2184 2182 2185 2183 snprintf (str, MXSTR, "Starting write-thread"); … … 2230 2228 if (j >= MAX_RUN) { 2231 2229 snprintf (str, MXSTR, 2232 " W error: can not find run %d for event %d in %d",2230 "writeEvt: Can not find run %d for event %d in %d", 2233 2231 irun, ievt, id); 2234 2232 factOut (kFatal, 901, str); … … 2260 2258 if (runCtrl[j].fileHd == NULL) { 2261 2259 snprintf (str, MXSTR, 2262 " W could not open a file for run %d", irun);2260 "writeEvt: Could not open a file for run %d (runOpen failed)", irun); 2263 2261 factOut (kError, 502, str); 2264 2262 runCtrl[j].fileId = 91; 2265 2263 } else { 2266 snprintf (str, MXSTR, "W opened new run_file %d evt %d",2264 snprintf (str, MXSTR, "writeEvt: Opened new file for run %d (evt %d)", 2267 2265 irun, ievt); 2268 2266 factOut (kInfo, -1, str); … … 2275 2273 if (runCtrl[j].fileId < 0) { 2276 2274 snprintf (str, MXSTR, 2277 " W never opened file for thisrun %d", irun);2275 "writeEvt: Never opened file for run %d", irun); 2278 2276 factOut (kError, 123, str); 2279 2277 } else if (runCtrl[j].fileId < 100) { 2280 snprintf (str, MXSTR, "W.file for this run is closed %d",2278 snprintf (str, MXSTR, "writeEvt: File for run %d is closed", 2281 2279 irun); 2282 2280 factOut (kWarn, 123, str); 2283 2281 runCtrl[j].fileId += 100; 2284 2282 } else { 2285 snprintf (str, MXSTR, "W:file for this run is closed %d",2283 snprintf (str, MXSTR, "writeEvt: File for run %d is closed", 2286 2284 irun); 2287 2285 factOut (kDebug, 123, str); … … 2304 2302 // gj.writEvt++ ; 2305 2303 } else { 2306 snprintf (str, MXSTR, "W error writing event for run %d",2304 snprintf (str, MXSTR, "writeEvt: Writing event for run %d failed (runWrite)", 2307 2305 irun); 2308 2306 factOut (kError, 503, str); … … 2340 2338 sizeof (runTail[j])); 2341 2339 if (i < 0) { 2342 snprintf (str, MXSTR, "error closing run %d %d AAA",2340 snprintf (str, MXSTR, "writeEvt: Error closing run %d (runClose[1],i=%d)", 2343 2341 runCtrl[j].runId, i); 2344 2342 factOut (kError, 503, str); 2345 2343 runCtrl[j].fileId = 92; 2346 2344 } else { 2347 snprintf (str, MXSTR, "W closed run %d AAA %d", irun,2345 snprintf (str, MXSTR, "writeEvt: Closed run %d (ii[1]=%d)", irun, 2348 2346 ii); 2349 2347 factOut (kInfo, 503, str); … … 2380 2378 (runCtrl[j].runId != 0)) 2381 2379 { 2382 snprintf (str, MXSTR, " No file will be opened for run #%ud. latest run: %ud (started)", runCtrl[j].runId, maxStartedRun);2380 snprintf (str, MXSTR, "writeEvt: No file will be opened for run %ud. Last run: %ud (started)", runCtrl[j].runId, maxStartedRun); 2383 2381 factOut (kInfo, 000, str); 2384 2382 ;//TODO notify that this run will never be opened … … 2411 2409 sizeof (runTail[j])); 2412 2410 if (i < 0) { 2413 snprintf (str, MXSTR, "error closing run %d %d BBB",2411 snprintf (str, MXSTR, "writeEvt: Error closing run %d (runClose[2],i=%d)", 2414 2412 runCtrl[j].runId, i); 2415 2413 factOut (kError, 506, str); 2416 2414 runCtrl[j].fileId = 94; 2417 2415 } else { 2418 snprintf (str, MXSTR, "W closed run %d BBB %d",2416 snprintf (str, MXSTR, "writeEvt: Closed run %d (ii[2]=%d)", 2419 2417 runCtrl[j].runId, ii); 2420 2418 factOut (kInfo, 507, str); … … 2470 2468 ii = 4; 2471 2469 if (i < 0) { 2472 snprintf (str, MXSTR, "error closing run %d %d CCC",2470 snprintf (str, MXSTR, "writeEvt: Error closing run %d (runClose[3],i=%d)", 2473 2471 runCtrl[j].runId, i); 2474 2472 factOut (kError, 506, str); 2475 2473 runCtrl[j].fileId = 96; 2476 2474 } else { 2477 snprintf (str, MXSTR, "W closed run %d CCC %d", runCtrl[j].runId,2475 snprintf (str, MXSTR, "writeEvt: Closed run %d (ii[3]=%d)", runCtrl[j].runId, 2478 2476 ii); 2479 2477 factOut (kInfo, 507, str); … … 2523 2521 gi_maxProc = g_maxProc; 2524 2522 if (gi_maxProc <= 0 || gi_maxProc > 90) { 2525 snprintf (str, MXSTR, " illegal number of processes %d", gi_maxProc);2523 snprintf (str, MXSTR, "Illegal number of processes %d", gi_maxProc); 2526 2524 factOut (kFatal, 301, str); 2527 2525 gi_maxProc = 1;
Note:
See TracChangeset
for help on using the changeset viewer.