4 declare -
r SCRIPTVERSION=
"1.0"
7 declare -
r SubdirName=
'overburden'
8 declare -
r DropInConfigurationName=
'use_nooverburden_geometry_icarus.fcl'
11 # ------------------------------------------------------------------------------
16 Usage: ${
SCRIPTNAME} OriginalFHiCLfile NewFHiCLname
18 The
new file includes OriginalFHiCLfile
and it is placed
in the \`${SubdirName}\` subdirectory
20 included
in OriginalFHiCLfile).
27 function printUserName() {
32 # try to get the information from GIT
34 [[ -d
".git" ]] && GitDirectory=
"$(pwd)"
35 [[ -d
"${MRB_SOURCE}/icaruscode/.git" ]] && GitDirectory=
"${MRB_SOURCE}/icaruscode"
36 if [[ -d
"$GitDirectory" ]]; then
37 UserName=
"$(git -C "$GitDirectory
" config --get user.name 2> /dev/null)"
38 Email=
"$(git -C "$GitDirectory
" config --get user.email 2> /dev/null)"
41 # fallback: ask the operating system
42 [[ -
z "$UserName" ]] && UserName=
"$USER"
43 [[ -
z "$UserName" ]] && UserName=
"$(whoami)"
45 echo
"${UserName}${Email:+" (${Email})
"}"
49 # ------------------------------------------------------------------------------
51 if [[ $# -lt 2 ]]; then
57 declare -
r DestName=
"$(basename "${2%.fcl}.fcl
")"
59 declare -
r SourceDir=
"$(dirname "$SourceFile
")"
60 declare -
r SourceName=
"$(basename "${SourceFile%.fcl}.fcl
")"
61 declare -
r DestDir=
"${SourceDir%/}/${SubdirName}"
62 declare -
r DestFile=
"${DestDir:+"${DestDir%/}/
"}${DestName}"
64 if [[
"$SourceName" ==
"$DestName" ]]; then
65 echo
"Cowardly refusing to create a new FHiCL file with the same name as the original one ('${SourceName}')." >&2
69 echo
"'${SourceName}' => '${DestName}'"
71 [[ -d
"$DestDir" ]] ||
mkdir "$DestDir"
73 cat <<EOF >
"$DestFile"
76 # Purpose: No-overburden version of \`${SourceName}\`.
77 # Author: $(printUserName)
80 # This file was automatically generated by ${SCRIPTNAME} version ${SCRIPTVERSION}.
83 #include "${SourceName}"
85 # turn to no-overburden geometry:
86 #include "${DropInConfigurationName}"
process_name opflash particleana ie ie ie z
then help exit fi declare r SourceFile
then echo Sam station was not specified(use option--sam_station)." exit 1 fi if [ x$SAM_GROUP
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
then echo Cowardly refusing to create a new FHiCL file with the same name as the original one('${SourceName}')." >&2 exit 1 fi echo "'$
then echo Work directory not specified exit fi echo Work directory
esac voms proxy info all source grid fermiapp products common etc setups sh source cvmfs oasis opensciencegrid org fermilab products larsoft setup setup ifdhc echo Here is the your environment in this job
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in