Skip to content

Commit 22c3814

Browse files
committedSep 13, 2009
mlp -- initial commit
0 parents  commit 22c3814

23 files changed

+2451
-0
lines changed
 

‎EvtConstants.h

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef __EVT_CONSTANTS_H
2+
#define __EVT_CONSTANTS_H
3+
4+
/* the header length values */
5+
#define EVTHEADERLENGTH 8
6+
7+
8+
#endif

‎EvtStructures.h

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef __EVT_STRUCTURES_H
2+
#define __EVT_STRUCTURES_H
3+
4+
#include "EvtConstants.h"
5+
6+
typedef struct evt_data
7+
{
8+
int evt_length;
9+
int evt_type;
10+
int evt_sequence;
11+
int run_number;
12+
int date;
13+
int time;
14+
int reserved[2];
15+
int data[99999];
16+
} *evtdata_ptr;
17+
18+
19+
#endif

‎Makefile.am

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
AUTOMAKE_OPTIONS = foreign
2+
3+
allheaders = \
4+
EvtConstants.h \
5+
EvtStructures.h \
6+
oBuffer.h \
7+
oEvent.h
8+
9+
10+
allsources = \
11+
daqEvent.cc \
12+
daq_device_random.cc \
13+
rcdaq.cc \
14+
daqBuffer.cc \
15+
daq_device.cc
16+
17+
18+
AM_LDFLAGS = -L$(libdir) -L$(ONLINE_MAIN)/lib
19+
20+
21+
22+
INCLUDES = -I$(includedir) -I$(ONLINE_MAIN)/include
23+
24+
noinst_HEADERS = \
25+
EvtConstants.h \
26+
SubevtConstants.h \
27+
daqBuffer.h \
28+
daq_device.h \
29+
EvtStructures.h \
30+
SubevtStructures.h \
31+
daqEvent.h \
32+
daq_device_random.h \
33+
rcdaq_rpc.h \
34+
all.h
35+
36+
include_HEADERS =
37+
38+
RPCGEN = rpcgen
39+
40+
41+
BUILT_SOURCES = \
42+
rcdaq_rpc_clnt.cc \
43+
rcdaq_rpc_svc.cc \
44+
rcdaq_rpc_xdr.cc \
45+
rcdaq_rpc.h
46+
47+
48+
lib_LTLIBRARIES = librcdaq.la
49+
50+
librcdaq_la_SOURCES = rcdaq.cc daqEvent.cc \
51+
daq_device_random.cc \
52+
daqBuffer.cc \
53+
daq_device.cc
54+
55+
56+
bin_PROGRAMS = rcdaq_client rcdaq_server elogtest
57+
58+
elogtest_SOURCES = elogtest.cc daq_elog_handler.cc
59+
60+
61+
rcdaq_client_SOURCES = rcdaq_client.cc rcdaq_rpc.h
62+
rcdaq_client_LDADD = rcdaq_rpc_clnt.lo rcdaq_rpc_xdr.lo
63+
64+
65+
rcdaq_server_SOURCES = rcdaq_server.cc
66+
rcdaq_server_LDADD = librcdaq.la rcdaq_rpc_svc.lo rcdaq_rpc_xdr.lo daq_elog_handler.lo -lpthread
67+
68+
69+
70+
#rcdaq_sa_SOURCES = rcdaq_frontend.cc
71+
#rcdaq_sa_LDADD = librcdaq.la -lpthread
72+
73+
74+
75+
76+
rcdaq_rpc_clnt.cc : $(srcdir)/rcdaq_rpc.x
77+
cp $(srcdir)/rcdaq_rpc.x .
78+
$(RPCGEN) -l rcdaq_rpc.x > $@
79+
rm rcdaq_rpc.x
80+
81+
82+
rcdaq_rpc_svc.cc : $(srcdir)/rcdaq_rpc.x
83+
cp $(srcdir)/rcdaq_rpc.x .
84+
$(RPCGEN) -m rcdaq_rpc.x > $@
85+
rm rcdaq_rpc.x
86+
87+
88+
rcdaq_rpc_xdr.cc : $(srcdir)/rcdaq_rpc.x
89+
cp $(srcdir)/rcdaq_rpc.x .
90+
$(RPCGEN) -c rcdaq_rpc.x > $@
91+
rm rcdaq_rpc.x
92+
93+
94+
rcdaq_rpc.h : $(srcdir)/rcdaq_rpc.x
95+
cp $(srcdir)/rcdaq_rpc.x .
96+
$(RPCGEN) -h rcdaq_rpc.x > $@
97+
rm rcdaq_rpc.x
98+
99+
100+
clean-local:
101+
rm -f $(BUILT_SOURCES)

