MIDAS
|
Go to the source code of this file.
Functions | |
INT | ebuilder_init () |
INT | ebuilder_exit () |
INT | eb_begin_of_run (INT, char *, char *) |
INT | eb_end_of_run (INT, char *) |
INT | ebuilder_loop () |
INT | ebuser (INT, BOOL mismatch, EBUILDER_CHANNEL *, EVENT_HEADER *, void *, INT *) |
INT | read_scaler_event (char *pevent, INT off) |
Scaler event readout. | |
INT | eb_user (INT nfrag, BOOL mismatch, EBUILDER_CHANNEL *ebch, EVENT_HEADER *pheader, void *pevent, INT *dest_size) |
Variables | |
INT | tid_size [] |
const char * | frontend_name = "Ebuilder" |
const char * | frontend_file_name = __FILE__ |
BOOL | ebuilder_call_loop = FALSE |
INT | display_period = 3000 |
INT | max_event_size = 500000 |
INT | max_event_size_frag = 5 * 1024 * 1024 |
INT | event_buffer_size = 20 * 50000 |
INT | lModulo = 100 |
Global var for testing passed at BOR. | |
EBUILDER_SETTINGS | ebset |
BOOL | debug |
EQUIPMENT | equipment [] |
Hook to the event builder task at PreStart transition.
rn | run number |
UserField | argument from /Ebuilder/Settings |
error | error string to be passed back to the system. |
Definition at line 106 of file ebuser.cxx.
Hook to the event builder task at completion of event collection after receiving the Stop transition.
rn | run number |
error | error string to be passed back to the system. |
Definition at line 121 of file ebuser.cxx.
INT eb_user | ( | INT | nfrag, |
BOOL | mismatch, | ||
EBUILDER_CHANNEL * | ebch, | ||
EVENT_HEADER * | pheader, | ||
void * | pevent, | ||
INT * | dest_size | ||
) |
Hook to the event builder task after the reception of all fragments of the same serial number. The destination event has already the final EVENT_HEADER setup with the data size set to 0. It is than possible to add private data at this point using the proper bank calls. Therefore any new banks created within eb_user will be appearing before the collected banks from the fragments. When using the eb_user with the ODB flag "user build=y" (equipments/EB/settings) the automatic event builder is skipped. This allow the user to extract selectively from the different fragments the appropriate banks and compose the final destination event. In order to do so, the function "bk_copy(pevent, ebch[i].pfragment, bankname)" will copy a particular bank from a given fragment.
Note: It exists two Midas event format to address bank size less than 32KB and larger bank size <4GB. This distinction is done by the call bk_init(pevent) for the small bank size and bk_init32(pevent) for large bank size. Within an experiment, this declaration has to be consistant. Therefore the bk_init in the eb_user should follow as well the type of the frontends.
The ebch[] array structure points to nfragment channel structure with the following content:
The correct code for including your own MIDAS bank is shown below where TID_xxx is one of the valid Bank type starting with TID_ for midas format bank_name is a 4 character descriptor. pdata has to be declared accordingly with the bank type. Refers to the ebuser.c source code for further description.
It is not possible to mix within the same destination event different event format! No bk_swap performed when user build is requested.
nfrag | Number of fragment. |
mismatch | Midas Serial number mismatch flag. |
ebch | Structure to all the fragments. |
pheader | Destination pointer to the header. |
pevent | Destination pointer to the bank header. |
dest_size | Destination event size in bytes. |
Definition at line 192 of file ebuser.cxx.
Definition at line 93 of file ebuser.cxx.
INT ebuser | ( | INT | , |
BOOL | mismatch, | ||
EBUILDER_CHANNEL * | , | ||
EVENT_HEADER * | , | ||
void * | , | ||
INT * | |||
) |
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.
INT display_period = 3000 |
Definition at line 35 of file ebuser.cxx.
|
extern |
Definition at line 32 of file ebuser.cxx.
EQUIPMENT equipment[] |
Definition at line 62 of file ebuser.cxx.
INT event_buffer_size = 20 * 50000 |
Definition at line 44 of file ebuser.cxx.
Definition at line 29 of file ebuser.cxx.
Definition at line 26 of file ebuser.cxx.
INT lModulo = 100 |
INT max_event_size = 500000 |
Definition at line 38 of file ebuser.cxx.
INT max_event_size_frag = 5 * 1024 * 1024 |
Definition at line 41 of file ebuser.cxx.
|
extern |
Definition at line 55 of file mhdump.cxx.