Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-04 08:11:55

0001 #!/bin/bash
0002 #
0003 #       use CreatDstList.pl to search for all productions that have produced files for run 53877
0004 #               bill llope 20250810
0005 #
0006 leading_zero_fill () {
0007     printf "%0$1d\\n" "$2"
0008 }
0009 DOIT() {
0010         prodname=$1
0011         DST=$2
0012         OUTDIR=$3
0013         dst=`echo "${DST,,}"`           # make lowercase
0014         if [ -e $dst-00053877.list ]; then
0015           rm -fq $dst-00053877.list
0016         fi
0017         myCreateDstList.pl --tag $prodname --run 53877 $DST
0018         if [ -e $dst-00053877.list ]; then
0019                 mv $dst-00053877.list $OUTDIR/prodlist/${prodname}_${DST}_53877.list
0020                 numl=$(wc -l < $OUTDIR/prodlist/${prodname}_${DST}_53877.list)
0021                 printf "%19s\t%-16s\t%4d\n" $prodname $DST $numl
0022         fi      
0023 }
0024 
0025 OUTPUTDIR="./LISTS"
0026 mkdir -p $OUTPUTDIR/prodlist/
0027 datestr=$(date '+%Y%m%d')
0028 
0029 CreateDstList.pl --printtags --dataset run2pp > $OUTPUTDIR/catprod.txt
0030 
0031 #----- now loop over productions and look for 53877 root files of any dst type
0032 echo Starting...
0033 while IFS= read -r prodname; do
0034         #echo Start $prodname ------------------------------
0035         #
0036         DOIT $prodname "DST_TRKR_CLUSTER" $OUTPUTDIR
0037         DOIT $prodname "DST_TRKR_SEED" $OUTPUTDIR
0038         DOIT $prodname "DST_TRKR_TRACKS" $OUTPUTDIR
0039         DOIT $prodname "DST_CALO" $OUTPUTDIR
0040         #
0041 done < $OUTPUTDIR/catprod.txt
0042  
0043 exit
0044