Midas build options and operation considerations

previous.gif CAMAC and VME access function call - Top - Midas Code and Libraries next.gif

The section covers the Building Options for customization of the DAQ system as well as the different Environment variables options for its operation.


Building Options


USERFLAGS

This flag can be used at the command prompt for individual application built.
make USERFLAGS=-static linux/bin/mstat


MIDAS_PREF_FLAGS

This flag is for internal global Makefile preference. Included in the OSFLAGS.
MIDAS_PREF_FLAGS  = -DYBOS_VERSION_3_3 -DEVID_TWIST


HAVE_CAMAC

This flag enable the CAMAC RPC service within the frontend code. The application mcnaf task and the web CNAF page are by default not CAMAC enabled (HAVE_CAMAC undefined).


HAVE_ROOT

This flag is used for the midas analyzer task in the case ROOT environment is required. An example of the makefile resides in examples/experiment/Makefile. This flag is enabled by the presence of a valid ROOTSYS environment variable. In the case ROOTSYS is not found the analyzer is build without ROOT support. In this later case, the application rmidas task will be missing. refer to MIDAS Analyzer for further details.


HAVE_HBOOK

This flag is used for examples/hbookexpt/Makefile for building the midas analyzer task against HBOOK and PAW. The path to the cernlib is requested and expected to be found under /cern/pro/lib (see makefile). This can always be overwritten during the makefile using the following command:
make CERNLIB_PACK=<your path>/libpacklib.a


HAVE_MYSQL

This flag is used for the mlogger task to building the application with mySQL support. The build requires to have access to the mysql include files as well as the mysql library.


SPECIFIC_OS_PRG

This flag is for internal Makefile preference. Used in particular for additional applications build based on the OS selection. In the example below mspeaker, mlxspeaker tasks and dio task are built only under OS_LINUX.
SPECIFIC_OS_PRG = $(BIN_DIR)/mlxspeaker_task $(BIN_DIR)/dio_task


INCLUDE_FTPLIB

FTP support "INCLUDE_FTPLIB" Application such as the mlogger task, lazylogger task can use the ftp channel for data transfer.


INCLUDE_ZLIB

The applications lazylogger task, mdump task can be built with zlib.a in order to gain direct access to the data within a file with extension mid.gz or ybs.gz. By default this option is disabled except for the system analyzer core code mana.c.
make USERFLAGS=-DINCLUDE_ZLIB linux/lib/ybos.o
make USERFLAGS=-static linux/bin/mdump


YBOS_VERSION_3_3

The default built for ybos support is version 4.0. If lower version is required include YBOS_VERSION_3_3 during compilation of the ybos.c
make USERFLAGS=-DYBOS_VERSION_3_3 linux/lib/ybos.o


DM_DUAL_THREAD

Valid only under VxWorks. This flag enable the dual thread task when running the frontend code under VxWorks. The main function calls are the dm_xxxx in midas.c (Contact Pierre for more information).


USE_EVENT_CHANNEL

To be used in conjunction with the DM_DUAL_THREAD.


USE_INT

In mfe.c. Enable the use of interrupt mechanism. This option is so far only valid under VxWorks Operating system. (Contact Stefan or Pierre for further information).


Environment variables

Midas uses a several environment variables to facilitate the different application startup.

MIDASSYS

From version 1.9.4 this environmental variable is required. It should point to the main path of the installed Midas package. The application odbedit will generate a warning message in the case this variable is not defined.

MIDAS_EXPTAB

This variable specify the location of the exptab file containing the predefined midas experiment. The default location is for OS_UNIX: /etc, /. For OS_WINNT: \system32, \system.

MIDAS_SERVER_HOST

This variable predefines the names of the host on which the Midas experiment shared memories are residing. It is needed when connection to a remote experiment is requested. This variable is valid for Unix as well as Windows OS.

MIDAS_EXPT_NAME

This variable predefines the name of the experiment to connect by default. It prevents the requested application to ask for the experiment name when multiple experiments are available on the host or to add the -e <expt_name> argument to the application command. This variable is valid for Unix as well as Windows OS.

MIDAS_DIR

This variable predefines the LOCAL directory path where the shared memories for the experiment are located. It supersede the host_name and the expt_name as well as the MIDAS_SERVER_HOST and MIDAS_EXPT_NAME as a given directory path can only refer to a single experiment.

MCHART_DIR

This variable is ... for later... This variable is valid only under Linux as the -D is not supported under WindowsXX

previous.gif CAMAC and VME access function call - Top - Midas Code and Libraries next.gif


Midas DOC Version 1.9.5 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk