-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtof.c,v 1.4 1999-09-02 11:19:15 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtof.c,v 1.5 1999-09-02 12:38:03 hades Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
SubEvt_setDecoding(subEvt, SubEvtDecoding_32bitData);
SubEvt_setTrigNr(subEvt, trigNr << 24 | trigTag);
SubEvt_setId(subEvt, SubEvtId_tofTest);
+
+ trigTag++;
+ trigNr++;
}
void Hardware_readout(const Hardware *my, void *subEvt)
-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.5 1999-09-02 11:19:15 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.6 1999-09-02 12:38:03 hades Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
int HwV775_readData(HwV775 *my, void *subEvt)
{
UInt4 *data = SubEvt_end(subEvt);
- UInt4 *first = data;
UInt4 hdr;
UInt4 eob;
int nWords;
while (--nWords >= 0) {
*data++ = LVme_getL(my->lvme, V775_OUT_BUF);
}
+
*data++ = eob = LVme_getL(my->lvme, V775_OUT_BUF);
if ((eob & 0x07000000) != 0x04000000) {
msglog(LOG_EMERG, "V775 Last word not eob: 0x%08x\n", eob);
msglog(LOG_EMERG, "%s trigNr mismatch: 0x%08x != 0x%02x \n",
my->name, SubEvt_trigNr(subEvt), trigTag);
}
- SubEvt_setSize(subEvt, SubEvt_size(subEvt) + (char *) data - (char *) first);
+ SubEvt_setSize(subEvt, (char *) data - (char *) subevt);
return 0;
}
-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv878.c,v 1.3 1999-09-02 11:19:15 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv878.c,v 1.4 1999-09-02 12:38:03 hades Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
int HwV878_readData(HwV878 *my, void *subEvt)
{
UInt4 *data = SubEvt_end(subEvt);
- UInt4 *first = data;
UInt4 hdr;
UInt4 eob;
int nWords;
while (--nWords >= 0) {
*data++ = LVme_getL(my->lvme, V878_OUT_BUF);
}
+
*data++ = eob = LVme_getL(my->lvme, V878_OUT_BUF);
if ((eob & 0x07000000) != 0x04000000) {
msglog(LOG_EMERG, "V878 Last word not eob: 0x%08x\n", eob);
msglog(LOG_EMERG, "%s trigNr mismatch: 0x%08x != 0x%02x \n",
my->name, SubEvt_trigNr(subEvt), trigTag);
}
- SubEvt_setSize(subEvt, SubEvt_size(subEvt) + (char *) data - (char *) first);
+ SubEvt_setSize(subEvt, (char *) data - (char *) subevt);
return 0;
}