Stats of processed input files as CSV or JSON, and of uploaded output files as CSV or JSON (up to 10000 files included)
File reset events, by site
Site
Allocated
Outputting
UK_RAL-PPD
23
1
UK_Manchester
4
5
CERN
1
0
NL_NIKHEF
1
0
Jobscript
#!/bin/bash
:<<'EOF'
Use this jobscript to create files from the full sim/reco chain
and put the output in the usertests namespace (MetaCat)
Use this script by doing
source fdvd.sh
(use source fdvd_test.sh first to test it locally - also a good idea to remove the folder created in /tmp afterwards).
This example uses a dunesw distribution (v09_91_04d01) but needs a custom fhicl file that is provided via a tar file.
I recommend sending the tar to cvmfs in advance, just to avoid any problem, with this command
INPUT_TAR_DIR_LOCAL=`justin-cvmfs-upload myfcls.tar`
The following optional environment variables can be set when creating the
workflow/stage: FCL_FILE, NUM_EVENTS, DUNE_VERSION, DUNE_QUALIFIER
EOF
# fcl file and DUNE software version/qualifier to be used
FCL_FILE=${FCL_FILE:-$INPUT_TAR_DIR_LOCAL/runGenerateSimulatedEvents.fcl}
DUNE_VERSION=${DUNE_VERSION:-v10_07_00d00}
DUNE_QUALIFIER=${DUNE_QUALIFIER:-e26:prof}
export FHICL_FILE_PATH=${INPUT_TAR_DIR_LOCAL}:${FHICL_FILE_PATH}
export FW_SEARCH_PATH=${INPUT_TAR_DIR_LOCAL}:$FW_SEARCH_PATH
# number of events to process from the input file
if [ "$NUM_EVENTS" != "" ] ; then
events_option="-n $NUM_EVENTS"
fi
# First get an unprocessed file from this stage
did_pfn_rse=`$JUSTIN_PATH/justin-get-file`
if [ "$did_pfn_rse" = "" ] ; then
echo "Nothing to process - exit jobscript"
exit 0
fi
# Keep a record of all input DIDs, for pdjson2meta file -> DID mapping
echo "$did_pfn_rse" | cut -f1 -d' ' >>all-input-dids.txt
# pfn is also needed when creating justin-processed-pfns.txt
pfn=`echo $did_pfn_rse | cut -f2 -d' '`
echo "Input PFN = $pfn"
# Setup DUNE environment
source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup dunesw "$DUNE_VERSION" -q "$DUNE_QUALIFIER"
# Construct outFile from input $pfn
now=$(date -u +"%Y-%m-%dT_%H%M%SZ")
Ffname=`echo $pfn | awk -F/ '{print $NF}'`
fname=`echo $Ffname | awk -F. '{print $1}'`
outFile=pdhd_g4_Stage2_${now}.root
outHistFile=pdhd_g4_Stage2_hist_${now}.root
campaign="justIN.w${JUSTIN_WORKFLOW_ID}s"
# Here is where the LArSoft command is call it (
(
# Do the scary preload stuff in a subshell!
export LD_PRELOAD=${XROOTD_LIB}/libXrdPosixPreload.so
echo "$LD_PRELOAD"
lar -c $FCL_FILE $events_option -o pdhd_gen.root "$pfn"> ${fname}_pdhd_gen${now}.log 2>&1 \
&& lar -c $INPUT_TAR_DIR_LOCAL/runG4Stage1.fcl -s pdhd_gen.root -o pdhd_g4_Stage1.root > ${fname}_pdhd_g4_Stage1${now}.log 2>&1 \
&& lar -c $INPUT_TAR_DIR_LOCAL/runG4Stage2.fcl -s pdhd_g4_Stage1.root -o $outFile > ${fname}_pdhd_g4_Stage2_${now}.log 2>&1
)
echo '=== Start last 100 lines of lar log file ==='
tail -100 ${fname}_pdhd_g4_Stage2_${now}.log
echo '=== End last 100 lines of lar log file ==='
# Subshell exits with exit code of last command
larExit=$?
echo "lar exit code $larExit"
if [ $larExit -eq 0 ] ; then
# Success !
echo "$pfn" > justin-processed-pfns.txt
jobscriptExit=0
else
# Oh :(
jobscriptExit=1
fi
# Create compressed tar file with all log files
#tar zcf `echo "$JUSTIN_JOBSUB_ID.logs.tgz" | sed 's/@/_/g'` *.log
exit $jobscriptExit
justIN time: 2025-08-14 17:46:17 UTC justIN version: 01.03.02