]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Thu, 2 Sep 1999 09:24:30 +0000 (09:24 +0000)
committerhades <hades>
Thu, 2 Sep 1999 09:24:30 +0000 (09:24 +0000)
hadaq/Makefile
hadaq/hwtof.c
hadaq/hwv775.c
hadaq/hwv775.h
hadaq/param.tcl

index 3065fe469a36c26b5a547fd29d5d5336f2d8c286..bb3933468d6893b576eed12c44aac1bc8f837171 100644 (file)
@@ -28,7 +28,7 @@ DEFINES = -UNDEBUG -DHADESSTD_NEXITSTAT -DHADESSTD_NGETOPT -DNOATM
 
 CFLAGS = -g $(INCLUDES) $(DEFINES)
 
-HW_OBJS = hwtof.o hwv775.o
+HW_OBJS = hwtof.o hwv775.o hwv878.o
 #HW_OBJS = hwrich.o hwrace.o rc.o
 #HW_OBJS = hwsoft.o
 
index 47d144b227eb7a2c6e5f78864448c960a9b70b55..a5fd2cf1691d9e4c888a81abe2d5119239560539 100644 (file)
@@ -1,4 +1,4 @@
-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>
@@ -11,6 +11,7 @@ static char rcsId[] = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/had
 #include "param.h"
 #include "subevt.h"
 #include "hwv775.h"
+#include "hwv878.h"
 
 struct HardwareS {
        size_t maxSubEvtSize;
@@ -20,9 +21,11 @@ struct HardwareS {
 #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)
@@ -40,6 +43,7 @@ Hardware *newHardware(void)
        Hardware *my;
        Param paramS, *param = &paramS;
        HwV775 *v775[NV775S];
+       HwV878 *v878[NV878S];
        int i;
 
        if (0 > conParam(param, "param.tcl")) {
@@ -49,7 +53,9 @@ Hardware *newHardware(void)
        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];
@@ -62,6 +68,17 @@ Hardware *newHardware(void)
                }
                ((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);
@@ -72,7 +89,12 @@ void deleteHardware(Hardware *my)
 {
        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]);
@@ -102,6 +124,7 @@ void Hardware_readout(const Hardware *my, void *subEvt)
 {
        int i;
        HwV775 **v775 = ((Modules *) my->specific)->v775;
+       HwV878 **v878 = ((Modules *) my->specific)->v878;
        void *currSubEvt;
 
        for (
@@ -111,4 +134,11 @@ void Hardware_readout(const Hardware *my, void *subEvt)
                ) {
                HwV775_readSubEvt(v775[i], currSubEvt);
        }
+       for (
+                       i = 0, currSubEvt = subEvt;
+                       i < NV878S;
+                       i++, currSubEvt = SubEvt_end(subEvt)
+               ) {
+               HwV878_readSubEvt(v878[i], currSubEvt);
+       }
 }
index 5ebd1f601cb41ccc975b76f3d810396219b45f1f..303a9add3d2afb8f6f791a91a0aebecd523b7b18 100644 (file)
@@ -1,4 +1,4 @@
-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>
@@ -29,7 +29,7 @@ int conHwV775(HwV775 * my, const char *name, const Param *param)
        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;
        }
index 3287d1e5bffc54adde646fa11cc0b556f1c998c1..a6658f922070d236e32d4c6f9f10549cd071eee8 100644 (file)
@@ -15,6 +15,7 @@ typedef struct HwV775S {
 } HwV775;
 
 #define V775_OUT_BUF 0x00
+#define V775_GEO_ADDR 0x04
 #define V775_BIT_SET_1 0x06
 #define V775_BIT_CLR_1 0x08
 #define V775_STAT_REG_1 0x0e
index 31edc07a70168fb350f4db84c929621cba561e3a..85cda893be164396d2550cc9891fd3b5b0a23d74 100644 (file)
@@ -151,10 +151,154 @@ set tdc3(range) 255
 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