‎SubevtConstants.h

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#ifndef __SUBEVT_CONSTANTS_H
2+
#define __SUBEVT_CONSTANTS_H
3+
4+
/* the enum types for dump style */
5+
#define DECIMAL 1
6+
#define HEXADECIMAL 2
7+
#define OCTAL 3
8+
9+
/* Misc. values */
10+
#define MAX_OUTLENGTH 40000
11+
12+
// the header length value
13+
#define SEVTHEADERLENGTH 4
14+
15+
16+
17+
// ---------------------------------------------------------------------
18+
// IDCRAW requests the subevent to be copied without any decoding
19+
#define IDCRAW 0
20+
21+
// ---------------------------------------------------------------------
22+
// IDDGEN uses the standard decoding method imbedded in the subevent
23+
// header in the new data format
24+
#define IDDGEN 1
25+
26+
// ---------------------------------------------------------------------
27+
// IDHCPY requests only the subevent header (or the Event header) to be
28+
// copied:
29+
#define IDHCPY 2
30+
31+
// ---------------------------------------------------------------------
32+
// the next methods < 10 use what we consider standard methods by
33+
// now, i.e., no scheme proprietary to one particular hardware brand
34+
35+
#define ID1STR 3
36+
#define IDCSTR 4
37+
#define ID2EVT 5
38+
#define ID4EVT 6
39+
#define ID2SUP 7
40+
41+
// ---------------------------------------------------------------------
42+
// the next methods are for the hammond/g-2 board.
43+
44+
#define IDHAMMONDSET 31
45+
#define IDHAMMOND 32
46+
47+
#define IDSAM 40
48+
49+
#define IDMIZNHC 41
50+
51+
#define IDDCFEM 51
52+
#define IDTECFEM 52
53+
54+
#define IDSIS3300 55
55+
56+
#define IDCAENV792 56
57+
#define IDCAENV785N 57
58+
59+
#define IDRCFIFOB 58
60+
61+
62+
63+
64+
65+
#endif
66+

‎SubevtStructures.h

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef __SUBEVTSTRUCTURES_H__
2+
#define __SUBEVTSTRUCTURES_H__
3+
4+
#include "SubevtConstants.h"
5+
6+
typedef struct subevt_data
7+
{
8+
int sub_length;
9+
short sub_id;
10+
short sub_type;
11+
short sub_decoding;
12+
short sub_padding;
13+
short reserved[2];
14+
int data;
15+
} *subevtdata_ptr;
16+
17+
#endif /* __SUBEVTSTRUCTURES_H__ */

‎all.h

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef __ALL_H__
2+
#define __ALL_H__
3+
4+
#include "daq_device_random.h"
5+
6+
7+
#endif

‎configure.in

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
AC_INIT(configure.in, 1.0)
2+
3+
AC_CANONICAL_HOST
4+
5+
6+
AC_PROG_CXX(cxx CC g++)
7+
8+
9+
AM_INIT_AUTOMAKE (rcdaq,1.00)
10+
11+
AC_PROG_INSTALL
12+
13+
AC_PROG_LIBTOOL
14+
15+
AC_OUTPUT(Makefile)
16+

0 commit comments

Comments
 (0)
Please sign in to comment.