E852 Documentation: Software: Setup
Run-Time enviromnent
The following environment variables have to be defined in order to run the
E852 software:
- E852_HOME - the E852 home area, /home/lemond/e852
- E852_CONFIG - the huge area with all the E852 detector parameters-
- E852_CONFIG/maps - map manager files
- E852_CONFIG/par - various parameter files
(such as the magnetic field maps)
- E852_CONFIG/run.0 - 'default' configuration '.db' files.
The most important is 'master.db' which
is loaded by the analysis program and 'includes'
all other '.db' files.
- E852_CONFIG/run.XXXX - '.db' files for run XXXX. (obsolete).
- E852_CONFIG/runs.log - the runlog.
- E852_PAR - same as E852_CONFIG/par
- E852_SCALERS - the scalers database
- E852_BIN - online software
- E852_TAPES - tapes database
- E852_TMP - temp directory
- E852_HIST - repository for Hist histograms
- TAPEIO_MAXVBLOCK - used by the tape reading/writing code to
set the maximum tape block size (for variable length blocks).
Currently it is 100k (102400, half the Exabyte 8500 internal buffer).
- TAPEIO_MAXFBLOCK - same for fixed block tapes.
- TAPEIO_FBLOCKSIZE - block size for fixed block tapes. Set to 1024 bytes.
The DAQ online system also defines additional environment variables listed below-
- E852DAQROOT - root of the E852 online tree. Used by many.many.many scripts.
- E852_INIT - online system- various config/init/etc... files are kept there.
- E852_LOGDIR - online system- where the online system keeps it's logs.
Very often huge log files need to be removed from that area.
- E852_SCALERS - the scalers database
- E852_BIN - online software
- E852_TAPES - tapes database
- E852_TMP - temp directory
- E852_VAX_NODE - Used by the online initialisation program (DAQinit)
- E852_VAX_HOME - to build SSP code on different VAXes.
Please contact A.Ostrovidov for details.
- E852_HIST - online histograms
- E852_DISPATCHER - the hostname of the E852 Dispatcher program.
- LOGD_CONFIG_FILE - the online system logger daemon config file location.
Usually in the E852_LOGDIR area.
The preferred way to set these variables is to source the correct setup file.
The setup file used at BNL is:
> source /home/mpsdaq/e852/daq/setup
Software Building enviromnent
The Make Program
Building of E852 software is managed be the GNU Make software (gnumake). E852 currently
(as of 1995-03-16) uses GNU Make version 3.68.
Why?
- absolutely portable. The same version of GNU make can be built
on almost any computer.
- good documentation. The GNU make manual is as thick as
the /bin/make manual and is kept much more up to date.
- built-in support for the SCCS code management system. GNU make can automatically
detect out of date sources and update them from the SCCS tree.
Multiplatform support
The E852 software builds and runs on multiple software and hardware platforms.
The platfrom dependance (compiler switches, libraries, etc...) is handled automagically
by the E852_MAKETARGET environment variable.
Supported platfroms are listed here:
- SGI Irix4: E852_MAKETARGET = irix4 (no longer supported)
- SGI Irix5.2, 5.3: E852_MAKETARGET = irix5 and irix5o
- SGI Irix6: E852_MAKETARGET = irix6 and irix6o (supported only partially)
- IBM AIX3.2.5: E852_MAKETARGET = rs6000 or rs6000o
Guidelines for writing Makefiles
- include the '$E852_HOME/makefiles/rules.make' file.
It will define the $(INCLUDE) $(FINCLUDE) and $(CFLAGS)
depending on $(E852_MAKETARGET) for every differently for every platform.
- use $(INCLUDE) defined in 'rules.make' for include files.
The suggested search order is -I. -I../include -I$(E852_HOME)/include.
- look for libraries in the order- -L../lib -L$(E852_HOME)/lib
Use $(FLIB) to load the Fortran libraries (very platform dependant-
it is different even for irix4 and irix5)
- create libraries in the $(LIBDIR) directory.
- define the 'clean' and 'all' targets in such a way
that the sequence 'make clean' 'make all' will rebuild everything frm scratch.
"Bare bones" setup
To be able to build some subsystems (but not the libraries) follow these steps:
- set E852_MAKETARGET appropriately,
setenv E852_HOME to be /home/lemond/e852
put $E852_HOME/bin in your path (to get 'gnumake' and 'acpp').
- Make the build tree- ('->' means a symbolic link)
your_home/e852/source/makefiles -> /home/lemond/e852/source/makefiles
your_subsystem
your_subsystem/SCCS -> /home/lemond/e852/source/your_subsystem/SCCS
- 'cd your_subsystem'
- 'gnumake Makefile'.
At this point gnumake should extract the Makefile from SCCS.
If it does not happen, contact a knowledgable person.
- 'gnumake all'.
This will supposedly build everything.
"standard" setup
Everything is same as above except for more symlinks-
your_home/e852/source/makefiles -> /home/lemond/e852/source/makefiles
.../lib -> /home/lemond/e852/lib
or depending of the target host-
.../lib -> /home/lemond/e852/lib.irix4
.../lib -> /home/lemond/e852/lib.irix5
.../lib -> /home/lemond/e852/lib.rs6000
.../include -> /home/lemond/e852/include
.../your_subsystem
.../your_subsystem/SCCS -> /home/lemond/e852/source/your_subsystem/SCCS
"isolated" setup
This setup allows one to isolate himself from the /home/lemond/e852/ tree.
Instead of symlinks, the 'lib' and 'include' are real directories
with some of the libraries and include files. Most Makefiles are setup
to look first in these 'local' directories, then in /home/lemond/e852/{lib,include}
//
original: CO somewhen
revised: CO 1995-03-16
end file