MIDAS
|
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include "midas.h"
#include <libxxusb.h>
#include "ccusb.h"
#include "OdbCCusb.h"
Go to the source code of this file.
Macros | |
#define | N_ADC8 12 |
#define | SLOT_ADC8 10 |
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) |
Event readout. | |
INT | read_scaler_event (char *pevent, INT off) |
Scaler event readout. | |
INT | poll_event (INT source, INT count, BOOL test) |
INT | interrupt_configure (INT cmd, INT source, POINTER_T adr) |
void | seq_callback (INT hDB, INT hseq, void *info) |
int | ccUsbFlush (void) |
BOOL | clear_buffer_events (int transition, BOOL first) |
Variables | |
char const * | frontend_name = "feccusb" |
char const * | frontend_file_name = __FILE__ |
BOOL | frontend_call_loop = FALSE |
INT | display_period = 000 |
INT | max_event_size = 10000 |
INT | max_event_size_frag = 5 * 1024 * 1024 |
INT | event_buffer_size = 100 * 10000 |
xxusb_device_type | devices [10] |
struct usb_device * | dev |
usb_dev_handle * | udev |
HNDLE | hDB |
main ODB handle | |
HNDLE | hSetCC |
Midas equipment/<name>/Settings info handles. | |
CCUSB_SETTINGS | tscc |
Settings local structure (see OdbCCusb.h) | |
EQUIPMENT | equipment [] |
BOOL | in_deferred_transition = FALSE |
BOOL | finished_clearing_buffer = FALSE |
int | number_extra_reads = 0 |
int | EventsInRun = 0 |
#define N_ADC8 12 |
Definition at line 66 of file feccusb.cxx.
#define SLOT_ADC8 10 |
Definition at line 74 of file feccusb.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 314 of file feccusb.cxx.
Definition at line 165 of file feccusb.cxx.
Definition at line 196 of file feccusb.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 423 of file feccusb.cxx.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 302 of file feccusb.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 226 of file feccusb.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 478 of file feccusb.cxx.
Definition at line 513 of file feccusb.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 442 of file feccusb.cxx.
Definition at line 494 of file feccusb.cxx.
Scaler event readout.
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.
Event readout.
Trigger event readout.
Event readout routine. This is called by the polling or interrupt routines. (see mfe.c). For each module, read the event buffer into a midas data bank. If ZLE data exists, create another bank for it. Finally, create a statistical bank for data throughput analysis.
[in] | pevent | Pointer to event buffer |
[in] | off | Caller info (unused here), see mfe.c |
Main trigger event readout routine. This is called by the polling or interrupt routines. (see mfe.c). For each module, read the event buffer into a midas data bank.
[in] | pevent | Pointer to event buffer |
[in] | off | Caller info (unused here), see mfe.c |
Definition at line 529 of file feccusb.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 458 of file feccusb.cxx.
Definition at line 155 of file feccusb.cxx.
struct usb_device* dev |
Definition at line 80 of file feccusb.cxx.
xxusb_device_type devices[10] |
Definition at line 79 of file feccusb.cxx.
INT display_period = 000 |
Definition at line 53 of file feccusb.cxx.
EQUIPMENT equipment[] |
Definition at line 103 of file feccusb.cxx.
INT event_buffer_size = 100 * 10000 |
Definition at line 62 of file feccusb.cxx.
int EventsInRun = 0 |
Definition at line 310 of file feccusb.cxx.
Definition at line 191 of file feccusb.cxx.
Definition at line 50 of file feccusb.cxx.
Definition at line 47 of file feccusb.cxx.
Definition at line 45 of file feccusb.cxx.
HNDLE hDB |
main ODB handle
Definition at line 83 of file feccusb.cxx.
HNDLE hSetCC |
Midas equipment/<name>/Settings info handles.
Definition at line 83 of file feccusb.cxx.
Definition at line 190 of file feccusb.cxx.
INT max_event_size = 10000 |
Definition at line 56 of file feccusb.cxx.
INT max_event_size_frag = 5 * 1024 * 1024 |
Definition at line 59 of file feccusb.cxx.
int number_extra_reads = 0 |
Definition at line 192 of file feccusb.cxx.
CCUSB_SETTINGS tscc |
Settings local structure (see OdbCCusb.h)
Definition at line 84 of file feccusb.cxx.
usb_dev_handle* udev |
Definition at line 81 of file feccusb.cxx.