#!/bin/csh # # $Id$ # $HeadURL$ # # Original August 26, 2013 DL # Minor revisions and reformatting, 17-Dec-2013, ejw # Updated for new coda 3.0 release, 19-Dec-2013, ejw # # # This is the hdonline.cshrc file # # This file is sourced by both the hdops and hdsys accounts to # set up the environment. It is here to provide consistency between # the environments of both accounts. # Uncomment this line to have each line printed as it is excecuted (for debugging only) # set echo #--------------------------------------------------------- # Location of output files setenv RUN_PERIOD "RunPeriod-2022-05" #setenv RAWDATA_DIR /gluex/raid/rawdata setenv RAWDATA_DIR /gluex/data/rawdata/curr/rawdata #--------------------------------------------------------- # Determine gluon node class from hostname setenv GLUON_TYPE UNKNOWN if ( $HOST =~ gluonraid* || $HOST =~ gluondaqbuff* ) then setenv GLUON_TYPE RAID else set gluon_num=`echo $HOST | grep -o '[0-9]\+'` if ( $gluon_num > 0 ) then if ( $gluon_num < 40 ) then setenv GLUON_TYPE CONTROLS else setenv GLUON_TYPE GENERAL endif endif endif #--------------------------------------------------------- # create some env vars if ( ! $?LD_LIBRARY_PATH ) then setenv LD_LIBRARY_PATH endif if ( ! $?CLASSPATH ) then setenv CLASSPATH endif if ( ! $?JANA_PLUGIN_PATH ) then setenv JANA_PLUGIN_PATH endif if ( ! $?PYTHONPATH ) then setenv PYTHONPATH endif if ( ! $?BMS_OSNAME ) then if ( -e /gluex/sim-recon/scripts/osrelease.pl ) then setenv BMS_OSNAME `/gluex/sim-recon/scripts/osrelease.pl` endif endif #--------------------------------------------------------- # Hall-D environment setup facility if ( -e /gluex/etc/setups/setup_init.csh ) then source /gluex/etc/setups/setup_init.csh endif #--------------------------------------------------------- # set defaults based on GLUON_TYPE set PYEPICS_ROOT=/gapps/pyepics/pyepics-3.2.1/lib/python2.6/site-packages if ( $GLUON_TYPE == 'GENERAL' || $GLUON_TYPE == 'RAID' ) then # n.b. we require 5.3.0 for xMsg since it requires c++14. # thus, we use it even for RHEL7 since the 4.8.5 compiler # only supports up to c++11 setup gcc5.3.0 # Python setup python2.7.11 set PYEPICS_ROOT=/gapps/pyepics/pyepics-3.2.1/lib/python2.7/site-packages endif #--------------------------------------------------------- # Set the location of the default python virtual environment # used for the online data flow and monitoring systems. # We do not source the activate script here since not all # processes need it. #setenv HOSS_VENV /gluonfs1/gapps/python/VENV/hoss_20191007/venv #setenv HOSS_VENV /gluonfs1/gapps/python/VENV/hoss_hydra_20201112/venv setenv HOSS_VENV /gluonfs1/gapps/python/VENV/hoss_hydra_20220513/venv alias venv source $HOSS_VENV/bin/activate.csh #--------------------------------------------------------- # Setup HTTP and HTTPS proxy. These are needed by things like git #setenv HTTPS_PROXY https://jprox:8082 #setenv HTTP_PROXY http://jprox:8082 #setenv https_proxy https://jprox:8082 #setenv http_proxy http://jprox:8082 #--------------------------------------------------------- # EPICS # Set environment for EPICS base and Hall D EPICS builds if( ${BMS_OSNAME} == 'Linux_CentOS5-i686-gcc4.1.2' ) then # Different EPICS for RHEL5 source /gluex/controls/epics/.epicsrc 3-14-12-3-RHEL5 else if( ${BMS_OSNAME} == 'Linux_RHEL7-x86_64-gcc4.8.5' ) then # This is for RHEL7 hosts while it is not the default Linux version for us source /gluex/controls/epics/.epicsrc 3-14-12-4-RHEL7 else if( ${BMS_OSNAME} == 'Linux_RHEL7-x86_64-gcc5.3.0' ) then source /gluex/controls/epics/.epicsrc 3-14-12-4-RHEL7 else # This is for the default EPICS base version which should be used # for most of the cases. source /gluex/controls/epics/.epicsrc 3-14-12-4-RHEL7 endif # Add extensions directory to LD_LIBRARY_PATH # (this should probably be done in /gluex/controls/epics/.epicsrc) #setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}" # Set environment for CSS for Hall D source /gluex/controls/css/.cssrc WITH_ALARM_3.1.7 # Set environment for PyEPICS (setting PYEPICS_LIBCA is # required since 32bit EPICS is first in LD_LIBRARY_PATH) setenv PYEPICS_LIBCA ${EPICS_BASE}/lib/linux-`uname -p`/libca.so setenv PYTHONPATH ${PYEPICS_ROOT}:${PYTHONPATH} # Create an alias to launch accelerator divisions display management framework JTABS alias jtabs 'ssh opsl00 jtabs >>& /dev/null' alias monticello 'ssh hdops@opsl00 edmRun monticello' #--------------------------------------------------------- # Hall-D Offline # sim-recon (sets up ROOT, XERCES, HDDS, JANA and CCDB) #-- Uncomment the next 3 lines to use a version of halld_recon that can be rebuilt #-- by the hdops account. This is for specific times which such access is needed. #-- The default production setting should use the halld_recon-latest build controlled #-- by hdsys. if ( -e /gluex/builds/${BMS_OSNAME}/halld_recon/halld_recon-hdops/${BMS_OSNAME}/setenv.csh ) then source /gluex/builds/${BMS_OSNAME}/halld_recon/halld_recon-hdops/${BMS_OSNAME}/setenv.csh endif #if ( -e /gluex/builds/${BMS_OSNAME}/halld_recon/halld_recon-latest/${BMS_OSNAME}/setenv.csh ) then # source /gluex/builds/${BMS_OSNAME}/halld_recon/halld_recon-latest/${BMS_OSNAME}/setenv.csh #endif # Select one of the following setenv CCDB_CONNECTION mysql://ccdb_user@gluondb1.jlab.org/ccdb #setenv CCDB_CONNECTION mysql://ccdb_user@hallddb.jlab.org/ccdb #setenv CCDB_CONNECTION sqlite:////gluex/sim-recon/ccdb_pro.sqlite setenv JANA_CALIB_URL ${CCDB_CONNECTION} setenv JANA_RESOURCE_DIR /gluex/sim-recon/resources # Read geometry from ccdb database by default # setenv JANA_GEOMETRY_URL ccdb:///GEOMETRY/main_HDDS.xml setenv JANA_GEOMETRY_URL ccdb:///GEOMETRY/cpp_HDDS.xml # possible to switch to sqlite file if MYSQL mirror is down #setenv JANA_CALIB_URL sqlite:////gluex/sim-recon/ccdb_pro.sqlite #setenv CCDB_CONNECTION sqlite:////gluex/sim-recon/ccdb_pro.sqlite # Python 2.7 is needed for ccdb #set pythonroot=/gapps/python/2.7.6 #setenv PATH ${pythonroot}/bin:$PATH #setenv LD_LIBRARY_PATH ${pythonroot}/lib:$LD_LIBRARY_PATH # ROOT setup. # If offline setup does not set ROOT variables, # they need to be set here. This piece will try to use PRO version. if( ( (! $?ROOTSYS) ) && ( $?BMS_OSNAME ) ) then if( -e /gapps/root/${BMS_OSNAME}/PRO/bin/thisroot.csh ) then source /gapps/root/${BMS_OSNAME}/PRO/bin/thisroot.csh /gapps/root/${BMS_OSNAME}/PRO/ endif endif #--------------------------------------------------------- # CODA # Set CODA release, setup package roots and paths # setenv CODA /gluondaqfs/gluex/coda/3.10 #setenv CODA /gluondaqfs/gluex/coda/3.09 #setenv CODA /gluex/coda/3.08 #setenv CODA /gluex/coda/3.07 #setenv CODA /gluex/coda/3.06d #setenv CODA /gluex/coda/3.06 #setenv CODA /gluex/coda/3.05 #setenv CODA /gluex/coda/3.03 setenv CODA_ARCH $CODA/`uname -s`-`uname -p` if ( -e $CODA/.setup ) source $CODA/.setup setenv CMSGROOT $CODA_ARCH setenv EVIOROOT $CODA_ARCH setenv ETROOT $CODA_ARCH setenv CODAOBJECTROOT $CODA_ARCH setenv LINUXVME_INC $CODA/linuxvme/include setenv LINUXVME_LIB $CODA/linuxvme/lib setenv PATH $CODA_ARCH/bin:$PATH setenv LD_LIBRARY_PATH $CODA_ARCH/lib:${LD_LIBRARY_PATH} setenv LD_LIBRARY_PATH ${LINUXVME_LIB}:${LD_LIBRARY_PATH} # Double quotes required here (see svn log -r12581) setenv CLASSPATH "$CODA/common/jar/*:${CLASSPATH}" # Source account-specific online_setup.cshrc file # NOTE: The CDAQ_HOME variable will determine where # The DAQ_HOME and several other variables based on # it are set. THIS CHOOSES WHETHER WE USE THE /gluonfs1 # OR /gluondaqfs VERSION OF THE DAQ FILES! #setenv CDAQ_HOME ${HOME}/CDAQ setenv CDAQ_HOME /gluondaqfs/hdops/CDAQ set online_setup=${CDAQ_HOME}/online_setup.cshrc if ( -e $online_setup ) source $online_setup if ( $?DAQ_HOME ) then setenv PYTHONPATH ${DAQ_HOME}/tools/pymods:${PYTHONPATH} endif ###setenv COOL_HOME /gluex/COOL #--------------------------------------------------------- # Online Monitoring setenv HALLD_ONLINE_RELEASE /gluex/builds/devel setenv PATH $HALLD_ONLINE_RELEASE/${BMS_OSNAME}/bin:${PATH} setenv LD_LIBRARY_PATH $HALLD_ONLINE_RELEASE/${BMS_OSNAME}/lib:${LD_LIBRARY_PATH} setenv JANA_PLUGIN_PATH $HALLD_ONLINE_RELEASE/${BMS_OSNAME}/plugins:${JANA_PLUGIN_PATH} # Google Protocol Buffers setenv PROTOBUF_ROOT /gapps/protobuf/protobuf-3.5.1/${BMS_OSNAME} setenv PATH $PROTOBUF_ROOT/bin:${PATH} # ZeroMQ setenv ZEROMQ_ROOT /gapps/zeroMQ/zeromq-4.2.3/${BMS_OSNAME} setenv PATH $ZEROMQ_ROOT/bin:${PATH} setenv LD_LIBRARY_PATH $ZEROMQ_ROOT/lib:${LD_LIBRARY_PATH} # xMsg setenv XMSG_ROOT /gapps/xMsg/v1.1/${BMS_OSNAME} setenv PATH $XMSG_ROOT/bin:${PATH} setenv LD_LIBRARY_PATH $XMSG_ROOT/lib:${LD_LIBRARY_PATH} # Tensorflow-lite setenv TENSORFLOW_LITE /gapps/tensorflow/tflite_v2.8.0 setenv LD_LIBRARY_PATH ${TENSORFLOW_LITE}/lib:${LD_LIBRARY_PATH} # RootSpy setenv ROOTSPY $HALLD_ONLINE_RELEASE/packages/RootSpy/${BMS_OSNAME} setenv PATH ${ROOTSPY}/bin:${PATH} setenv JANA_PLUGIN_PATH ${ROOTSPY}/plugins:${JANA_PLUGIN_PATH} #setenv ROOTSPY_UDL "cMsg://172.19.5.46/cMsg/rootspy?regime=high" setenv ROOTSPY_UDL "xMsg://gluon49" setenv ROOTSPY_REF_DIR /gluex/data/REFERENCE_PLOTS setenv HDTSDB_HOST halldweb setenv HDTSDB_PORT 8086 setenv HDTSDB_DB RootSpy # JANA cMsg control (note...shouldn't hard-code cMsg server address) setenv JANACTL_UDL cMsg://gluon49/cMsg/janactl # hd_utilities setenv HD_UTILITIES /home/hdops/hd_utilities #--------------------------------------------------------- # Hall D trigger setup setenv PATH /gluex/devel/scripts:/gluex/devel/bin:$PATH #--------------------------------------------------------- # Hall-D Configuration files # Directory where configuration files are kept. This is here for ODC2013 for now. setenv HDCONFIG $HALLD_ONLINE_RELEASE/config #--------------------------------------------------------- # Hall-D log files # Files here should only be written by the hdops account setenv HDLOG /gluex/log #--------------------------------------------------------- # Add the current directory to the leftmost position in PATH setenv PATH ".:${PATH}" #--------------------------------------------------------- # A couple of convenient aliases alias ss 'svn status | grep -v "?"' alias sdu 'du -sk * | sort -n' alias jevioview 'java org/jlab/coda/eventViewer/EventTreeFrame' alias nedit '/apps/bin/nedit' alias active 'cd /gluex/raid/rawdata/active/$RUN_PERIOD/rawdata' alias volatile 'cd /gluex/raid/rawdata/volatile/$RUN_PERIOD/rawdata' alias print_blank_run_tracking_forms "pushd /home/hdops/hd_utilities/run_tracking_form > /dev/null; print_run_tracking_forms ; popd > /dev/null" #--------------------------------------------------------- # Cleanup some path environment variables to remove duplicate # and empty entries filter_path PATH filter_path LD_LIBRARY_PATH filter_path CLASSPATH filter_path PYTHONPATH filter_path JANA_PLUGIN_PATH