]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Removed the SYNCHRONOUS stuff (was introduced end of 99 for test
authorhades <hades>
Tue, 10 Apr 2001 13:28:51 +0000 (13:28 +0000)
committerhades <hades>
Tue, 10 Apr 2001 13:28:51 +0000 (13:28 +0000)
during beam time)

hadaq/hwrich.c

index 7660ca5b75361862f3359e1b95ddea28c14a823c..5c16a63706814d07e701e1a9cca675319a5e4f88 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.14 2001-03-07 16:02:44 hades Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.15 2001-04-10 13:28:51 hades Exp $";
 
 
 #define _POSIX_C_SOURCE 199309L
@@ -9,14 +9,6 @@ static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hada
 #include <string.h>
 #include <sys/time.h>
 
-#undef SYNCHRONOUS
-
-#ifdef SYNCHRONOUS
-#include <lvme.h>
-
-#include "dtu_defs.h"
-
-#endif
 #include <allParam.h>
 #include "subevt.h"
 #include "hwrace.h"
@@ -28,9 +20,6 @@ struct HardwareS {
        size_t maxSubEvtSize;
        HwRace *race[NRACES];
        unsigned raceToRead;
-#ifdef SYNCHRONOUS
-       LVme *lvme;
-#endif
 };
 
 #include "hardware.h"
@@ -50,13 +39,6 @@ Hardware *newHardware(void)
        Hardware *my;
        Param paramS, *param = &paramS;
        int i;
-#ifdef SYNCHRONOUS
-       unsigned long cardBase;
-#endif
-
-#ifdef SYNCHRONOUS
-       cardBase = 0x44100000;
-#endif
 
        if (0 > conParam(param)) {
                msglog(LOG_ERR, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno));
@@ -78,15 +60,6 @@ Hardware *newHardware(void)
                }
        }
 
-#ifdef SYNCHRONOUS
-       my->lvme = allocMem(sizeof(LVme));
-       if (-1 == conLVme(my->lvme, cardBase, 0x100000, 0x09, 0, 0)) {
-               return NULL;
-       }
-       /* set Lock Busy */
-       LVme_setBitL(my->lvme, STATUS1, 4);
-#endif
-
        desParam(param);
        return my;
 }
@@ -99,31 +72,11 @@ void deleteHardware(Hardware *my)
                desHwRace(my->race[i]);
                freeMem(my->race[i]);
        }
-#ifdef SYNCHRONOUS
-       desLVme(my->lvme);
-#endif
-
        freeMem(my);
 }
 
 void Hardware_waitForTrigger(Hardware *my, void *subEvt)
 {
-#ifdef SYNCHRONOUS
-       static int beginRun = 1; /* eat 1 triggers at begin run */
-
-       while (beginRun > 0) {
-               /* wait for begin run trigger and release busy afterwards */
-               while (!LVme_tstBitL(my->lvme, STATUS1, 6)) {
-                       struct timespec tS, *t = &tS;
-                       t->tv_sec = 0;
-                       t->tv_nsec = 020000000;
-                       nanosleep(t, NULL);
-               }
-               LVme_setL(my->lvme, RELEASE1, 0xee);
-               sleep(1);
-               beginRun--;
-       }
-#endif
 }
 
 void Hardware_readout(Hardware *my, void *partEvt)
@@ -135,18 +88,7 @@ void Hardware_readout(Hardware *my, void *partEvt)
 
        for (my->raceToRead = 0; my->raceToRead < NRACES; my->raceToRead++) {
                if (HwRace_isEmpty(my->race[my->raceToRead])) {
-#ifdef SYNCHRONOUS
-                       LVme_setL(my->lvme, RELEASE1, 0xee);
-                       for (i = 0; i < 20000; i++) {
-                               j = 1 + 1;
-                       }
-#endif
                        HwRace_requestBuffer(my->race[my->raceToRead]);
-#ifdef SYNCHRONOUS
-                       for (i = 0; i < 20000; i++) {
-                               j = 1 + 1;
-                       }
-#endif
                        while (HwRace_isBusy(my->race[my->raceToRead])) {
 #if 0
 /*