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: Mon Apr 14 15:27:19 2003
21
22
\********************************************************************/
23
24
#define EXP_PARAM_DEFINED
25
26
typedef
struct
{
27
char
comment[80];
28
}
EXP_PARAM
;
29
30
#define EXP_PARAM_STR(_name) const char *_name[] = {\
31
"[.]",\
32
"Comment = STRING : [80] Test",\
33
"",\
34
NULL }
35
36
#ifndef EXCL_ADC_CALIBRATION
37
38
#define ADC_CALIBRATION_PARAM_DEFINED
39
40
typedef
struct
{
41
INT
pedestal[8];
42
float
software_gain[8];
43
double
histo_threshold
;
44
}
ADC_CALIBRATION_PARAM
;
45
46
#define ADC_CALIBRATION_PARAM_STR(_name) const char *_name[] = {\
47
"[.]",\
48
"Pedestal = INT[8] :",\
49
"[0] 174",\
50
"[1] 194",\
51
"[2] 176",\
52
"[3] 182",\
53
"[4] 185",\
54
"[5] 215",\
55
"[6] 202",\
56
"[7] 202",\
57
"Software Gain = FLOAT[8] :",\
58
"[0] 1",\
59
"[1] 1",\
60
"[2] 1",\
61
"[3] 1",\
62
"[4] 1",\
63
"[5] 1",\
64
"[6] 1",\
65
"[7] 1",\
66
"Histo threshold = DOUBLE : 20",\
67
"",\
68
NULL }
69
70
#endif
71
72
#ifndef EXCL_ADC_SUMMING
73
74
#define ADC_SUMMING_PARAM_DEFINED
75
76
typedef
struct
{
77
float
adc_threshold
;
78
}
ADC_SUMMING_PARAM
;
79
80
#define ADC_SUMMING_PARAM_STR(_name) const char *_name[] = {\
81
"[.]",\
82
"ADC threshold = FLOAT : 5",\
83
"",\
84
NULL }
85
86
#endif
87
88
#ifndef EXCL_GLOBAL
89
90
#define GLOBAL_PARAM_DEFINED
91
92
typedef
struct
{
93
float
adc_threshold
;
94
}
GLOBAL_PARAM
;
95
96
#define GLOBAL_PARAM_STR(_name) const char *_name[] = {\
97
"[.]",\
98
"ADC Threshold = FLOAT : 5",\
99
"",\
100
NULL }
101
102
#endif
103
104
#ifndef EXCL_TRIGGER
105
106
#define ASUM_BANK_DEFINED
107
108
typedef
struct
{
109
float
sum
;
110
float
average
;
111
}
ASUM_BANK
;
112
113
#define ASUM_BANK_STR(_name) const char *_name[] = {\
114
"[.]",\
115
"Sum = FLOAT : 0",\
116
"Average = FLOAT : 0",\
117
"",\
118
NULL }
119
120
#define TRIGGER_COMMON_DEFINED
121
122
typedef
struct
{
123
WORD
event_id
;
124
WORD
trigger_mask
;
125
char
buffer[32];
126
INT
type
;
127
INT
source
;
128
char
format[8];
129
BOOL
enabled
;
130
INT
read_on
;
131
INT
period
;
132
double
event_limit
;
133
DWORD
num_subevents
;
134
INT
log_history
;
135
char
frontend_host[32];
136
char
frontend_name
[32];
137
char
frontend_file_name
[256];
138
}
TRIGGER_COMMON
;
139
140
#define TRIGGER_COMMON_STR(_name) const char *_name[] = {\
141
"[.]",\
142
"Event ID = WORD : 1",\
143
"Trigger mask = WORD : 0",\
144
"Buffer = STRING : [32] SYSTEM",\
145
"Type = INT : 2",\
146
"Source = INT : 16777215",\
147
"Format = STRING : [8] MIDAS",\
148
"Enabled = BOOL : y",\
149
"Read on = INT : 257",\
150
"Period = INT : 500",\
151
"Event limit = DOUBLE : 0",\
152
"Num subevents = DWORD : 0",\
153
"Log history = INT : 0",\
154
"Frontend host = STRING : [32] pc810",\
155
"Frontend name = STRING : [32] Sample Frontend",\
156
"Frontend file name = STRING : [256] C:\Midas\examples\experiment\frontend.c",\
157
"",\
158
NULL }
159
160
#define TRIGGER_SETTINGS_DEFINED
161
162
typedef
struct
{
163
BYTE
io506
;
164
}
TRIGGER_SETTINGS
;
165
166
#define TRIGGER_SETTINGS_STR(_name) const char *_name[] = {\
167
"[.]",\
168
"IO506 = BYTE : 7",\
169
"",\
170
NULL }
171
172
#endif
173
174
#ifndef EXCL_SCALER
175
176
#define SCALER_COMMON_DEFINED
177
178
typedef
struct
{
179
WORD
event_id
;
180
WORD
trigger_mask
;
181
char
buffer[32];
182
INT
type
;
183
INT
source
;
184
char
format[8];
185
BOOL
enabled
;
186
INT
read_on
;
187
INT
period
;
188
double
event_limit
;
189
DWORD
num_subevents
;
190
INT
log_history
;
191
char
frontend_host[32];
192
char
frontend_name
[32];
193
char
frontend_file_name
[256];
194
}
SCALER_COMMON
;
195
196
#define SCALER_COMMON_STR(_name) const char *_name[] = {\
197
"[.]",\
198
"Event ID = WORD : 2",\
199
"Trigger mask = WORD : 0",\
200
"Buffer = STRING : [32] SYSTEM",\
201
"Type = INT : 17",\
202
"Source = INT : 0",\
203
"Format = STRING : [8] MIDAS",\
204
"Enabled = BOOL : y",\
205
"Read on = INT : 377",\
206
"Period = INT : 10000",\
207
"Event limit = DOUBLE : 0",\
208
"Num subevents = DWORD : 0",\
209
"Log history = INT : 0",\
210
"Frontend host = STRING : [32] pc810",\
211
"Frontend name = STRING : [32] Sample Frontend",\
212
"Frontend file name = STRING : [256] C:\Midas\examples\experiment\frontend.c",\
213
"",\
214
NULL }
215
216
#endif
WORD
unsigned short int WORD
Definition
mcstd.h:49
BYTE
unsigned char BYTE
Definition
mcstd.h:48
DWORD
unsigned int DWORD
Definition
mcstd.h:51
frontend_file_name
const char * frontend_file_name
The frontend file name, don't change it.
Definition
feudp.cxx:23
frontend_name
const char * frontend_name
The frontend name (client name) as seen by other MIDAS clients.
Definition
feudp.cxx:22
BOOL
DWORD BOOL
Definition
midas.h:105
INT
int INT
Definition
midas.h:129
ADC_CALIBRATION_PARAM
Definition
experim.h:40
ADC_CALIBRATION_PARAM::histo_threshold
double histo_threshold
Definition
experim.h:43
ADC_SUMMING_PARAM
Definition
experim.h:76
ADC_SUMMING_PARAM::adc_threshold
float adc_threshold
Definition
experim.h:77
ASUM_BANK
Definition
experim.h:108
ASUM_BANK::average
float average
Definition
experim.h:110
ASUM_BANK::sum
float sum
Definition
experim.h:109
EXP_PARAM
Definition
experim.h:26
GLOBAL_PARAM
Definition
experim.h:92
GLOBAL_PARAM::adc_threshold
float adc_threshold
Definition
experim.h:93
SCALER_COMMON
Definition
experim.h:178
SCALER_COMMON::event_id
WORD event_id
Definition
experim.h:179
SCALER_COMMON::enabled
BOOL enabled
Definition
experim.h:185
SCALER_COMMON::log_history
INT log_history
Definition
experim.h:190
SCALER_COMMON::period
INT period
Definition
experim.h:187
SCALER_COMMON::trigger_mask
WORD trigger_mask
Definition
experim.h:180
SCALER_COMMON::event_limit
double event_limit
Definition
experim.h:188
SCALER_COMMON::type
INT type
Definition
experim.h:182
SCALER_COMMON::num_subevents
DWORD num_subevents
Definition
experim.h:189
SCALER_COMMON::read_on
INT read_on
Definition
experim.h:186
SCALER_COMMON::source
INT source
Definition
experim.h:183
TRIGGER_COMMON
Definition
experim.h:122
TRIGGER_COMMON::read_on
INT read_on
Definition
experim.h:130
TRIGGER_COMMON::source
INT source
Definition
experim.h:127
TRIGGER_COMMON::num_subevents
DWORD num_subevents
Definition
experim.h:133
TRIGGER_COMMON::enabled
BOOL enabled
Definition
experim.h:129
TRIGGER_COMMON::event_limit
double event_limit
Definition
experim.h:132
TRIGGER_COMMON::type
INT type
Definition
experim.h:126
TRIGGER_COMMON::period
INT period
Definition
experim.h:131
TRIGGER_COMMON::event_id
WORD event_id
Definition
experim.h:123
TRIGGER_COMMON::log_history
INT log_history
Definition
experim.h:134
TRIGGER_COMMON::trigger_mask
WORD trigger_mask
Definition
experim.h:124
TRIGGER_SETTINGS
Definition
experim.h:162
TRIGGER_SETTINGS::io506
BYTE io506
Definition
experim.h:163
examples
experiment
experim.h
Generated on Sat May 3 2025 05:01:05 for MIDAS by
1.9.8