Babar/CM2 A-to-Z at Manchester

James Werner

Babar Software configuration


Configuring general Bash shell

cat /etc/bashrc # /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # by default, we want this to get set. # Even for non-interactive, non-login shells. if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then umask 002 else umask 022 fi # are we an interactive shell? if [ "$PS1" ]; then if [ -x /usr/bin/tput ]; then if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal stty erase `tput kbs` elif [ -x /usr/bin/wc ]; then if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal stty erase `tput kbs` fi fi fi case $TERM in xterm*) if [ -e /etc/sysconfig/bash-prompt-xterm ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm else PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' fi ;; screen) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' ;; *) [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default ;; esac [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " if [ "x$SHLVL" != "x1" ]; then # We're not a login shell for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then . $i fi done fi fi # vim:ts=4:sw=4

Configuring user bash shell

cat .bashrc # .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi if [ -r /afs/hep.man.ac.uk/g/babar/etc/hepix/bashrc ]; then . /afs/hep.man.ac.uk/g/babar/etc/hepix/bashrc else echo BaBar setup file /afs/hep.man.ac.uk/g/babar/etc/hepix/bashrc not found fi Este arquivo executa o bashrc contido no diretorio $BFROOT/etc/hepix que define toda a estrutura em arvore para o sistema.

Configuring Hepix

