Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:54

0001 #! /bin/csh
0002 
0003 if (! $?ONLMON_MAIN ) then
0004   echo "ONLMON_MAIN environment variable not set, exiting"
0005   exit
0006 endif
0007 
0008 set opt_n = 0
0009 
0010 foreach arg ($*)
0011     switch ($arg)
0012     case "-n":
0013         set opt_n = 1
0014         breaksw
0015     endsw
0016 end
0017 
0018 if ($opt_n) then
0019   set oldonlmon = $ONLMON_MAIN
0020   unsetenv ONLMON_*
0021   setenv ONLMON_MAIN $oldonlmon
0022   unset oldonlmon
0023 endif
0024 
0025 # set the macros directory to the current dir (they
0026 # reside in the same directory as this setup script)
0027 if (! $?ONLMON_MACROS) then
0028   setenv ONLMON_MACROS `pwd`
0029 endif
0030 
0031 # create save directory if not exist
0032 if ($?ONLMON_SAVEDIR) then
0033   if (! -d $ONLMON_SAVEDIR) then
0034     mkdir -p $ONLMON_SAVEDIR
0035   endif
0036 endif
0037 
0038 # create save directory if not exist
0039 if ($?ONLMON_LOGDIR) then
0040   if (! -d $ONLMON_LOGDIR) then
0041     mkdir -p $ONLMON_LOGDIR
0042   endif
0043 else
0044   setenv ONLMON_LOGDIR `pwd`
0045 endif
0046 
0047 if (! $?ONLMON_HTMLDIR) then
0048   setenv ONLMON_HTMLDIR /sphenix/WWW/subsystem/OnlMonHtmlTest
0049 endif
0050 
0051 
0052 # create history directory if not exist
0053 if ($?ONLMON_HISTORYDIR) then
0054   if (! -d $ONLMON_HISTORYDIR) then
0055     mkdir -p $ONLMON_HISTORYDIR
0056   endif
0057 endif
0058 
0059 #if (! $?ONLINE_LOG) then
0060 #  setenv ONLINE_LOG /export/data1/log
0061 #endif
0062 
0063 #if (! $?ONLINE_CONFIGURATION) then
0064 #  setenv ONLINE_CONFIGURATION /export/software/oncs/online_configuration
0065 #endif
0066 
0067 if (! $?ONLMON_BIN) then
0068   setenv ONLMON_BIN $ONLMON_MAIN/bin
0069 endif
0070 
0071 if (! $?ONLMON_CALIB) then
0072   setenv ONLMON_CALIB $ONLMON_MAIN/share/onlmon
0073 endif
0074 
0075 if (! $?ONLMON_RUNDIR) then
0076   setenv ONLMON_RUNDIR $ONLMON_MAIN/share
0077 endif
0078 
0079 #set up root
0080 setenv EVT_LIB $ROOTSYS/lib
0081 if (-f ${OPT_SPHENIX}/bin/setup_local.csh ) then
0082   source ${OPT_SPHENIX}/bin/setup_local.csh $ONLMON_MAIN
0083 else
0084   # start with your local directory
0085   setenv ROOT_INCLUDE_PATH ./:$ONLINE_MAIN/include
0086   foreach local_incdir ($ONLINE_MAIN/include/*)
0087     if (-d $local_incdir) then
0088       setenv ROOT_INCLUDE_PATH ${ROOT_INCLUDE_PATH}:$local_incdir
0089     endif
0090   end
0091   setenv ROOT_INCLUDE_PATH ${ONLMON_MAIN}/include:${ROOT_INCLUDE_PATH}
0092   setenv LD_LIBRARY_PATH ${ONLMON_MAIN}/lib:$LD_LIBRARY_PATH
0093   set path = (${ONLMON_MAIN}/bin $path)
0094 endif
0095 # all subsystems scripts end in Setup.csh
0096 foreach script ($ONLMON_BIN/*Setup.csh)
0097   source $script
0098 end
0099 unset local_incdir