CAMAC and VME access function call - Top - Midas Code and Libraries
The section covers the Building Options for customization of the DAQ system as well as the different Environment variables options for its operation.
- By default Midas is build with a minimum of pre-compiler flags. But the Makefile contains options for the user to apply customization by enabling internal options already available in the package.
- Other flags are avaiable at the application level:
- By default the midas applications are built for use with dynamic library libmidas.so. If static build is required the whole package can be built using the option static.
- The basic Midas package builds without external package library reference. But it does try to build an extra core analyzer application to be used in conjunction with ROOT if $ROOTSYS is found. This is required ONLY if the examples/experiment makefile is used for generating a complete Midas/ROOT analyzer application.
- In case of HBOOK/PAW analyzer application, the build should be done from examples/hbookexpt directory and the environment variable CERNLIB_PACK should be pointing to a valid cernpacklib.a library.
- For development it could be useful to built individual application in static. This can be done using the USERFLAGS option such as:
> rm linux/bin/mstat; make USERFLAGS=-static linux/bin/mstat
- The current OS support is done through fix flag established in the general Makefile . Currently the OS supported are:
- OS_OSF1 , OS_ULTRIX , OS_FREEBSD , OS_LINUX , OS_SOLARIS.
- For OS_IRIX please contact Pierre. The OS_VMS is not included in the Makefile as it requires a particular makefile and since several years now the VMS support has been dropped.
- OSFLAGS [2.0.0] For 32 bit built, the OSFLAGS should contains the -m32. By default this flag is not enabled. It has to be applied to the Makefile for the frontend examples too.
# add to compile midas in 32-bit mode
# OSFLAGS += -m32
- Other OS supported are:
- OS_WINNT : See file makefile.nt.
- OS_VXWORKS : See file makefile.ppc_tri.
This flag can be used at the command prompt for individual application built. make USERFLAGS=-static linux/bin/mstat
This flag is for internal global Makefile preference. Included in the OSFLAGS. MIDAS_PREF_FLAGS = -DYBOS_VERSION_3_3 -DEVID_TWIST
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).
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.
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
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.
- For operation of the analyzer without HBOOK or ROOT, refer to MIDAS Analyzer for further details.
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
FTP support "INCLUDE_FTPLIB" Application such as the mlogger task, lazylogger task can use the ftp channel for data transfer.
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
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
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).
To be used in conjunction with the DM_DUAL_THREAD.
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).
Midas uses a several environment variables to facilitate the different application startup.
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.
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.
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.
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.
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.
This variable is ... for later... This variable is valid only under Linux as the -D is not supported under WindowsXX
CAMAC and VME access function call - Top - Midas Code and Libraries
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