MIDAS
|
#include <stdio.h>
#include "midas.h"
#include "msystem.h"
#include "ybos.h"
#include "mcstd.h"
#include "esone.h"
Go to the source code of this file.
Macros | |
#define | CRATE 1 |
#define | LAM_SLOT 1 |
Functions | |
INT | frontend_init () |
Frontend initialization. | |
INT | frontend_exit () |
Frontend exit. | |
INT | begin_of_run (INT run_number, char *error) |
Begin of Run. | |
INT | end_of_run (INT run_number, char *error) |
End of Run. | |
INT | pause_run (INT run_number, char *error) |
Pause Run. | |
INT | resume_run (INT run_number, char *error) |
Resume Run. | |
INT | frontend_loop () |
Frontend loop. | |
INT | read_trigger_event (char *pevent, INT off) |
INT | read_scaler_event (char *pevent, INT off) |
Scaler event readout. | |
INT | files_dump (char *pevent, INT off) |
INT | poll_event (INT source, INT count, BOOL test) |
Polling routine for events. | |
INT | interrupt_configure (INT cmd, INT source[], PTYPE adr) |
Variables | |
INT | poll_val = 10 |
INT | tr1 = 16 |
INT | tr2 = 200 |
char * | frontend_name = "YbosFE" |
The frontend name (client name) as seen by other MIDAS clients. | |
char * | frontend_file_name = __FILE__ |
The frontend file name, don't change it. | |
BOOL | frontend_call_loop = FALSE |
frontend_loop is called periodically if this variable is TRUE | |
INT | display_period = 3000 |
a frontend status page is displayed with this frequency in ms | |
INT | max_event_size = 10000 |
maximum event size produced by this frontend | |
INT | event_buffer_size = 10 * 10000 |
buffer size to hold events | |
INT | gbl_run_number |
EQUIPMENT | equipment [] |
Main structure for midas equipment. | |
#define CRATE 1 |
Definition at line 30 of file ybos_simfe.c.
#define LAM_SLOT 1 |
Definition at line 31 of file ybos_simfe.c.
Begin of Run.
Called every run start transition. Set equipment status in ODB, start acquisition on the modules.
[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 177 of file ybos_simfe.c.
End of Run.
Called every stop run transition. Set equipment status in ODB, stop acquisition on the modules.
[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 191 of file ybos_simfe.c.
Definition at line 322 of file ybos_simfe.c.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 169 of file ybos_simfe.c.
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.
Definition at line 160 of file ybos_simfe.c.
Frontend loop.
If frontend_call_loop is true, this routine gets called when the frontend is idle or once between every event.
Definition at line 212 of file ybos_simfe.c.
Definition at line 246 of file ybos_simfe.c.
Pause Run.
Called every pause run transition.
[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 198 of file ybos_simfe.c.
Polling routine for events.
[in] | source | Event source (LAM/IRQ) |
[in] | count | Loop count for event polling timeout |
[in] | test | flag used to time the polling |
Definition at line 229 of file ybos_simfe.c.
Scaler event readout.
Placeholder.
Scaler event readout routine. Not used in this example.
[in] | pevent | Pointer to event buffer |
[in] | off | Caller info (unused here), see mfe.c |
Definition at line 304 of file ybos_simfe.c.
Definition at line 267 of file ybos_simfe.c.
Resume Run.
Called every resume run transition.
[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 205 of file ybos_simfe.c.
INT display_period = 3000 |
a frontend status page is displayed with this frequency in ms
Definition at line 43 of file ybos_simfe.c.
EQUIPMENT equipment[] |
Main structure for midas equipment.
Definition at line 68 of file ybos_simfe.c.
INT event_buffer_size = 10 * 10000 |
buffer size to hold events
Definition at line 49 of file ybos_simfe.c.
frontend_loop is called periodically if this variable is TRUE
Definition at line 40 of file ybos_simfe.c.
The frontend file name, don't change it.
Definition at line 37 of file ybos_simfe.c.
char* frontend_name = "YbosFE" |
The frontend name (client name) as seen by other MIDAS clients.
Definition at line 35 of file ybos_simfe.c.
INT gbl_run_number |
Definition at line 63 of file ybos_simfe.c.
INT max_event_size = 10000 |
maximum event size produced by this frontend
Definition at line 46 of file ybos_simfe.c.
INT poll_val = 10 |
Definition at line 32 of file ybos_simfe.c.
INT tr1 = 16 |
Definition at line 33 of file ybos_simfe.c.
INT tr2 = 200 |
Definition at line 33 of file ybos_simfe.c.