MIDAS
Loading...
Searching...
No Matches
experim.h
Go to the documentation of this file.
1/********************************************************************\
2
3 Name: experim.h
4 Created by: ODBedit program
5
6 Contents: This file contains C structures for the "Experiment"
7 tree in the ODB and the "/Analyzer/Parameters" tree.
8
9 Additionally, it contains the "Settings" subtree for
10 all items listed under "/Equipment" as well as their
11 event definition.
12
13 It can be used by the frontend and analyzer to work
14 with these information.
15
16 All C structures are accompanied with a string represen-
17 tation which can be used in the db_create_record function
18 to setup an ODB structure which matches the C structure.
19
20 Created on: Thu Feb 1 21:20:48 2007
21 $Id$
22\********************************************************************/
23
24#ifndef EXCL_TRIGGER
25
26#define TRIGGER_SETTINGS_DEFINED
27
28typedef struct {
29 struct {
45 } vf48;
46 struct {
47 WORD threshold1[32];
48 WORD threshold2[32];
49 WORD threshold3[32];
50 WORD threshold4[32];
51 } v792;
52 struct {
56 } v1190;
57 struct {
59 } v1729;
61
62#define TRIGGER_SETTINGS_STR(_name) char *_name[] = {\
63"[vf48]",\
64"External Trigger = BOOL : y",\
65"Inverse Signal = BOOL : y",\
66"Segment size = INT : 128",\
67"Group(bitwise all:0x3F) = INT : 63",\
68"Raw Data Suppress = BOOL : n",\
69"Channel Suppress Enable = BOOL : n",\
70"Active Channel Mask = INT : 255",\
71"Trigger Threshold = INT : 20",\
72"Hit Threshold = INT : 100",\
73"PreTrigger = INT : 15",\
74"Latency = INT : 14",\
75"Divisor = INT : 2",\
76"K-Coeff = INT : 60",\
77"L-Coeff = INT : 72",\
78"M-Coeff = INT : 16",\
79"",\
80"[v792]",\
81"threshold1 = WORD[32] :",\
82"[0] 1",\
83"[1] 511",\
84"[2] 511",\
85"[3] 511",\
86"[4] 511",\
87"[5] 511",\
88"[6] 511",\
89"[7] 511",\
90"[8] 511",\
91"[9] 511",\
92"[10] 511",\
93"[11] 511",\
94"[12] 511",\
95"[13] 511",\
96"[14] 511",\
97"[15] 511",\
98"[16] 511",\
99"[17] 511",\
100"[18] 511",\
101"[19] 511",\
102"[20] 511",\
103"[21] 511",\
104"[22] 511",\
105"[23] 511",\
106"[24] 511",\
107"[25] 511",\
108"[26] 511",\
109"[27] 511",\
110"[28] 511",\
111"[29] 511",\
112"[30] 511",\
113"[31] 511",\
114"threshold2 = WORD[32] :",\
115"[0] 10",\
116"[1] 10",\
117"[2] 10",\
118"[3] 511",\
119"[4] 511",\
120"[5] 511",\
121"[6] 511",\
122"[7] 511",\
123"[8] 511",\
124"[9] 511",\
125"[10] 511",\
126"[11] 511",\
127"[12] 511",\
128"[13] 511",\
129"[14] 511",\
130"[15] 511",\
131"[16] 511",\
132"[17] 511",\
133"[18] 511",\
134"[19] 511",\
135"[20] 511",\
136"[21] 511",\
137"[22] 511",\
138"[23] 511",\
139"[24] 511",\
140"[25] 511",\
141"[26] 511",\
142"[27] 511",\
143"[28] 511",\
144"[29] 511",\
145"[30] 511",\
146"[31] 511",\
147"threshold3 = WORD[32] :",\
148"[0] 1",\
149"[1] 1",\
150"[2] 1",\
151"[3] 511",\
152"[4] 511",\
153"[5] 511",\
154"[6] 511",\
155"[7] 511",\
156"[8] 511",\
157"[9] 511",\
158"[10] 511",\
159"[11] 511",\
160"[12] 511",\
161"[13] 511",\
162"[14] 511",\
163"[15] 511",\
164"[16] 511",\
165"[17] 511",\
166"[18] 511",\
167"[19] 511",\
168"[20] 511",\
169"[21] 511",\
170"[22] 511",\
171"[23] 511",\
172"[24] 511",\
173"[25] 511",\
174"[26] 511",\
175"[27] 511",\
176"[28] 511",\
177"[29] 511",\
178"[30] 511",\
179"[31] 511",\
180"threshold4 = WORD[32] :",\
181"[0] 10",\
182"[1] 10",\
183"[2] 10",\
184"[3] 511",\
185"[4] 511",\
186"[5] 511",\
187"[6] 511",\
188"[7] 511",\
189"[8] 511",\
190"[9] 511",\
191"[10] 511",\
192"[11] 511",\
193"[12] 511",\
194"[13] 511",\
195"[14] 511",\
196"[15] 511",\
197"[16] 511",\
198"[17] 511",\
199"[18] 511",\
200"[19] 511",\
201"[20] 511",\
202"[21] 511",\
203"[22] 511",\
204"[23] 511",\
205"[24] 511",\
206"[25] 511",\
207"[26] 511",\
208"[27] 511",\
209"[28] 511",\
210"[29] 511",\
211"[30] 511",\
212"[31] 511",\
213"",\
214"[v1190]",\
215"LeResolution = INT : 0",\
216"WindowOffset = INT : 0",\
217"WindowWidth = INT : 0",\
218"",\
219"[v1729]",\
220"post_trigger = DWORD : 0",\
221"",\
222NULL }
223
224#define TRIGGER_COMMON_DEFINED
225
226typedef struct {
229 char buffer[32];
230 INT type;
231 INT source;
232 char format[8];
233 BOOL enabled;
234 INT read_on;
235 INT period;
236 double event_limit;
237 DWORD num_subevents;
239 char frontend_host[32];
240 char frontend_name[32];
241 char frontend_file_name[256];
243
244#define TRIGGER_COMMON_STR(_name) char *_name[] = {\
245"[.]",\
246"Event ID = WORD : 1",\
247"Trigger mask = WORD : 0",\
248"Buffer = STRING : [32] SYSTEM",\
249"Type = INT : 1",\
250"Source = INT : 0",\
251"Format = STRING : [8] MIDAS",\
252"Enabled = BOOL : y",\
253"Read on = INT : 1",\
254"Period = INT : 1",\
255"Event limit = DOUBLE : 0",\
256"Num subevents = DWORD : 0",\
257"Log history = INT : 0",\
258"Frontend host = STRING : [32] laddvme05.triumf.ca",\
259"Frontend name = STRING : [32] FEvf48",\
260"Frontend file name = STRING : [256] fevf48.c",\
261"",\
262NULL }
263
264#endif
265
266#ifndef EXCL_SCALER
267
268#define SCALER_COMMON_DEFINED
269
270typedef struct {
273 char buffer[32];
274 INT type;
275 INT source;
276 char format[8];
277 BOOL enabled;
278 INT read_on;
279 INT period;
280 double event_limit;
281 DWORD num_subevents;
283 char frontend_host[32];
284 char frontend_name[32];
285 char frontend_file_name[256];
287
288#define SCALER_COMMON_STR(_name) char *_name[] = {\
289"[.]",\
290"Event ID = WORD : 2",\
291"Trigger mask = WORD : 0",\
292"Buffer = STRING : [32] SYSTEM",\
293"Type = INT : 1",\
294"Source = INT : 0",\
295"Format = STRING : [8] MIDAS",\
296"Enabled = BOOL : n",\
297"Read on = INT : 377",\
298"Period = INT : 10000",\
299"Event limit = DOUBLE : 0",\
300"Num subevents = DWORD : 0",\
301"Log history = INT : 0",\
302"Frontend host = STRING : [32] laddvme05.triumf.ca",\
303"Frontend name = STRING : [32] FEvf48",\
304"Frontend file name = STRING : [256] fevf48.c",\
305"",\
306NULL }
307
308#endif
309
unsigned short int WORD
Definition mcstd.h:49
unsigned int DWORD
Definition mcstd.h:51
INT type
Definition mana.cxx:269
const char * frontend_file_name
The frontend file name, don't change it.
Definition feudp.cxx:23
const char * frontend_name
The frontend name (client name) as seen by other MIDAS clients.
Definition feudp.cxx:22
DWORD BOOL
Definition midas.h:105
int INT
Definition midas.h:129
#define trigger_mask
#define event_id
void log_history(HNDLE hDB, HNDLE hKey, void *info)
Definition mlogger.cxx:5556
BOOL raw_data_suppress
Definition experim.h:34
BOOL external_trigger
Definition experim.h:30
INT active_channel_mask
Definition experim.h:36
INT group_bitwise_all_0x3f_
Definition experim.h:33
DWORD post_trigger
Definition experim.h:58
BOOL inverse_signal
Definition experim.h:31
BOOL channel_suppress_enable
Definition experim.h:35
INT trigger_threshold
Definition experim.h:37