MIDAS
|
#include <stdio.h>
#include <stdlib.h>
#include "midas.h"
#include "mvmestd.h"
#include "vmicvme.h"
#include "vmeio.h"
#include "v1190B.h"
#include "v792.h"
#include "vf48.h"
#include "v1729.h"
#include "experim.h"
Go to the source code of this file.
Macros | |
#define | VF48_CODE |
#define | P_BOE 0x1 |
#define | P_EOE 0x2 |
#define | P_CLR 0x4 |
#define | S_READOUT 0x8 |
#define | S_RUNGATE 0x10 |
#define | TRIG_LEVEL (int) 1 |
#define | INT_LEVEL (int) 3 |
#define | INT_VECTOR (int) 0x16 |
#define | N_ADC 100 |
#define | N_TDC 100 |
#define | N_PTS 5000 |
#define | N_SCLR 4 |
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. | |
void | interrupt_routine (void) |
INT | read_trigger_event (char *pevent, INT off) |
INT | read_scaler_event (char *pevent, INT off) |
Scaler event readout. | |
void | register_cnaf_callback (int debug) |
void | seq_callback (INT hDB, INT hseq, void *info) |
INT | poll_event (INT source, INT count, BOOL test) |
Polling routine for events. | |
INT | interrupt_configure (INT cmd, INT source, PTYPE adr) |
Variables | |
int | trig_level = 0 |
INT_INFO | int_info |
int | myinfo = VME_INTERRUPT_SIGEVENT |
char * | frontend_name = "fevmemodules" |
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 = 000 |
a frontend status page is displayed with this frequency in ms | |
INT | max_event_size = 200000 |
maximum event size produced by this frontend | |
INT | max_event_size_frag = 5 * 1024 * 1024 |
maximum event size for fragmented events (EQ_FRAGMENTED) | |
INT | event_buffer_size = 10 * 100000 |
buffer size to hold events | |
MVME_INTERFACE * | myvme |
int | sRG = 0 |
int | intflag = 0 |
int | inRun = 0 |
int | missed =0 |
int | done =0 |
int | stop_req =0 |
DWORD | evlimit |
DWORD | VMEIO_BASE = 0x780000 |
DWORD | VTDC0_BASE = 0xF10000 |
DWORD | VADC0_BASE = 0x100000 |
DWORD | VADC1_BASE = 0x200000 |
DWORD | VADC2_BASE = 0x300000 |
DWORD | VADC3_BASE = 0x400000 |
DWORD | VLAM_BASE = 0x800000 |
DWORD | VF48_BASE = 0xAF0000 |
DWORD | V1729_BASE = 0x120000 |
HNDLE | hDB |
main ODB handle | |
HNDLE | hSet |
TRIGGER_SETTINGS | ts |
BANK_LIST | trigger_bank_list [] |
EQUIPMENT | equipment [] |
Main structure for midas equipment. | |
int | vf48_error = 0 |
Definition at line 45 of file fevmemodules.c.
Definition at line 46 of file fevmemodules.c.
#define N_ADC 100 |
Definition at line 97 of file fevmemodules.c.
#define N_PTS 5000 |
Definition at line 99 of file fevmemodules.c.
#define N_SCLR 4 |
Definition at line 105 of file fevmemodules.c.
#define N_TDC 100 |
Definition at line 98 of file fevmemodules.c.
#define P_BOE 0x1 |
Definition at line 36 of file fevmemodules.c.
#define P_CLR 0x4 |
Definition at line 38 of file fevmemodules.c.
#define P_EOE 0x2 |
Definition at line 37 of file fevmemodules.c.
#define S_READOUT 0x8 |
Definition at line 39 of file fevmemodules.c.
#define S_RUNGATE 0x10 |
Definition at line 40 of file fevmemodules.c.
Definition at line 44 of file fevmemodules.c.
#define VF48_CODE |
Definition at line 19 of file fevmemodules.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 285 of file fevmemodules.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 574 of file fevmemodules.c.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 278 of file fevmemodules.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 233 of file fevmemodules.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 621 of file fevmemodules.c.
Definition at line 671 of file fevmemodules.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 591 of file fevmemodules.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 650 of file fevmemodules.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 841 of file fevmemodules.c.
Definition at line 697 of file fevmemodules.c.
Definition at line 122 of file cnaf_callback.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 604 of file fevmemodules.c.
Definition at line 227 of file fevmemodules.c.
INT display_period = 000 |
a frontend status page is displayed with this frequency in ms
Definition at line 66 of file fevmemodules.c.
int done =0 |
Definition at line 82 of file fevmemodules.c.
EQUIPMENT equipment[] |
Main structure for midas equipment.
Definition at line 150 of file fevmemodules.c.
INT event_buffer_size = 10 * 100000 |
buffer size to hold events
Definition at line 75 of file fevmemodules.c.
DWORD evlimit |
Definition at line 83 of file fevmemodules.c.
frontend_loop is called periodically if this variable is TRUE
Definition at line 63 of file fevmemodules.c.
The frontend file name, don't change it.
Definition at line 60 of file fevmemodules.c.
char* frontend_name = "fevmemodules" |
The frontend name (client name) as seen by other MIDAS clients.
Definition at line 58 of file fevmemodules.c.
HNDLE hSet |
Definition at line 101 of file fevmemodules.c.
int inRun = 0 |
Definition at line 81 of file fevmemodules.c.
|
extern |
int intflag = 0 |
Definition at line 80 of file fevmemodules.c.
INT max_event_size = 200000 |
maximum event size produced by this frontend
Definition at line 69 of file fevmemodules.c.
INT max_event_size_frag = 5 * 1024 * 1024 |
maximum event size for fragmented events (EQ_FRAGMENTED)
Definition at line 72 of file fevmemodules.c.
int missed =0 |
Definition at line 81 of file fevmemodules.c.
int myinfo = VME_INTERRUPT_SIGEVENT |
Definition at line 48 of file fevmemodules.c.
MVME_INTERFACE* myvme |
Definition at line 78 of file fevmemodules.c.
int sRG = 0 |
Definition at line 79 of file fevmemodules.c.
int stop_req =0 |
Definition at line 82 of file fevmemodules.c.
int trig_level = 0 |
Definition at line 43 of file fevmemodules.c.
BANK_LIST trigger_bank_list[] |
Definition at line 123 of file fevmemodules.c.
Definition at line 102 of file fevmemodules.c.
DWORD V1729_BASE = 0x120000 |
Definition at line 95 of file fevmemodules.c.
DWORD VADC0_BASE = 0x100000 |
Definition at line 88 of file fevmemodules.c.
DWORD VADC1_BASE = 0x200000 |
Definition at line 89 of file fevmemodules.c.
DWORD VADC2_BASE = 0x300000 |
Definition at line 90 of file fevmemodules.c.
DWORD VADC3_BASE = 0x400000 |
Definition at line 91 of file fevmemodules.c.
DWORD VF48_BASE = 0xAF0000 |
Definition at line 94 of file fevmemodules.c.
int vf48_error = 0 |
Definition at line 696 of file fevmemodules.c.
DWORD VLAM_BASE = 0x800000 |
Definition at line 93 of file fevmemodules.c.
DWORD VMEIO_BASE = 0x780000 |
Definition at line 86 of file fevmemodules.c.
DWORD VTDC0_BASE = 0xF10000 |
Definition at line 87 of file fevmemodules.c.