]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
adapted to multiple EBs. Sergey
authorhadaq <hadaq>
Wed, 29 Apr 2009 12:49:13 +0000 (12:49 +0000)
committerhadaq <hadaq>
Wed, 29 Apr 2009 12:49:13 +0000 (12:49 +0000)
ebctrl/ioc/ebctrlApp/src/evtbuild.c
ebctrl/ioc/iocBoot/iocebctrl/envPaths
ebctrl/ioc/iocBoot/iocebctrl/st.cmd

index f5a063edfe0576c8e00c9e3b8b1f7895dd33d630..296cbad722fb0962c6500960b497d3c8b1f4833c 100644 (file)
@@ -54,7 +54,10 @@ long evtbuild_proc( struct genSubRecord *pgsub )
   for( i=0; i<11; i++ )
     *out[i] = 0;
 
-  if( Worker_getStatistic( "daq_evtbuild", "nrOfMsgs", out[0] ) == -1) {
+  char buf[_POSIX_PATH_MAX];
+  sprintf( buf, "%s%s", "daq_evtbuild", getenv("EBNUM") );
+
+  if( Worker_getStatistic( buf, "nrOfMsgs", out[0] ) == -1) {
     *out[7] = 0; /* status: Event Builder is off */
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for nrOfMsgs!\n");
@@ -67,7 +70,7 @@ long evtbuild_proc( struct genSubRecord *pgsub )
     }
   }
 
-  if( Worker_getStatistic( "daq_evtbuild", "bytesWritten", out[1] ) == -1) {
+  if( Worker_getStatistic( buf, "bytesWritten", out[1] ) == -1) {
     *out[9] = 0; /* zero data rate */
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for bytesWritten!\n");
@@ -85,7 +88,7 @@ long evtbuild_proc( struct genSubRecord *pgsub )
     *out[1] = (int)((*out[1])/1024./1024. + 0.5);
   }
 
-  if( Worker_getStatistic( "daq_evtbuild", "evtsComplete", out[2] ) == -1) {
+  if( Worker_getStatistic( buf, "evtsComplete", out[2] ) == -1) {
     *out[8] = 0; /* zero evtComp rate  */
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for evtsComplete!\n");
@@ -99,7 +102,7 @@ long evtbuild_proc( struct genSubRecord *pgsub )
     temp[2] = *out[2];
   }
 
-  if( Worker_getStatistic( "daq_evtbuild", "evtsDiscarded", out[3] ) == -1) {
+  if( Worker_getStatistic( buf, "evtsDiscarded", out[3] ) == -1) {
     *out[10] = 0; /* zero evtDisc rate */
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for evtsDiscarded!\n");
@@ -113,26 +116,26 @@ long evtbuild_proc( struct genSubRecord *pgsub )
     temp[3]  = *out[3];
   }
 
-  if( Worker_getStatistic( "daq_evtbuild", "evtsDataError", out[4] ) == -1)
+  if( Worker_getStatistic( buf, "evtsDataError", out[4] ) == -1)
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for evtsDataError!\n");
 
-  if( Worker_getStatistic( "daq_evtbuild", "evtsTagError", out[5] ) == -1)
+  if( Worker_getStatistic( buf, "evtsTagError", out[5] ) == -1)
     if(evtbuildDebug)
       printf("<E> evtbuild.c: Worker_getStatistic failed for evtsTagError!\n");
 
-  char buf[100];
+  char ebbuf[100];
   for( i=0; i<(*out[0]); i++ ) {
 
-    sprintf( buf, "evtbuildBuff%d", i );
+    sprintf( ebbuf, "evtbuildBuff%d", i );
 
-    if( Worker_getStatistic( "daq_evtbuild", buf, out[6] ) == -1) { 
+    if( Worker_getStatistic( buf, ebbuf, out[6] ) == -1) { 
       if(evtbuildDebug)
        printf("<E> evtbuild.c: Worker_getStatistic failed for %s!\n", buf);
     }
     else {
       if(evtbuildDebug) 
-       printf("evtbuild.c, %s = %lu\n", buf, *out[6]);
+       printf("evtbuild.c, %s = %lu\n", ebbuf, *out[6]);
 
       out[6]++;
     }
index 279023c9f2d6de21b20a26b700c3af35667982b6..698a62989b6398467bc395a09ec8ac9e11f313fe 100644 (file)
@@ -1,4 +1,4 @@
 epicsEnvSet(ARCH,"linux-x86")
 epicsEnvSet(IOC,"iocebctrl")
-epicsEnvSet(TOP,"/home/scs/yurevich/ebctrl/ioc")
+epicsEnvSet(TOP,"/home/scs/ebctrl/ioc")
 epicsEnvSet(EPICS_BASE,"/home/scs/base-3.14.9")
index 1549e4bf18c4cff3bc8af5c7c8d2481acc683bdd..0b22a97d73a6d74abf1716c10ba4bc61ac010e45 100644 (file)
@@ -6,6 +6,7 @@
 
 < envPaths
 epicsEnvSet(EBTYPE,"slave")
+epicsEnvSet(EBNUM,"1")
 
 cd ${TOP}