cat group_siteSpecs.conf.sh #!/bin/sh # group_siteSpecs.conf.sh - BABAR site-specific environment setup script # # Description: This script performs SLAC-specific BABAR environment setup # functions. It is called automatically from within # group_sys.conf.csh # # Edit History: # 27-Mar-01 (R.Bartoldus) fixed LD_LIBRARY_PATH # 16-Dec-96 (P.Raines) converted to Bourne from csh # # $Id: group_siteSpecs.conf.sh,v 1.20 2002/05/14 14:49:14 gowdy Exp $ # #---------------------------------------------------------------------------- # ARCHITECTURE INDEPENDENT ACTIONS #---------------------------------------------------------------------------- # #---------------------------------------------------------------------------- # ARCHITECTURE-SPECIFIC ACTIONS #---------------------------------------------------------------------------- # case `$GROUP_DIR/flavor` in *_SunOS*|*_Solaris*) if [ ! -z "$LD_LIBRARY_PATH" ] ; then LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BFROOT}/package/objy7.1/solaris7/lib" else LD_LIBRARY_PATH="${BFROOT}/objy7.1/solaris7/lib" fi export LD_LIBRARY_PATH ;; *_Linux*) if [ -z "$LD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="${BFROOT}/package/gcc-2.95.3/lib:${BFROOT}/package/objy7.1/linux86/lib:/usr/local/lib:/usr/mlocal/lib" else LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BFROOT}/package/gcc-2.95.3/lib:${BFROOT}/package/objy7.1/linux86/lib:/usr/local/lib:/usr/mlocal/lib" fi export LD_LIBRARY_PATH ;; *) ;; esac # # site specific variables # SQL_DRIVER=mysql SQL_HOST=sun1.hep.man.ac.uk export SQL_DRIVER SQL_HOST CERN=${BFROOT}/package/cern CVSROOT=${BFROOTr}/repo # default cvs repository BFDISTr=${BFROOTr}/dist export CERN CVSROOT BFDISTr # #----- Done #EOF cat group_sys.conf.sh #! /bin/sh #+########################################################### # # group_sys.conf.sh # # description: Environment for BaBar users # # Edit History: # 3-Feb-97 (T.Pavel) synced again with csh # 18-Jan-97 (P.Raines) converted again from csh # 16-Dec-96 (P.Raines) converted from csh # # $Id: group_sys.conf.sh,v 1.25 2000/03/17 04:11:52 gowdy Exp $ # ####################################################################### if [ -z "$GROUP_ENV" ]; then #---------------------------------------------------------------------- #++ Group customisations (environmental variables, aliases) # B Factory root directory if [ -z "$BFROOT" ]; then BFROOT=/afs/hep.man.ac.uk/g/babar export BFROOT fi if [ -z "$BFROOTr" ]; then BFROOTr=/afs/rl.ac.uk/babar export BFROOTr fi # #define site if [ -z "$BFSITE" ]; then BFSITE=man export BFSITE fi # Path modification for executables and manual pages # Is this a SLAC-specific thing, or not? #Set GROUP_DIR if not already set if [ -z "$GROUP_DIR" ]; then GROUP_DIR=${BFROOT}/etc/hepix export GROUP_DIR fi #---------------------------------------------------------------------- #++ Architecture-specific actions case `$GROUP_DIR/flavor` in *_AIX*) GROUPPATH=${BFROOT}/bin:${BFROOT}/bin.aix6000 GROUPMANPATH=${BFROOT}/man:${BFROOT}/man.aix6000 ulimit -d unlimited ;; *_OSF*) GROUPPATH=${BFROOT}/bin:${BFROOT}/bin.OSF1 GROUPMANPATH=${BFROOT}/man:${BFROOT}/man.OSF1 ;; *_HPUX*) # these directories (hpux10) don't really exist (yet)... GROUPPATH=${BFROOT}/bin:${BFROOT}/bin.hpux10 GROUPMANPATH=${BFROOT}/man:${BFROOT}/man.hpux10 ;; *_SunOS*|*_Solaris*) GROUPPATH=${BFROOT}/bin:${BFROOT}/bin.sun4:/usr/afsws/bin GROUPMANPATH=${BFROOT}/man:${BFROOT}/man.sun4:/usr/afsws/man ;; *_Linux-2.4*) GROUPPATH=${BFROOT}/bin.man:${BFROOT}/bin:${BFROOT}/bin.linux GROUPMANPATH=${BFROOT}/man:${BFROOT}/man.linux ;; *) # we don't have binaries for this ARCH anyway, so just add the scripts: GROUPPATH=${BFROOT}/bin GROUPMANPATH=${BFROOT}/man ;; esac #---------------------------------------------------------------------- #++ add GROUPPATH to PATH export GROUPPATH GROUPMANPATH PATH=${PATH}:${GROUPPATH} [ -n "$MANPATH" ] && MANPATH=${MANPATH}:${GROUPMANPATH} export PATH MANPATH if [ -x /usr/bin/hostinfo ]; then # [NeXT requires special treatment] BFARCH=NeXT # echo "SRT not supported on NeXT systems" else #---------------------------------------------------------------------- #++ SRT (Software Release Tools) setup # # Set up selected release for babar user if they have file BFCURRENT # or $BFCURRENT already defined; otherwise use "current" as default. if [ -r $HOME/BFCURRENT ]; then BFCURRENT=`cat $HOME/BFCURRENT` else test -n "$BFCURRENT" || BFCURRENT=current fi export BFCURRENT if [ -r $BFROOT/bin/SRTstartup.sh ]; then . $BFROOT/bin/SRTstartup.sh elif [ -r $BFROOT/dist/releases/$BFCURRENT/SoftRelTools/SRTstartup.sh ]; then . $BFROOT/dist/releases/$BFCURRENT/SoftRelTools/SRTstartup.sh else if tty -s; then echo "Warning: SRTstartup.sh not available for release "$BFCURRENT echo " (hint: check the contents of your ~/BFCURRENT file)" fi fi # local overrides to makefiles if [ -z "$BFOVERRIDE" ]; then BFOVERRIDE=$BFROOT/etc export BFOVERRIDE fi fi #---------------------------------------------------------------------- #++ CERNLIB stuff if [ -d /cern ]; then CERN=/cern elif [ -n "$ARCHNAME" ]; then CERN=/usr/local/cernlib/$ARCHNAME # base of CERN library else # give up and prompt user into finding CERNlib: CERN=/where-is-cernlib fi export CERN #---------------------------------------------------------------------- #++ The following script defines site-specific BABAR items # (the contents of this file must be adapted for each site) if [ -f $GROUP_DIR/group_siteSpecs.conf.sh ]; then . $GROUP_DIR/group_siteSpecs.conf.sh fi #---------------------------------------------------------------------- #++ Flag that we've completed this script: GROUP_ENV="BABAR"; export GROUP_ENV fi #EOF cat group_aliases.sh # group_aliases.sh # # BABAR Group-wide aliases are defined here # # $Id: group_aliases.sh,v 1.52 2002/10/17 16:19:48 gowdy Exp $ # ############################################################################# #--> These aliases are used to manipulate environmental variables used to hold #--> directory paths, e.g. PATH, MANPATH. They allow one to append, prepend #--> or remove specific directories from such variables. if [ -n "${BASH_VERSION:-""}" ]; then addpath_clean() { delpath $* eval "$1=\$$1:$2" } addpath2_clean() { delpath $* eval "$1=$2:\$$1" } # add to end of path addpath() { if ! eval test -z \"\${$1##*:$2:*}\" -o -z \"\${$1%%*:$2}\" -o -z \"\${$1##$2:*}\" ; then eval "$1=\$$1:$2" fi } # add to front of path addpath2() { if ! eval test -z \"\${$1##*:$2:*}\" -o -z \"\${$1%%*:$2}\" -o -z \"\${$1##$2:*}\" ; then eval "$1=$2:\$$1" fi } # delete from path delpath() { eval "$1=\$(echo \$$1 | /bin/sed -e s%^$2\:%% -e s%:$2\:%:%g -e s%:$2\\\$%%)" } modpath() { eval "$1=\$(echo \$$1 | /bin/sed -e s%^$2\:%$3\:% -e s%:$2\:%:$3\:%g -e s%:$2\\\$%:$3%)" } fi srtpath() { if [ -r $BFROOT/bin/SRTstartup.sh ] ; then dialog=1; export dialog; . $BFROOT/bin/SRTstartup.sh "$@" ; dialog= else echo "Cannot find $BFROOT/bin/SRTstartup.sh" fi } setboot() { if [ -f $BFROOT/bin/SRTsetboot.sh ] ; then . $BFROOT/bin/SRTsetboot.sh else echo No SRTsetboot.sh file fi } prv0boot() { if [ -f $BFROOT/bin/prv0boot.sh ] ; then . $BFROOT/bin/prv0boot.sh else echo No prv0boot.sh file fi } recoboot() { if [ -f $BFROOT/bin/recoboot.sh ] ; then . $BFROOT/bin/recoboot.sh else echo No recoboot.sh file fi } recobootMC() { if [ -f $BFROOT/bin/recobootMC.sh ] ; then . $BFROOT/bin/recobootMC.sh else echo No recobootMC.sh file fi } ir2boot() { if [ -f /nfs/bbr-objy01/objy/databases/scripts/ir2boot.sh ] ; then . /nfs/bbr-objy01/objy/databases/scripts/ir2boot.sh else echo No ir2boot.sh file fi } qatestboot() { if [ -f $BFROOT/bin/qatestboot.sh ] ; then . $BFROOT/bin/qatestboot.sh else echo No qatestboot.sh file fi } qaprodboot() { if [ -f $BFROOT/bin/qaprodboot.sh ] ; then . $BFROOT/bin/qaprodboot.sh else echo No qaprodboot.sh file fi } trkboot() { if [ -f $BFROOT/bin/trkboot.sh ] ; then . $BFROOT/bin/trkboot.sh else echo No trkboot.sh file fi } sp1boot() { if [ -f $BFROOT/bin/sp1boot.sh ] ; then . $BFROOT/bin/sp1boot.sh else echo No sp1boot.sh file fi } simdevboot() { if [ -f $BFROOT/bin/simdevboot.sh ] ; then . $BFROOT/bin/simdevboot.sh else echo No simdevboot.sh file fi } simuboot() { if [ -f $BFROOT/bin/simuboot.sh ] ; then . $BFROOT/bin/simuboot.sh else echo No simuboot.sh file fi } sp1testboot() { if [ -f $BFROOT/bin/sp1testboot.sh ] ; then . $BFROOT/bin/sp1testboot.sh else echo No sp1testboot.sh file fi } sp1prodboot() { if [ -f $BFROOT/bin/sp1prodboot.sh ] ; then . $BFROOT/bin/sp1prodboot.sh else echo No sp1prodboot.sh file fi } sp1analboot() { if [ -f $BFROOT/bin/sp1analboot.sh ] ; then . $BFROOT/bin/sp1analboot.sh else echo No sp1analboot.sh file fi } oprtestboot() { if [ -f $BFROOT/bin/oprtestboot.sh ] ; then . $BFROOT/bin/oprtestboot.sh else echo No oprtestboot.sh file fi } analboot() { if [ -f $BFROOT/bin/analboot.sh ] ; then . $BFROOT/bin/analboot.sh else echo No analboot.sh file fi } analboot2() { if [ -f $BFROOT/bin/analboot2.sh ] ; then . $BFROOT/bin/analboot2.sh else echo No analboot2.sh file fi } ambientboot() { if [ -f $BFROOT/bin/ambientboot.sh ] ; then . $BFROOT/bin/ambientboot.sh else echo No ambientboot.sh file fi } sp2prodboot() { if [ -f $BFROOT/bin/sp2prodboot.sh ] ; then . $BFROOT/bin/sp2prodboot.sh else echo No sp2prodboot.sh file fi } sp2analboot() { if [ -f $BFROOT/bin/sp2analboot.sh ] ; then . $BFROOT/bin/sp2analboot.sh else echo No sp2analboot.sh file fi } sp3prodboot() { if [ -f $BFROOT/bin/sp3prodboot.sh ] ; then . $BFROOT/bin/sp3prodboot.sh else echo No sp3prodboot.sh file fi } sp3testboot() { if [ -f $BFROOT/bin/sp3testboot.sh ] ; then . $BFROOT/bin/sp3testboot.sh else echo No sp3testboot.sh file fi } sp3analboot() { if [ -f $BFROOT/bin/sp3analboot.sh ] ; then . $BFROOT/bin/sp3analboot.sh else echo No sp3analboot.sh file fi } sp3llnlboot() { if [ -f $BFROOT/bin/sp3llnlboot.sh ] ; then . $BFROOT/bin/sp3llnlboot.sh else echo No sp3llnlboot.sh file fi } sp3analboot() { if [ -f $BFROOT/bin/sp3analboot.sh ] ; then . $BFROOT/bin/sp3analboot.sh else echo No sp3analboot.sh file fi } g4testboot() { if [ -f $BFROOT/bin/g4testboot.sh ] ; then . $BFROOT/bin/g4testboot.sh else echo No g4testboot.sh file fi } simtestboot() { if [ -f $BFROOT/bin/simtestboot.sh ] ; then . $BFROOT/bin/simtestboot.sh else echo No simtestboot.sh file fi } g4prodboot() { if [ -f $BFROOT/bin/g4prodboot.sh ] ; then . $BFROOT/bin/g4prodboot.sh else echo No g4prodboot.sh file fi } physboot() { if [ -f $BFROOT/bin/physboot.sh ] ; then . $BFROOT/bin/physboot.sh else echo No physboot.sh file fi } data12boot() { if [ -f $BFROOT/bin/data12boot.sh ] ; then . $BFROOT/bin/data12boot.sh else echo No data12boot.sh file fi } mc12boot() { if [ -f $BFROOT/bin/mc12boot.sh ] ; then . $BFROOT/bin/mc12boot.sh else echo No mc12boot.sh file fi } alias bsub=$BFROOT/bin/bbrbsub cat $BFROOT/etc/hepix/bashrc syst=/afs/hep.man.ac.uk/g/babar/etc/hepix/group_sys.conf.sh alias=/afs/hep.man.ac.uk/g/babar/etc/hepix/group_aliases.sh if [ -r $syst ] ; then . $syst PATH=$BFROOT/bin:/afs/hep.man.ac.uk/g/babar/package/gcc-2.95.3/bin:/afs/hep.man.ac.uk/g/babar/package/root/root/bin:$BFROOT/bin.man:~/bin:./bin:$PATH export PATH else echo BaBar login script: echo $syst echo not found! fi if [ -r $alias ] ; then . $alias else echo BaBar login script: echo $alias echo not found! fi Estes arquivos estabelecem a ponte de ligacao entre o software babar e todos os pre-requisitos, o ambiente do site propriamente dito, etc.

