MIDAS
|
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <stdlib.h>
#include "midas.h"
#include <stdint.h>
#include <iostream>
#include <sstream>
#include <unistd.h>
#include "math.h"
#include <sys/time.h>
Go to the source code of this file.
Macros | |
#define | SIMDAQSETTINGS_STR(_name) |
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. | |
BOOL | wait_end_cycle (int transition, BOOL first) |
SIMDAQSETTINGS_STR (simdaqsettings_str) | |
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) | |
double | sampleNormal () |
Variables | |
char * | frontend_name = "fesimdaq" |
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 = TRUE |
frontend_loop is called periodically if this variable is TRUE | |
INT | display_period = 0 |
a frontend status page is displayed with this frequency in ms | |
INT | max_event_size = 3 * 1024 * 1024 |
maximum event size produced by this frontend | |
INT | max_event_size_frag = 2 * 1024 * 1024 |
maximum event size for fragmented events (EQ_FRAGMENTED) | |
INT | event_buffer_size = 20 * 1000000 |
buffer size to hold events | |
void ** | info |
char | strin [256] |
HNDLE | hDB |
main ODB handle | |
HNDLE | hSet |
EQUIPMENT | equipment [] |
Main structure for midas equipment. | |
BOOL | finished_readout =FALSE |
int | nremaining = -1 |
Definition at line 145 of file fesimdaq.cxx.
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 186 of file fesimdaq.cxx.
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 196 of file fesimdaq.cxx.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 178 of file fesimdaq.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 157 of file fesimdaq.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 217 of file fesimdaq.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 257 of file fesimdaq.cxx.
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 203 of file fesimdaq.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 235 of file fesimdaq.cxx.
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 295 of file ebfe.cxx.
Definition at line 284 of file fesimdaq.cxx.
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 210 of file fesimdaq.cxx.
double sampleNormal | ( | ) |
SIMDAQSETTINGS_STR | ( | simdaqsettings_str | ) |
Definition at line 130 of file fesimdaq.cxx.
INT display_period = 0 |
a frontend status page is displayed with this frequency in ms
Definition at line 35 of file fesimdaq.cxx.
EQUIPMENT equipment[] |
Main structure for midas equipment.
Definition at line 72 of file fesimdaq.cxx.
INT event_buffer_size = 20 * 1000000 |
buffer size to hold events
Definition at line 44 of file fesimdaq.cxx.
Definition at line 126 of file fesimdaq.cxx.
frontend_loop is called periodically if this variable is TRUE
Definition at line 32 of file fesimdaq.cxx.
The frontend file name, don't change it.
Definition at line 29 of file fesimdaq.cxx.
char* frontend_name = "fesimdaq" |
The frontend name (client name) as seen by other MIDAS clients.
Definition at line 27 of file fesimdaq.cxx.
HNDLE hDB |
main ODB handle
Definition at line 47 of file fesimdaq.cxx.
HNDLE hSet |
Definition at line 47 of file fesimdaq.cxx.
void** info |
Definition at line 45 of file fesimdaq.cxx.
INT max_event_size = 3 * 1024 * 1024 |
maximum event size produced by this frontend
Definition at line 38 of file fesimdaq.cxx.
INT max_event_size_frag = 2 * 1024 * 1024 |
maximum event size for fragmented events (EQ_FRAGMENTED)
Definition at line 41 of file fesimdaq.cxx.
int nremaining = -1 |
Definition at line 128 of file fesimdaq.cxx.
char strin[256] |
Definition at line 46 of file fesimdaq.cxx.