-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtof.c,v 1.2 1999-09-02 08:58:50 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwtof.c,v 1.3 1999-09-02 09:24:30 hades Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
#include "param.h"
#include "subevt.h"
#include "hwv775.h"
+#include "hwv878.h"
struct HardwareS {
size_t maxSubEvtSize;
#include "hardware.h"
#define NV775S 1
+#define NV878S 1
typedef struct ModulesS {
HwV775 *v775[NV775S];
+ HwV878 *v878[NV878S];
} Modules;
size_t Hardware_maxSubEvtSize(const Hardware *my)
Hardware *my;
Param paramS, *param = ¶mS;
HwV775 *v775[NV775S];
+ HwV878 *v878[NV878S];
int i;
if (0 > conParam(param, "param.tcl")) {
my = allocMem(sizeof(Hardware));
my->specific = allocMem(sizeof(Modules));
- my->maxSubEvtSize = SubEvt_hdrSize() + (NV775S * 34 * sizeof(UInt4));
+ my->maxSubEvtSize = SubEvt_hdrSize()
+ + (NV775S * 34 * sizeof(UInt4))
+ + (NV878S * 34 * sizeof(UInt4));
for (i = 0; i < NV775S; i++) {
char buf[16];
}
((Modules *) my->specific)->v775[i] = v775[i];
}
+ for (i = 0; i < NV878S; i++) {
+ char buf[16];
+
+ v878[i] = allocMem(sizeof(HwV878));
+ sprintf(buf, "tdc%d", i + 4);
+ if (0 > conHwV878(v878[i], buf, param)) {
+ msglog(LOG_DEBUG, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno));
+ return NULL;
+ }
+ ((Modules *) my->specific)->v878[i] = v878[i];
+ }
desParam(param);
{
int i;
HwV775 **v775 = ((Modules *) my->specific)->v775;
+ HwV878 **v878 = ((Modules *) my->specific)->v878;
+ for (i = 0; i < NV878S; i++) {
+ desHwV878(v878[i]);
+ freeMem(v878[i]);
+ }
for (i = 0; i < NV775S; i++) {
desHwV775(v775[i]);
freeMem(v775[i]);
{
int i;
HwV775 **v775 = ((Modules *) my->specific)->v775;
+ HwV878 **v878 = ((Modules *) my->specific)->v878;
void *currSubEvt;
for (
) {
HwV775_readSubEvt(v775[i], currSubEvt);
}
+ for (
+ i = 0, currSubEvt = subEvt;
+ i < NV878S;
+ i++, currSubEvt = SubEvt_end(subEvt)
+ ) {
+ HwV878_readSubEvt(v878[i], currSubEvt);
+ }
}
-static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.2 1999-09-02 09:00:04 hades Exp $";
+static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwv775.c,v 1.3 1999-09-02 09:24:30 hades Exp $";
#define _POSIX_C_SOURCE 199309L
#include <unistd.h>
cardBase = Param_getVal(param, my->name, "cardbase");
my->lvme = allocMem(sizeof(LVme));
- if (0 > conLVme(my->lvme, cardBase, 0x10000, 0x09, 0x04, 4)) {
+ if (0 > conLVme(my->lvme, cardBase, 0x10000, 0x09, V775_GEO_ADDR, 4)) {
msglog(LOG_DEBUG, "%s:%d:%s\n", __FILE__, __LINE__, strerror(errno));
return -1;
}
set tdc3(vset) 254
set tdc3(voff) 0
-set tdc4(cardbase) 2097408 ;# 0x200100
-set tdc4(lowThreshold) 1
-set tdc4(highThreshold) 198
-set tdc4(range) 192 ;# 0 = 90ns, 224 = 770ns
+set tdc4(cardbase) 3993370624 ;# 0xee000000
+set tdc4(threshold00) 0
+set tdc4(threshold01) 0
+set tdc4(threshold02) 0
+set tdc4(threshold03) 0
+set tdc4(threshold04) 0
+set tdc4(threshold05) 0
+set tdc4(threshold06) 0
+set tdc4(threshold07) 0
+set tdc4(threshold08) 0
+set tdc4(threshold09) 0
+set tdc4(threshold10) 0
+set tdc4(threshold11) 0
+set tdc4(threshold12) 0
+set tdc4(threshold13) 0
+set tdc4(threshold14) 0
+set tdc4(threshold15) 0
+set tdc4(threshold16) 0
+set tdc4(threshold17) 0
+set tdc4(threshold18) 0
+set tdc4(threshold19) 0
+set tdc4(threshold20) 0
+set tdc4(threshold21) 0
+set tdc4(threshold22) 0
+set tdc4(threshold23) 0
+set tdc4(threshold24) 0
+set tdc4(threshold25) 0
+set tdc4(threshold26) 0
+set tdc4(threshold27) 0
+set tdc4(threshold28) 0
+set tdc4(threshold29) 0
+set tdc4(threshold30) 0
+set tdc4(threshold31) 0
+set tdc4(vset) 254
+set tdc4(voff) 0
+
+set tdc5(cardbase) 3993370624 ;# 0xee000000
+set tdc5(threshold00) 0
+set tdc5(threshold01) 0
+set tdc5(threshold02) 0
+set tdc5(threshold03) 0
+set tdc5(threshold04) 0
+set tdc5(threshold05) 0
+set tdc5(threshold06) 0
+set tdc5(threshold07) 0
+set tdc5(threshold08) 0
+set tdc5(threshold09) 0
+set tdc5(threshold10) 0
+set tdc5(threshold11) 0
+set tdc5(threshold12) 0
+set tdc5(threshold13) 0
+set tdc5(threshold14) 0
+set tdc5(threshold15) 0
+set tdc5(threshold16) 0
+set tdc5(threshold17) 0
+set tdc5(threshold18) 0
+set tdc5(threshold19) 0
+set tdc5(threshold20) 0
+set tdc5(threshold21) 0
+set tdc5(threshold22) 0
+set tdc5(threshold23) 0
+set tdc5(threshold24) 0
+set tdc5(threshold25) 0
+set tdc5(threshold26) 0
+set tdc5(threshold27) 0
+set tdc5(threshold28) 0
+set tdc5(threshold29) 0
+set tdc5(threshold30) 0
+set tdc5(threshold31) 0
+set tdc5(vset) 254
+set tdc5(voff) 0
+
+set tdc6(cardbase) 3993370624 ;# 0xee000000
+set tdc6(threshold00) 0
+set tdc6(threshold01) 0
+set tdc6(threshold02) 0
+set tdc6(threshold03) 0
+set tdc6(threshold04) 0
+set tdc6(threshold05) 0
+set tdc6(threshold06) 0
+set tdc6(threshold07) 0
+set tdc6(threshold08) 0
+set tdc6(threshold09) 0
+set tdc6(threshold10) 0
+set tdc6(threshold11) 0
+set tdc6(threshold12) 0
+set tdc6(threshold13) 0
+set tdc6(threshold14) 0
+set tdc6(threshold15) 0
+set tdc6(threshold16) 0
+set tdc6(threshold17) 0
+set tdc6(threshold18) 0
+set tdc6(threshold19) 0
+set tdc6(threshold20) 0
+set tdc6(threshold21) 0
+set tdc6(threshold22) 0
+set tdc6(threshold23) 0
+set tdc6(threshold24) 0
+set tdc6(threshold25) 0
+set tdc6(threshold26) 0
+set tdc6(threshold27) 0
+set tdc6(threshold28) 0
+set tdc6(threshold29) 0
+set tdc6(threshold30) 0
+set tdc6(threshold31) 0
+set tdc6(vset) 254
+set tdc6(voff) 0
+
+set tdc7(cardbase) 3993370624 ;# 0xee000000
+set tdc7(threshold00) 0
+set tdc7(threshold01) 0
+set tdc7(threshold02) 0
+set tdc7(threshold03) 0
+set tdc7(threshold04) 0
+set tdc7(threshold05) 0
+set tdc7(threshold06) 0
+set tdc7(threshold07) 0
+set tdc7(threshold08) 0
+set tdc7(threshold09) 0
+set tdc7(threshold10) 0
+set tdc7(threshold11) 0
+set tdc7(threshold12) 0
+set tdc7(threshold13) 0
+set tdc7(threshold14) 0
+set tdc7(threshold15) 0
+set tdc7(threshold16) 0
+set tdc7(threshold17) 0
+set tdc7(threshold18) 0
+set tdc7(threshold19) 0
+set tdc7(threshold20) 0
+set tdc7(threshold21) 0
+set tdc7(threshold22) 0
+set tdc7(threshold23) 0
+set tdc7(threshold24) 0
+set tdc7(threshold25) 0
+set tdc7(threshold26) 0
+set tdc7(threshold27) 0
+set tdc7(threshold28) 0
+set tdc7(threshold29) 0
+set tdc7(threshold30) 0
+set tdc7(threshold31) 0
+set tdc7(vset) 254
+set tdc7(voff) 0
+
+set tdc8(cardbase) 2097408 ;# 0x200100
+set tdc8(lowThreshold) 1
+set tdc8(highThreshold) 198
+set tdc8(range) 192 ;# 0 = 90ns, 224 = 770ns
set adc0(cardbase) 0 ;# 0
set adc0(lowThreshold) 8