#include <stdio.h>
#include <stdlib.h>
#include "midas.h"
#include "msystem.h"
#include "mcstd.h"
Go to the source code of this file.
◆ NWORDS
◆ begin_of_run()
Begin of Run.
Called every run start transition. Set equipment status in ODB, start acquisition on the modules.
- Parameters
-
[in] | run_number | Number of the run being started |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 130 of file tinyfe.c.
◆ end_of_run()
End of Run.
Called every stop run transition. Set equipment status in ODB, stop acquisition on the modules.
- Parameters
-
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 137 of file tinyfe.c.
◆ frontend_exit()
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
- Returns
- Midas status code
Definition at line 123 of file tinyfe.c.
◆ frontend_init()
Frontend initialization.
Runs once at application startup. We initialize the hardware and optical interfaces and set the equipment status in ODB. We also lock the frontend to once physical cpu core.
- Returns
- Midas status code
Definition at line 116 of file tinyfe.c.
◆ frontend_loop()
Frontend loop.
If frontend_call_loop is true, this routine gets called when the frontend is idle or once between every event.
- Returns
- Midas status code
Definition at line 157 of file tinyfe.c.
◆ interrupt_configure()
Definition at line 195 of file tinyfe.c.
196{
197 switch (cmd) {
199 break;
201 break;
203 break;
205 break;
206 }
208}
#define CMD_INTERRUPT_ATTACH
#define CMD_INTERRUPT_DISABLE
#define CMD_INTERRUPT_ENABLE
#define CMD_INTERRUPT_DETACH
◆ pause_run()
Pause Run.
Called every pause run transition.
- Parameters
-
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
- Returns
- Midas status code
Definition at line 144 of file tinyfe.c.
◆ poll_event()
Definition at line 172 of file tinyfe.c.
176{
179
182
183
188 }
189
190 return 0;
191}
EXTERNAL void cam_lam_read(const int c, DWORD *lam)
#define LAM_SOURCE_STATION(s)
#define LAM_SOURCE_CRATE(c)
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
◆ read_tiny_event()
Definition at line 214 of file tinyfe.c.
215{
218
223 }
else if (
offset == -1) {
226 }
227
231
233
234
235
236
238 } else {
239
240
242 }
243}
INT bk_close(void *event, void *pdata)
void bk_init(void *event)
void bk_create(void *event, const char *name, WORD type, void **pdata)
INT bk_size(const void *event)
◆ resume_run()
Resume Run.
Called every resume run transition.
- Parameters
-
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
- Returns
- Midas status code
Definition at line 151 of file tinyfe.c.
◆ display_period
INT display_period = 0000 |
◆ equipment
Initial value:= {
{"Tiny",
3, 0,
"SYSTEM",
1,
"MIDAS",
500,
0,
10,
0,
"", "", "",
},
{""}
}
INT read_tiny_event(char *pevent, INT off)
Definition at line 65 of file tinyfe.c.
65 {
66
67 {"Tiny",
68 3, 0,
69 "SYSTEM",
71 1,
72 "MIDAS",
75 500,
76 0,
77 10,
78 0,
79 "", "", "",
83 },
84
85 {""}
86 };
◆ event_buffer_size
INT event_buffer_size = 10 * 10000 |
◆ frontend_call_loop
◆ frontend_file_name
◆ frontend_name
char* frontend_name = "tinyfe" |
◆ hDB
main ODB handle
Definition at line 49 of file tinyfe.c.
◆ hKey
◆ max_event_size
INT max_event_size = 10000 |
◆ max_event_size_frag
INT max_event_size_frag = 5 * 1024 * 1024 |