MIDAS
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include "midas.h"
#include "mfe.h"
#include "experim.h"
#include "WDBLib.h"
#include "DCBLib.h"
Go to the source code of this file.
Namespaces | |
namespace | WD |
Functions | |
INT | frontend_init (void) |
Frontend initialization. | |
INT | frontend_exit (void) |
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 (void) |
Frontend loop. | |
INT | read_trigger_event (char *pevent, INT off) |
INT | read_periodic_event (char *pevent, INT off) |
INT | poll_event (INT source, INT count, BOOL test) |
Polling routine for events. | |
INT | interrupt_configure (INT cmd, INT source, POINTER_T adr) |
Interrupt configuration (not implemented) | |
Variables | |
const char * | frontend_name = "WD Frontend" |
The frontend name (client name) as seen by other MIDAS clients. | |
const 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 = 1024 * 1014 |
maximum event size produced by this frontend | |
INT | max_event_size_frag = 5 * max_event_size |
maximum event size for fragmented events (EQ_FRAGMENTED) | |
INT | event_buffer_size = 5 * max_event_size |
buffer size to hold events | |
BOOL | equipment_common_overwrite = TRUE |
EQUIPMENT | equipment [] |
Main structure for midas equipment. | |
std::vector< WDB * > | WD::wdb |
WP * | WD::wp |
std::vector< WDEvent * > | WD::wde |
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 244 of file wdfe.cxx.
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 118 of file wdfe.cxx.
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 279 of file wdfe.cxx.
Interrupt configuration (not implemented)
Routine for interrupt configuration if equipment is set in EQ_INTERRUPT mode. Not implemented right now, returns SUCCESS.
[in] | cmd | Command for interrupt events (see midas.h) |
[in] | source | Equipment index number |
[in] | adr | Interrupt routine (see mfe.c) |
Definition at line 318 of file wdfe.cxx.
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 296 of file wdfe.cxx.
Definition at line 378 of file wdfe.cxx.
Definition at line 335 of file wdfe.cxx.
INT display_period = 3000 |
EQUIPMENT equipment[] |
Main structure for midas equipment.
Definition at line 65 of file wdfe.cxx.
INT event_buffer_size = 5 * max_event_size |
INT max_event_size = 1024 * 1014 |
INT max_event_size_frag = 5 * max_event_size |