JAM: disabled that slave eventbuilder can close their run when exceeding 1.8 G limit.
authorhadaq <hadaq>
Mon, 23 Apr 2012 15:41:12 +0000 (15:41 +0000)
committerhadaq <hadaq>
Mon, 23 Apr 2012 15:41:12 +0000 (15:41 +0000)
This could lead to files with the "duplicate run id", which are not properly handled by oracle+ analysis. Instead, continue writing extra long files and put a warning in log after epics master has ended  the run.

hadaq/evtbuild.c

index 7a9cf17c4a08b6d49c5f978878fa1f39c5625965..7ef1a3532c6aeb4e56f9d3356714a2fb89a9d073 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.165 2012-04-05 07:08:35 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/evtbuild.c,v 6.166 2012-04-23 15:41:12 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #define SYSLOG_NAMES
@@ -1563,20 +1563,26 @@ int main(int argc, char *argv[])
 
                newRunId = getRunId(theArgs);
 
+
+               /* */
+
+
+
                /*
                 *  The following conditions mean:
                 *  theArgs->epicsCtrl == 1 && runNr < newRunId
                 *           New RUN Id was generated, close the file and open new one.
                 *  theArgs->epicsCtrl == 1 && (*theStats->bytesWritten) >= 1900000000
                 *           Due to whatever reason the file size exceeded an allowed limit,
-                *           close the file.
+                *           close the file. JAM disabled this option!
                 *  theArgs->epicsCtrl == 1 && runNr == 0
                 *           Something went wrong with sinchronization of Event Builders,
                 *           close the file.
                 */
                if ((!(theArgs->epicsCtrl) && (*theStats->bytesWritten) >= theArgs->maxFileSz) ||
                        (theArgs->epicsCtrl && runNr < newRunId) ||
-                       (theArgs->epicsCtrl && (*theStats->bytesWritten) >= 1900000000) || (theArgs->epicsCtrl && newRunId == 0)) {
+                       /* (theArgs->epicsCtrl && (*theStats->bytesWritten) >= 1900000000) JAM disable closing run ourselfs if we are slave */
+                       (theArgs->epicsCtrl && newRunId == 0)) {
                        evt = newEvt(EvtDecoding_64bitAligned, EvtId_runStop);
 
                        for (i = 0; i < theArgs->slowCtrlFileCnt; i++)
@@ -1598,6 +1604,15 @@ int main(int argc, char *argv[])
                        /* store simple stop run info */
                        storeRunInfoStop(ourTime, theArgs, theStats);
 
+                       /* JAM instead of changing filename, we just report extra long files */
+                       if (theArgs->epicsCtrl && (*theStats->bytesWritten) > 1900000000) {
+                               sprintf(msglog,
+                                               "<W> Size %d of previous file %s is much bigger than master EB limit. Asymmetric Eventbuilder load?",
+                                               *theStats->bytesWritten, theArgs->fileName);
+                               storeLogInfo(theArgs, msglog);
+                       }
+
+
                        (*theStats->bytesWritten) = 0;
                        (*theStats->evtsComplete) = 0;
                        (*theStats->evtsDiscarded) = 0;