AlcapDAQ
1
|
#include <stdio.h>
#include "midas.h"
#include "mevb.h"
#include "ybos.h"
#include "mucap_compress.h"
Go to the source code of this file.
Macros | |
#define | NUMCRATES 5 |
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) |
INT | eb_user (INT nfrag, BOOL mismatch, EBUILDER_CHANNEL *ebch, EVENT_HEADER *pheader, void *pevent, INT *dest_size) |
Variables | |
char * | frontend_name = "Ebuilder" |
char * | frontend_file_name = __FILE__ |
BOOL | ebuilder_call_loop = FALSE |
INT | display_period = 3000 |
INT | max_event_size = MAX_EVENT_SIZE |
INT | max_event_size_frag = MAX_EVENT_SIZE |
INT | event_buffer_size = EVENT_BUFFER_SIZE |
INT | lModulo = 100 |
Global var for testing. More... | |
EQUIPMENT | equipment [] |
#define NUMCRATES 5 |
Definition at line 63 of file ebuser.cpp.
Referenced by eb_begin_of_run().
INT eb_begin_of_run | ( | INT | rn, |
char * | UserField, | ||
char * | error | ||
) |
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. |
eb_begin_of_run()
Hook to the event builder task at PreStart transition. {verbatim} {verbatim}
rn | run number |
UserField | argument from /Ebuilder/Settings |
error | error string to be passed back to the system. |
Definition at line 145 of file ebuser.cpp.
Referenced by tr_prestart(), and tr_start().
INT eb_end_of_run | ( | INT | rn, |
char * | error | ||
) |
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. |
eb_end_of_run()
Hook to the event builder task at completion of event collection after receiving the Stop transition. {verbatim} {verbatim}
rn | run number |
error | error string to be passed back to the system. |
Definition at line 193 of file ebuser.cpp.
Referenced by close_buffers(), and main().
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.
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 or xxx_BKTYPE for Ybos data 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!
For YBOS format, use the following example.
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 259 of file ebuser.cpp.
References compress_event(), EB_SUCCESS, EB_USER_ERROR, i, EBUILDER_CHANNEL::pfragment, and printf().
Referenced by source_scan().
INT ebuilder_exit | ( | void | ) |
INT ebuilder_init | ( | void | ) |
INT ebuilder_loop | ( | void | ) |
Definition at line 132 of file ebuser.cpp.
References EB_SUCCESS.
INT ebuser | ( | INT | , |
BOOL | mismatch, | ||
EBUILDER_CHANNEL * | , | ||
EVENT_HEADER * | , | ||
void * | , | ||
INT * | |||
) |
INT read_scaler_event | ( | char * | pevent, |
INT | off | ||
) |
INT display_period = 3000 |
Definition at line 77 of file ebuser.cpp.
BOOL ebuilder_call_loop = FALSE |
Definition at line 74 of file ebuser.cpp.
EQUIPMENT equipment[] |
Definition at line 102 of file ebuser.cpp.
INT event_buffer_size = EVENT_BUFFER_SIZE |
Definition at line 86 of file ebuser.cpp.
char* frontend_file_name = __FILE__ |
Definition at line 71 of file ebuser.cpp.
char* frontend_name = "Ebuilder" |
Definition at line 68 of file ebuser.cpp.
INT lModulo = 100 |
INT max_event_size = MAX_EVENT_SIZE |
Definition at line 80 of file ebuser.cpp.
INT max_event_size_frag = MAX_EVENT_SIZE |
Definition at line 83 of file ebuser.cpp.