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
26typedef 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"",\
34NULL }
35
36#ifndef EXCL_ADC_CALIBRATION
37
38#define ADC_CALIBRATION_PARAM_DEFINED
39
40typedef struct {
41 INT pedestal[8];
42 float software_gain[8];
43 double histo_threshold;
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"",\
68NULL }
69
70#endif
71
72#ifndef EXCL_ADC_SUMMING
73
74#define ADC_SUMMING_PARAM_DEFINED
75
76typedef struct {
77 float adc_threshold;
79
80#define ADC_SUMMING_PARAM_STR(_name) const char *_name[] = {\
81"[.]",\
82"ADC threshold = FLOAT : 5",\
83"",\
84NULL }
85
86#endif
87
88#ifndef EXCL_GLOBAL
89
90#define GLOBAL_PARAM_DEFINED
91
92typedef struct {
93 float adc_threshold;
95
96#define GLOBAL_PARAM_STR(_name) const char *_name[] = {\
97"[.]",\
98"ADC Threshold = FLOAT : 5",\
99"",\
100NULL }
101
102#endif
103
104#ifndef EXCL_TRIGGER
105
106#define ASUM_BANK_DEFINED
107
108typedef 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"",\
118NULL }
119
120#define TRIGGER_COMMON_DEFINED
121
122typedef struct {
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;
135 char frontend_host[32];
136 char frontend_name[32];
137 char frontend_file_name[256];
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"",\
158NULL }
159
160#define TRIGGER_SETTINGS_DEFINED
161
162typedef struct {
163 BYTE io506;
165
166#define TRIGGER_SETTINGS_STR(_name) const char *_name[] = {\
167"[.]",\
168"IO506 = BYTE : 7",\
169"",\
170NULL }
171
172#endif
173
174#ifndef EXCL_SCALER
175
176#define SCALER_COMMON_DEFINED
177
178typedef struct {
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;
191 char frontend_host[32];
192 char frontend_name[32];
193 char frontend_file_name[256];
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"",\
214NULL }
215
216#endif
unsigned short int WORD
Definition mcstd.h:49
unsigned char BYTE
Definition mcstd.h:48
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