]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
was working with beam on 02-11-05, wk
authorhadaq <hadaq>
Wed, 6 Nov 2002 18:36:04 +0000 (18:36 +0000)
committerhadaq <hadaq>
Wed, 6 Nov 2002 18:36:04 +0000 (18:36 +0000)
hadaq/hwsam.c

index 0c109ae923f45f6d1b3f4fdc03ceb99bffd03d9e..a956acecb3c7a845210f9f042639204ccfc00812 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwsam.c,v 6.14 2002-10-27 12:26:49 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwsam.c,v 6.15 2002-11-06 18:36:04 hadaq Exp $";
 
 #include <assert.h>
 #include <string.h>
@@ -97,15 +97,12 @@ void HwSam_getEndOfData(HwSam *my)
 
 /* 5 RC Headers + Subevent Header + some data */
 #define SAM_NODATASIZE 0
-#define RC_HEADERLENGTH 12
 int HwSam_readSubEvt(HwSam *my, void *subEvt)
 {
-       uint32_t * dataStart = (uint32_t *) subEvt;
-       uint32_t * data;
+       uint32_t * data = (uint32_t *) subEvt;
        int lastAddr;
        int currAddr = my->currAddr;
-       int size, rcSize;
-       int rcSubEvt; /* pointer to length in rc sub-sub-event header */
+       int size;
 
 #ifndef NDEBUG
        syslog(LOG_DEBUG, "readSubEvt in");
@@ -127,44 +124,10 @@ int HwSam_readSubEvt(HwSam *my, void *subEvt)
        syslog(LOG_DEBUG, "readSubEvt subevt: %s", SubEvt_2charP(subEvt));
 #endif
        /* copy one sub evt from Sam to memory */
-       data = dataStart;
-       /* copy remaining header */
-       *++data = LVme_getL(my->cram, currAddr+=4);
-       *++data = LVme_getL(my->cram, currAddr+=4);
-       *++data = LVme_getL(my->cram, currAddr+=4);
-
-       rcSubEvt = (currAddr+=4);
-       while (rcSubEvt < lastAddr) {
-               /*
-                 Skip rc subevent header if no data: tag, length, rc-id.
-                 This hack belongs into the RC code
-                 where tags should be compared to internal counters.
-                 If inconsistent, debug data can be inserted marked by the 
-                  upermost bit on.
-               */
-               int rcSize16;
-               rcSize = LVme_getL(my->cram, currAddr+4);
-               rcSize16 = rcSize & 0xffff;
-               rcSubEvt += rcSize16 * 4 + RC_HEADERLENGTH;
-
-/* if no data ... cut roc header */
-/*
-               if( rcSize16 == 0) {
-                       size -= RC_HEADERLENGTH;
-                       currAddr += RC_HEADERLENGTH;
-               } else {
-*/
-                       *++data = LVme_getL(my->cram, currAddr);
-                       *++data = rcSize;
-                       *++data = LVme_getL(my->cram, currAddr+=8);
-                       while((currAddr+=4) < rcSubEvt) {
-                         *++data = LVme_getL(my->cram, currAddr);
-                       }
-/*
-               }
-*/
+       *data++ = size;
+       while ((currAddr+=4)<lastAddr) {
+               *data++ = LVme_getL(my->cram, currAddr);
        }
-       *dataStart = size;
 
 #ifndef NDEBUG
        syslog(LOG_DEBUG, "readSubEvt out");