The terms that are needed for a discussion of a frontend will be introduced here. The features of a typical frontend task will then be explained by reference to some of the examples included with the MIDAS package.
The term "frontend" usually refers to a "frontend task" or program running on a particular computer which has access to hardware equipment in use by the experiment. An experiment may run several frontends, each performing different functions.
A frontend task consists of
- a fixed experiment-independent system framework (i.e. mfe.c)
- handling the data flow control, data transmission and run control operation.
- a user part (e.g. frontend.c)
- written by the user describing the sequence of actions to acquire the hardware data
A set of templates for the user part is provided in the MIDAS package (e.g. ../midas/examples/experiment/frontend.c).
The hardware access is only apparent in the user part ( referred to here as frontend.c, but the user may select any name). The system framework is contained in the file mfe.c, which is part of the MIDAS package (the name "mfe" stands for "MIDAS front end").
The term "frontend code" in this document usually refers to the user part (i.e. frontend.c), since the system framework (mfe.c) is fixed.
To build a frontend task, the user code frontend.c and system code mfe.c are compiled and linked together with the required libraries, by running a Makefile (e.g. ../midas/examples/experiment/Makefile in the MIDAS package).
A "frontend task" may have any name the user chooses (e.g. fevme, fegpib).
The purpose of a frontend task is to collect data from the hardware and transmit this information to a central place where data logging and analysis can be performed.
A frontend task is built by the user (see #Frontend) and consists of as "user part" and a "system framework"
The framework code (mfe.c) has the following arguments:
[-h hostname ] : host name (see @ref RC_odbedit_utility) [-e exptname ] : experiment name (see @ref RC_odbedit_utility) [-D ] : Become a Daemon. [-O ] : Become a Daemon but keep stdout [-d ] : Used for debugging the frontend [-i index] : Set frontend index (used with @ref FE_mevb_utility . See also @ref FE_principle_eb).
Note that the new argument (-i index) has been introduced to facilitate the multiple frontend configuration operation required for the Event Builder
Start the application as a daemon, using the default host, experiment and port :
e.g. fevme -D
Start the application superceding the default host, experiment and port:
e.g. fegpib -e exp218 -h isdaq10 -p 7077 -D