SiteConfig

O SiteConfig deve ser instalado no diretorio $BFROOT/etc/12.5.2/SoftRelTools onde 12.5.2 e o release base onde todos os softwares farao referencia. Dentro deste diretorio deverao ter os seguintes arquivos copiado do diretorio de referencia: /afs/hep.man.ac.uk/g/babar/dist/releases/12.5.2/SiteConfig/slac/SoftRelTools Cada pacote tera um mk+ que superpoe as definicoes do produto com definicoes do site. Sao os seguintes arquivos: README arch_spec_FDDB.mk+ arch_spec_RW.mk+ arch_spec_cdev.mk+ arch_spec.mk+ arch_spec_Motif.mk+ arch_spec_SMI.mk+ arch_spec_f77.mk+ arch_spec_ACE.mk+ arch_spec_PERL.mk+ arch_spec_TAO.mk+ arch_spec_CMLOG.mk+ arch_spec_Qt.mk+ arch_spec_Tcl.mk+ arch_spec_DIM.mk+ arch_spec_ROOT.mk+ arch_spec_Tk.mk+ cd $BFROOT/etc mkdir SoftRelTools cp /afs/hep.man.ac.uk/g/babar/dist/releases/14.5.2/SiteConfig/slac/SoftRelTools/* . ls README arch_spec_Java.mk+ arch_spec_SMI.mk+ arch_spec.mk+ arch_spec_Motif.mk+ arch_spec_TAO.mk+ arch_spec_ACE.mk+ arch_spec_PERL.mk+ arch_spec_Tcl.mk+ arch_spec_CERNLIB.mk+ arch_spec_Python.mk+ arch_spec_Tk.mk+ arch_spec_CMLOG.mk+ arch_spec_Qt.mk+ arch_spec_X11.mk+ arch_spec_DIM.mk+ arch_spec_ROOT.mk+ arch_spec_cdev.mk+ arch_spec_FDDB.mk+ arch_spec_RW.mk+ arch_spec_f77.mk+

Configuring releases

cd $BFDIST/releases ls 12.5.2 12.5.2-physics-1a 14.5.2 ln -s 12.5.2-physics-1a/ analysis-14a ln -s 12.5.2/ analysis-14 ln -s 14.5.2/ analysis-21 ln -s 12.5.2-physics-1a/ current ls 12.5.2 12.5.2-physics-1a 14.5.2 analysis-14 analysis-14a analysis-21 current cd $BFROOT/etc ln -s 12.5.2 12.5.2-physics-1a ln -s 12.5.2 14.5.2 Para cada release instalado: cd $BFROOT/dist/releases/12.5.2 srtpath gmake siteinstall
Top

Last modified:
Copyright 2004 Manchester University
Feedback to: jamwer@hep.man.ac.uk