diff --git a/run2auau/CaloProduction/runy2calib.sh b/run2auau/CaloProduction/runy2calib.sh index a46dd74..1837d55 100644 --- a/run2auau/CaloProduction/runy2calib.sh +++ b/run2auau/CaloProduction/runy2calib.sh @@ -35,6 +35,7 @@ trap sighandler SIGTERM SIGINT SIGKILL export USER="$(id -u -n)" export LOGNAME=${USER} export HOME=/sphenix/u/${USER} +echo "cupsid=${cupsid}" hostname source /opt/sphenix/core/bin/sphenix_setup.sh -n ${7} @@ -96,7 +97,7 @@ status_f4a=0 for infile_ in ${inputs[@]}; do infile=$( basename ${infile_} ) cp -v ${infile_} . - outfile=${infile/CALOFITTING/CALO} + outfile=${logbase}.root outhist=${outfile/DST_CALO/HIST_CALOQA} root.exe -q -b Fun4All_Year2_Calib.C\(${nevents},\"${infile}\",\"${outfile}\",\"${outhist}\",\"${dbtag}\"\); status_f4a=$? diff --git a/run2auau/DST_TRIGGERED_EVENT_run2auau_ana451_2024p009.yaml b/run2auau/DST_TRIGGERED_EVENT_run2auau_ana451_2024p009.yaml new file mode 100644 index 0000000..d1623fb --- /dev/null +++ b/run2auau/DST_TRIGGERED_EVENT_run2auau_ana451_2024p009.yaml @@ -0,0 +1,350 @@ +# +# Testbed for file ranges +# +DST_TRIGGERED_EVENT_run2auau_ana451_2024p009: + params: + name: DST_TRIGGERED_EVENT_run2auau + build: ana.451 + build_name: ana451 + dbtag: 2024p009 + logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag) + script : run.sh + payload : ./ProdFlow/run2auau/TriggerProduction/ + mem : 2048M + neventsper: 5000 + noverflow: 1000 + rsync : "ProdFlow/run2auau/TriggerProduction/*,cups.py,bachi.py,odbc.ini" + + + + # + # input query: + # + # This builds a list of all runs known to the file catalog "datasets" table. + # The query should return: + # 1. The source of the information (formatted as database name/table name) + # 2. The run number + # 3. A sequence number (a placeholder fixed at zero for event builders) + # 4. And a space-separated list of logical filenames + # + # The {*_condition} parameters (run, seg, limit) are substituted by kaedama + # based on (optional) command line options. + # + # For now, require GL1 files... + # + input: + db: daqdb + direct_path: /sphenix/lustre01/sphnxpro/physics/*/*/ + query: |- + with config as ( + select + {neventsper} as nevents, + {noverflow} as noverflow + ), + + fullevents as ( + select runnumber,max(lastevent) as lastevent + from filelist, config + where (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) + + {run_condition} and runnumber>54748 + + group by runnumber + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 + + order by runnumber + ), + + fulljobs as ( + select + 'daqdb/filelist' as source , + runnumber , + 0 as segment , + string_agg( split_part(filename,'/',-1), ' ' order by filename) as files , + string_agg( firstevent::text || ':' || lastevent::text || ':' || split_part(filename,'/',-1), ' ' order by filename ) as fileranges + + from + filelist,config + where + ( + (filename similar to '/bbox%/%emcal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%HCal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%LL1%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) or + (filename similar to '/bbox%/%mbd%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%ZDC%(beam|physics)%.prdf' and lastevent>2 ) + + ) + + {run_condition} + + and runnumber>53880 + + group by runnumber + + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 and + ( + sum( case when filename similar to '/bbox%/%emcal%(beam|physics)%' then 1 else 0 end )>0 or + sum( case when filename similar to '/bbox%/%HCal%(beam|physics)%' then 1 else 0 end )>0 + ) + + order by runnumber + ), + + fullrun as ( + + select fulljobs.*,fullevents.lastevent from fulljobs join fullevents on fulljobs.runnumber=fullevents.runnumber + + ), + + unsegmented as ( + + select *,'full run' as runtype from fullrun where true + ), + + segmented as ( + + select source, + runnumber, + generate_series(0,unsegmented.lastevent/config.nevents) as segment, + files, + fileranges, + lastevent, + nevents + + from unsegmented,config + + ), + + segmentedA as ( + + select source, + runnumber, + segment, + files, + fileranges, + lastevent, + segment*config.nevents as myfirstevent, + least( (segment+1)*config.nevents - 1, lastevent ) as mylastevent, + config.nevents + + from segmented,config + + ), + + + segmentedB as ( + + select *, + mylastevent-myfirstevent as nprocessing, + lastevent-mylastevent-1 as nremaining from segmentedA,config -- b/c we count from zero + + ), + + segmentedC as ( + + + select source, runnumber, + segment, + files, + fileranges, + myfirstevent, + ( + select + case + when nprocessing=config.nevents then mylastevent + when nremaining>=config.noverflow then mylastevent + when nremaining53880 + + order by runnumber desc, segment desc; + + + # + # Again I note the need to ensure that the arguments are properly specified given the + # definition of the payload script. + # + job: + executable : "{payload}/run.sh" + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync} $(firstevent) $(lastevent) $(runs_last_event)" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + request_xferslots: '1' + + + + + +# Downstream products +DST_CALOFITTING_run2auau_ana451_2024p009: + params: + name: DST_CALOFITTING_run2auau + nevents: 5000 + build: ana.451 + build_name: ana451 + dbtag: 2024p009 + logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag) + script : runy2fitting.sh + payload : ./ProdFlow/run2auau/CaloProduction/ + mem : 1024MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + filename like 'DST_TRIGGERED_EVENT_run2auau_ana451_2024p009%' + {run_condition} + + and runnumber>53880 + + {limit_condition} + + ; + job: + executable : "{payload}/runy2fitting.sh" + arguments : "{nevents} {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + +# Downstream products +DST_CALO_run2auau_new_2024p007: + params: + name: DST_CALO_run2auau + build: new + build_name: new + dbtag: 2024p007 + logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag) + script : runy2calib.sh + payload : ./ProdFlow/run2auau/CaloProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + filename like 'DST_CALOFITTING_run2auau_new_2024p007%' + {run_condition} + + and runnumber>53880 + + {limit_condition} + + ; + job: + executable : "{payload}/runy2calib.sh" + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + +# Downstream products +DST_JETS_run2auau_new_2024p007: + params: + name: DST_JETS_run2auau + build: new + build_name: new + dbtag: 2024p007 + logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag) + script : runjets.sh + payload : ./ProdFlow/run2auau/JetProduction/ + mem : 2096MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/JetProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + 'X' as fileranges + from + datasets + where + filename like 'DST_CALO_run2auau_new_2024p007%' + {run_condition} + and runnumber>53880 + + {limit_condition} + + ; + job: + executable : "{payload}/runjets.sh" + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + diff --git a/run2auau/DST_TRIGGERED_EVENT_run2auau_ana462_2024p010.yaml b/run2auau/DST_TRIGGERED_EVENT_run2auau_ana462_2024p010.yaml new file mode 100644 index 0000000..05c97f6 --- /dev/null +++ b/run2auau/DST_TRIGGERED_EVENT_run2auau_ana462_2024p010.yaml @@ -0,0 +1,399 @@ +# Downstream products +DST_CALO_run2auau_new_2024p010: + params: + name: DST_CALO_run2auau + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2calib.sh + payload : ./ProdFlow/run2auau/CaloProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana450_2024p009' and dsttype='DST_CALOFITTING_run2auau' + {run_condition} + + and runnumber in ( 54909, 54911, 54912, 54913, 54914, 54915, 54916, 54918, 54920 ) + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + +# Downstream products +DST_JETS_run2auau_new_2024p010: + params: + name: DST_JETS_run2auau + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runjets.sh + payload : ./ProdFlow/run2auau/JetProduction/ + mem : 2096MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/JetProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + 'X' as fileranges + from + datasets + where + filename like 'DST_CALO_run2auau_ana462_2024p010%' + {run_condition} + and runnumber>53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + +# Downstream products +DST_JETCALO_run2auau_ana462_2024p010: + params: + name: DST_JETCALO_run2auau + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version: 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2jetskim.sh + payload : ./ProdFlow/run2auau/JetProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/JetProduction/*,cups.py,bachi.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana446_2024p007' and dsttype='DST_CALOFITTING_run2auau' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + + +# ---------------------------------------------------------------------------------------------------------------------------------------------- +# Disable the DST_TRIGGERED_EVENT rule +XXX_TRIGGERED_EVENT_run2auau_ana462_2024p010: + params: + name: DST_TRIGGERED_EVENT_run2auau + build: xxxxxxx + build_name: xxxxxx + dbtag: xxxxxxxx + version : x + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : run.sh + payload : ./ProdFlow/run2auau/TriggerProduction/ + mem : 2048M + neventsper: 5000 + noverflow: 1000 + rsync : "-----" +# rsync : "ProdFlow/run2auau/TriggerProduction/*,cups.py,bachi.py,odbc.ini" + + + # + # input query: + # + # This builds a list of all runs known to the file catalog "datasets" table. + # The query should return: + # 1. The source of the information (formatted as database name/table name) + # 2. The run number + # 3. A sequence number (a placeholder fixed at zero for event builders) + # 4. And a space-separated list of logical filenames + # + # The {*_condition} parameters (run, seg, limit) are substituted by kaedama + # based on (optional) command line options. + # + # For now, require GL1 files... + # + input: + db: daqdb + direct_path: /sphenix/lustre01/sphnxpro/physics/*/*/ + query: |- + with config as ( + select + {neventsper} as nevents, + {noverflow} as noverflow + ), + + fullevents as ( + select runnumber,max(lastevent) as lastevent + from filelist, config + where (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) + + {run_condition} and runnumber>54748 + + group by runnumber + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 + + order by runnumber + ), + + fulljobs as ( + select + 'daqdb/filelist' as source , + runnumber , + 0 as segment , + string_agg( split_part(filename,'/',-1), ' ' order by filename) as files , + string_agg( firstevent::text || ':' || lastevent::text || ':' || split_part(filename,'/',-1), ' ' order by filename ) as fileranges + + from + filelist,config + where + ( + (filename similar to '/bbox%/%emcal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%HCal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%LL1%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) or + (filename similar to '/bbox%/%mbd%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%ZDC%(beam|physics)%.prdf' and lastevent>2 ) + + ) + + {run_condition} + + and runnumber>53880 + + group by runnumber + + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 and + ( + sum( case when filename similar to '/bbox%/%emcal%(beam|physics)%' then 1 else 0 end )>0 or + sum( case when filename similar to '/bbox%/%HCal%(beam|physics)%' then 1 else 0 end )>0 + ) + + order by runnumber + ), + + fullrun as ( + + select fulljobs.*,fullevents.lastevent from fulljobs join fullevents on fulljobs.runnumber=fullevents.runnumber + + ), + + unsegmented as ( + + select *,'full run' as runtype from fullrun where true + ), + + segmented as ( + + select source, + runnumber, + generate_series(0,unsegmented.lastevent/config.nevents) as segment, + files, + fileranges, + lastevent, + nevents + + from unsegmented,config + + ), + + segmentedA as ( + + select source, + runnumber, + segment, + files, + fileranges, + lastevent, + segment*config.nevents as myfirstevent, + least( (segment+1)*config.nevents - 1, lastevent ) as mylastevent, + config.nevents + + from segmented,config + + ), + + + segmentedB as ( + + select *, + mylastevent-myfirstevent as nprocessing, + lastevent-mylastevent-1 as nremaining from segmentedA,config -- b/c we count from zero + + ), + + segmentedC as ( + + + select source, runnumber, + segment, + files, + fileranges, + myfirstevent, + ( + select + case + when nprocessing=config.nevents then mylastevent + when nremaining>=config.noverflow then mylastevent + when nremaining53880 + + order by runnumber desc, segment desc; + + + # + # Again I note the need to ensure that the arguments are properly specified given the + # definition of the payload script. + # + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync} $(firstevent) $(lastevent) $(runs_last_event) {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + request_xferslots: '1' + + + + +# Downstream products +XXX_CALOFITTING_run2auau_ana462_2024p010: + params: + name: DST_CALOFITTING_run2auau + nevents: 5000 + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2fitting.sh + payload : ./ProdFlow/run2auau/CaloProduction/ + mem : 1024MB + neventsper: 50000 + rsync : "./ProdFlow/run2auau/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + filename like 'DST_TRIGGERED_EVENT_run2auau_ana451_2024p009%' + {run_condition} + + and runnumber>53880 + + {limit_condition} + + ; + job: + arguments : "{nevents} {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + diff --git a/run2pp/CaloProduction/runy2calib.sh b/run2pp/CaloProduction/runy2calib.sh index 2cb9730..5c67859 100644 --- a/run2pp/CaloProduction/runy2calib.sh +++ b/run2pp/CaloProduction/runy2calib.sh @@ -46,11 +46,6 @@ for i in ${payload[@]}; do cp --verbose ${subdir}/${i} . done -if [[ "${inputs}" == *"dbinput"* ]]; then - echo "Getting inputs via cups. ranges is not set." - inputs=( $(./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs) ) -fi - if [ -e odbc.ini ]; then echo export ODBCINI=./odbc.ini export ODBCINI=./odbc.ini @@ -58,6 +53,11 @@ else echo No odbc.ini file detected. Using system odbc.ini fi +if [[ "${inputs}" == *"dbinput"* ]]; then + echo "Getting inputs via cups. ranges is not set." + inputs=( $(./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs) ) +fi + # Debugging info ./cups.py -r ${runnumber} -s ${segment} -d ${outbase} info @@ -94,7 +94,7 @@ status_f4a=0 for infile_ in ${inputs[@]}; do infile=$( basename ${infile_} ) cp -v ${infile_} . - outfile=${infile/CALOFITTING/CALO} + outfile=${logbase}.root outhist=${outfile/DST_CALO/HIST_CALOQA} root.exe -q -b Fun4All_Year2_Calib.C\(${nevents},\"${infile}\",\"${outfile}\",\"${outhist}\",\"${dbtag}\"\); status_f4a=$? diff --git a/run2pp/CaloProduction/runy2fitting.sh b/run2pp/CaloProduction/runy2fitting.sh index 9921d1b..d288de1 100644 --- a/run2pp/CaloProduction/runy2fitting.sh +++ b/run2pp/CaloProduction/runy2fitting.sh @@ -125,8 +125,7 @@ echo ./cups.py -v -r ${runnumber} -s ${segment} -d ${outbase} finished -e ${stat echo "bdee bdee bdee, That's All Folks!" -} | tee ${logdir#file:/}/${logbase}.out -#> ${logdir#file:/}/${logbase}.out 2> ${logdir#file:/}/${logbase}.err +} > ${logdir#file:/}/${logbase}.out 2> ${logdir#file:/}/${logbase}.err if [ -e cups.stat ]; then cp cups.stat ${logdir#file:/}/${logbase}.dbstat diff --git a/run2pp/DST_CALOFITTING_run2pp_ana468_2024p012.yaml b/run2pp/DST_CALOFITTING_run2pp_ana468_2024p012.yaml new file mode 100644 index 0000000..c219c08 --- /dev/null +++ b/run2pp/DST_CALOFITTING_run2pp_ana468_2024p012.yaml @@ -0,0 +1,194 @@ +# +#FileCatalog=# select dataset,dsttype,count(filename),sum(events) from datasets where dsttype='DST_CALOFITTING_run2pp' group by dataset,dsttype; +# dataset | dsttype | count | sum +#-----------------+------------------------+--------+------------- +# ana451_2024p009 | DST_CALOFITTING_run2pp | 50343 | 4976087047 +# ana446_2024p007 | DST_CALOFITTING_run2pp | 148286 | 14632177735 +#(2 rows) + +# Downstream products +DST_CALO_run2pp_new_2024p010: + params: + name: DST_CALO_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 2 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2calib.sh + payload : ./ProdFlow/run2pp/CaloProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana472_2024p010_v001' and dsttype='DST_CALOFITTING_run2pp' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + +# Downstream products +DST_JETS_run2pp_new_2024p010: + params: + name: DST_JETS_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runjets.sh + payload : ./ProdFlow/run2pp/JetProduction/ + mem : 2096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/JetProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + 'X' as fileranges + from + datasets + where + filename like 'DST_CALO_run2pp_ana462_2024p010%' + {run_condition} + and runnumber>53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + +# Downstream products +DST_JETCALO_run2pp_ana462_2024p010: + params: + name: DST_JETCALO_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version: 2 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2jetskim.sh + payload : ./ProdFlow/run2pp/JetProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/JetProduction/*,cups.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana462_2024p010_v001' and dsttype='DST_CALOFITTING_run2pp' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + + +# Downstream products +DST_CALOFITTING_run2pp_ana468_2024p012: + params: + name: DST_CALOFITTING_run2pp + nevents: 0 + build: ana.468 + build_name: ana468 + dbtag: 2024p012 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2fitting.sh + payload : ./ProdFlow/run2pp/CaloProduction/ + mem : 1024MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/CaloProduction/*,cups.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + filename like 'DST_TRIGGERED_EVENT_run2pp_ana462_nocdbtag%' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "{nevents} {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + diff --git a/run2pp/DST_TRIGGERED_EVENT_run2pp_ana462_2024p010.yaml b/run2pp/DST_TRIGGERED_EVENT_run2pp_ana462_2024p010.yaml new file mode 100644 index 0000000..04efc04 --- /dev/null +++ b/run2pp/DST_TRIGGERED_EVENT_run2pp_ana462_2024p010.yaml @@ -0,0 +1,402 @@ +# +#FileCatalog=# select dataset,dsttype,count(filename),sum(events) from datasets where dsttype='DST_CALOFITTING_run2pp' group by dataset,dsttype; +# dataset | dsttype | count | sum +#-----------------+------------------------+--------+------------- +# ana451_2024p009 | DST_CALOFITTING_run2pp | 50343 | 4976087047 +# ana446_2024p007 | DST_CALOFITTING_run2pp | 148286 | 14632177735 +#(2 rows) + +# Downstream products +DST_CALO_run2pp_new_2024p010: + params: + name: DST_CALO_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 2 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2calib.sh + payload : ./ProdFlow/run2pp/CaloProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/CaloProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana472_2024p010_v001' and dsttype='DST_CALOFITTING_run2pp' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + +# Downstream products +DST_JETS_run2pp_new_2024p010: + params: + name: DST_JETS_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runjets.sh + payload : ./ProdFlow/run2pp/JetProduction/ + mem : 2096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/JetProduction/*,cups.py,bachi.py,odbc.ini" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + 'X' as fileranges + from + datasets + where + filename like 'DST_CALO_run2pp_ana462_2024p010%' + {run_condition} + and runnumber>53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + +# Downstream products +DST_JETCALO_run2pp_ana462_2024p010: + params: + name: DST_JETCALO_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version: 2 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2jetskim.sh + payload : ./ProdFlow/run2pp/JetProduction/ + mem : 4096MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/JetProduction/*,cups.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + dataset='ana462_2024p010_v001' and dsttype='DST_CALOFITTING_run2pp' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + + + +# ---------------------------------------------------------------------------------------------------------------------------------------------- +# Disable the DST_TRIGGERED_EVENT rule +DST_TRIGGERED_EVENT_run2pp_ana462_2024p010: + params: + name: DST_TRIGGERED_EVENT_run2pp + build: ana.462 + build_name: ana462 + dbtag: nocdbtag + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : run.sh + payload : ./ProdFlow/run2pp/TriggerProduction/ + mem : 2048M + neventsper: 50000 + noverflow: 10000 + rsync : "ProdFlow/run2pp/TriggerProduction/*,cups.py" + + + # + # input query: + # + # This builds a list of all runs known to the file catalog "datasets" table. + # The query should return: + # 1. The source of the information (formatted as database name/table name) + # 2. The run number + # 3. A sequence number (a placeholder fixed at zero for event builders) + # 4. And a space-separated list of logical filenames + # + # The {*_condition} parameters (run, seg, limit) are substituted by kaedama + # based on (optional) command line options. + # + # For now, require GL1 files... + # + input: + db: raw + direct_path: /sphenix/lustre01/sphnxpro/physics/*/*/ + query: |- + with config as ( + select + {neventsper} as nevents, + {noverflow} as noverflow + ), + + fullevents as ( + select runnumber,max(lastevent) as lastevent + from filelist, config + where (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) + + {run_condition} and runnumber>46000 + + group by runnumber + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 + + order by runnumber + ), + + fulljobs as ( + select + 'daqdb/filelist' as source , + runnumber , + 0 as segment , + string_agg( split_part(filename,'/',-1), ' ' order by filename) as files , + string_agg( firstevent::text || ':' || lastevent::text || ':' || split_part(filename,'/',-1), ' ' order by filename ) as fileranges + + from + filelist,config + where + ( + (filename similar to '/bbox%/%emcal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%HCal%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%LL1%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) or + (filename similar to '/bbox%/%mbd%(beam|physics)%.prdf' and lastevent>2 ) or + (filename similar to '/bbox%/%ZDC%(beam|physics)%.prdf' and lastevent>2 ) + + ) + + {run_condition} + + and runnumber<=53880 + + group by runnumber + + having + every(transferred_to_sdcc) and + max(lastevent)>1000 and + sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 and + ( + sum( case when filename similar to '/bbox%/%emcal%(beam|physics)%' then 1 else 0 end )>0 or + sum( case when filename similar to '/bbox%/%HCal%(beam|physics)%' then 1 else 0 end )>0 + ) + + order by runnumber + ), + + fullrun as ( + + select fulljobs.*,fullevents.lastevent from fulljobs join fullevents on fulljobs.runnumber=fullevents.runnumber + + ), + + unsegmented as ( + + select *,'full run' as runtype from fullrun where true + ), + + segmented as ( + + select source, + runnumber, + generate_series(0,unsegmented.lastevent/config.nevents) as segment, + files, + fileranges, + lastevent, + nevents + + from unsegmented,config + + ), + + segmentedA as ( + + select source, + runnumber, + segment, + files, + fileranges, + lastevent, + segment*config.nevents as myfirstevent, + least( (segment+1)*config.nevents - 1, lastevent ) as mylastevent, + config.nevents + + from segmented,config + + ), + + + segmentedB as ( + + select *, + mylastevent-myfirstevent as nprocessing, + lastevent-mylastevent-1 as nremaining from segmentedA,config -- b/c we count from zero + + ), + + segmentedC as ( + + + select source, runnumber, + segment, + files, + fileranges, + myfirstevent, + ( + select + case + when nprocessing=config.nevents then mylastevent + when nremaining>=config.noverflow then mylastevent + when nremaining(3*24*3600)' + + + + +# Downstream products +DST_CALOFITTING_run2pp_ana462_2024p010: + params: + name: DST_CALOFITTING_run2pp + nevents: 0 + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : $(name)_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : $(name)_$(build)_$(tag)_$(version) + script : runy2fitting.sh + payload : ./ProdFlow/run2pp/CaloProduction/ + mem : 1024MB + neventsper: 50000 + rsync : "./ProdFlow/run2pp/CaloProduction/*,cups.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + segment , + filename as files , + filename || ':' || 0 || ':' || events as fileranges + from + datasets + where + filename like 'DST_TRIGGERED_EVENT_run2pp_ana462_nocdbtag%' + {run_condition} + + and runnumber<=53880 + + {limit_condition} + + ; + job: + arguments : "{nevents} {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + + diff --git a/run2pp/FixDstCalo_ana462_2024p010_v001/FIX_CALO_run2pp_ana462_2024p010.yaml b/run2pp/FixDstCalo_ana462_2024p010_v001/FIX_CALO_run2pp_ana462_2024p010.yaml new file mode 100644 index 0000000..991485e --- /dev/null +++ b/run2pp/FixDstCalo_ana462_2024p010_v001/FIX_CALO_run2pp_ana462_2024p010.yaml @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------------------------- +# Fix the filenames. The output was staged with the wrong filename, based on the input file rather +# than the logbase name. +RENAME_CALO_run2pp_ana462_2024p010: + params: + name: DST_CALO_run2pp + build: ana.462 + build_name: ana462 + dbtag: 2024p010 + version : 1 + logbase : RENAME_CALO_run2pp_$(build)_$(tag)_$(version)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT}) + outbase : DST_CALO_run2pp_$(build)_$(tag)_$(version) + script : fixy2calib.sh +# payload : ./ProdFlow/run2pp/CaloProduction/ + payload : ./ProdFlow/run2pp/FixDstCalo_ana462_2024p010_v001/ + mem : 4096MB + neventsper: 50000 +# rsync : "./ProdFlow/run2pp/CaloProduction/*,cups.py" +# rsync : "./ProdFlow/run2pp/test/*,cups.py" + rsync : "./ProdFlow/run2pp/FixDstCalo_ana462_2024p010_v001/*,cups.py" + + input: + db: filecatalog + query: |- + select + 'filecatalog/datasets' as source , + runnumber , + 0 as segment , + string_agg( distinct split_part(filename,'/',-1), ' ' ) as files , + 'na' as fileranges + from + datasets + where + dataset='ana446_2024p007' and dsttype='DST_CALO_run2pp' + {run_condition} + + and runnumber<=53880 + + group by runnumber + + {limit_condition} + + ; + job: + arguments : "$(nevents) {outbase} {logbase} $(run) $(seg) $(outdir) $(buildarg) $(tag) $(inputs) $(ranges) {neventsper} {logdir} {histdir} {PWD} {rsync}" + output_destination : '{logdir}' + log : '{condor}/{logbase}.condor' + accounting_group : "group_sphenix.mdc2" + accounting_group_user : "sphnxpro" + priority : '3900' + + diff --git a/run2pp/FixDstCalo_ana462_2024p010_v001/fixy2calib.sh b/run2pp/FixDstCalo_ana462_2024p010_v001/fixy2calib.sh new file mode 100644 index 0000000..2b4615b --- /dev/null +++ b/run2pp/FixDstCalo_ana462_2024p010_v001/fixy2calib.sh @@ -0,0 +1,129 @@ +#!/usr/bin/bash + +nevents=${1} +outbase=${2} +logbase=${3} +runnumber=${4} +segment=${5} +outdir=${6} +build=${7/./} +dbtag=${8} +inputs=(`echo ${9} | tr "," " "`) # array of input files +ranges=(`echo ${10} | tr "," " "`) # array of input files with ranges appended +neventsper=${11:-1000} +logdir=${12:-.} +histdir=${13:-.} +subdir=${14} +payload=(`echo ${15} | tr "," " "`) # array of files to be rsynced +#----- +export cupsid=${@: -1} + +sighandler() +{ +echo "signal handler" +mv ${logbase}.out ${logdir#file:/} +mv ${logbase}.err ${logdir#file:/} +echo ./cups.py -v -r ${runnumber} -s ${segment} -d ${outbase} finished -e ${status_f4a} --nevents 0 --inc + ./cups.py -v -r ${runnumber} -s ${segment} -d ${outbase} finished -e 255 --nevents 0 +} + +# On evict (term,stp) or hold (kill) branch to signal handler +trap sighandler SIGTERM SIGINT SIGKILL + +{ + +export USER="$(id -u -n)" +export LOGNAME=${USER} +export HOME=/sphenix/u/${USER} +hostname + +source /opt/sphenix/core/bin/sphenix_setup.sh -n ${7} +echo OFFLINE_MAIN: $OFFLINE_MAIN +#export ODBCINI=./odbc.ini + +# Stagein +for i in ${payload[@]}; do + cp --verbose ${subdir}/${i} . +done + +if [ -e odbc.ini ]; then +echo export ODBCINI=./odbc.ini + export ODBCINI=./odbc.ini +else + echo No odbc.ini file detected. Using system odbc.ini +fi + +if [[ "${inputs}" == *"dbinput"* ]]; then + echo "Getting inputs via cups. ranges is not set." + inputs=( $(./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs) ) +fi + +# Debugging info +./cups.py -r ${runnumber} -s ${segment} -d ${outbase} info + +echo .............................................................................................. +echo $@ +echo .............................................................................................. +echo nevents: $nevents +echo outbase: $outbase +echo logbase: $logbase +echo runnumb: $runnumber +echo segment: $segment +echo outdir: $outdir +echo build: $build +echo dbtag: $dbtag +echo inputs: ${inputs[@]} +echo nper: $neventsper +echo logdir: $logdir +echo histdir: $histdir +echo .............................................................................................. + +#______________________________________________________________________________________ running __ +# +./cups.py -r ${runnumber} -s ${segment} -d ${outbase} running +#_________________________________________________________________________________________________ + +nevents=-1 +status_f4a=0 + +echo "The DST_CALO_run2pp_ana462_2024p010_v001 production was created with the wrong output filename." +echo "Renaming each file for run ${runnumber}. Catalog to be updated one all files are moved." + +for infile_ in ${inputs[@]}; do + + base=$( basename ${infile_} ) + + export dst0=${infile_} + export dstB=${base/DST_CALO_run2pp_ana446_2024p007/${outbase}} + export dstF=${outdir}/${dstB} + + export hist0=${histdir}/${base/DST_CALO/HIST_CALOQA} + export histF=${histdir}/${dstB/DST_CALO/HIST_CALOQA} + +# echo mv --verbose ${dst0} ${dstF} + mv --verbose ${dst0} ${dstF} +# echo mv --verbose ${hist0} ${histF} + mv --verbose ${hist0} ${histF} + +# random sleep for up to 30s between copies + sleep $(( RANDOM % 30 )) + +done + +ls -lah + +#______________________________________________________________________________________ finished __ +echo ./cups.py -v -r ${runnumber} -s ${segment} -d ${outbase} finished -e ${status_f4a} --nevents -1 + ./cups.py -v -r ${runnumber} -s ${segment} -d ${outbase} finished -e ${status_f4a} --nevents -1 +#_________________________________________________________________________________________________ + + + +echo "bdee bdee bdee, That's All Folks!" +} > ${logdir#file:/}/${logbase}.out 2> ${logdir#file:/}/${logbase}.err + +if [ -e cups.stat ]; then + cp cups.stat ${logdir#file:/}/${logbase}.dbstat +fi + +exit $status_f4a diff --git a/run2pp/JetProduction/runy2jetskim.sh b/run2pp/JetProduction/runy2jetskim.sh index e268221..5cc3896 100644 --- a/run2pp/JetProduction/runy2jetskim.sh +++ b/run2pp/JetProduction/runy2jetskim.sh @@ -36,6 +36,8 @@ export USER="$(id -u -n)" export LOGNAME=${USER} export HOME=/sphenix/u/${USER} hostname +echo cupsid=${cupsid} + source /opt/sphenix/core/bin/sphenix_setup.sh -n ${7} echo OFFLINE_MAIN: $OFFLINE_MAIN @@ -55,6 +57,8 @@ fi if [[ "${inputs}" == *"dbinput"* ]]; then echo "Getting inputs via cups. ranges is not set." + echo ./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs + ./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs inputs=( $(./cups.py -r ${runnumber} -s ${segment} -d ${outbase} getinputs) ) fi @@ -97,12 +101,14 @@ out1=HIST_${logbase#DST_}.root nevents=-1 status_f4a=0 +# there should be only one input file in this workflow for infile_ in ${inputs[@]}; do infile=$( basename ${infile_} ) cp -v ${infile_} . - outfile1=${infile/CALOFITTING/JETCALO} - outfile2=${infile/CALOFITTING/JET} - outhist=${infile/DST_CALOFITTING/HIST_CALOQASKIMMED} +#${infile/CALOFITTING/JETCALO} + outfile1=${logbase}.root + outfile2=${logbase/JETCALO/JET}.root + outhist=${logbase/DST_JETCALO/HIST_CALOQASKIMMED}.root root.exe -q -b Fun4All_JetSkimmedProductionYear2.C\(${nevents},\"${infile}\",\"${outfile1}\",\"${outfile2}\",\"${outhist}\",\"${dbtag}\"\); status_f4a=$? # Stageout the (single) DST created in the macro run @@ -120,6 +126,9 @@ for infile_ in ${inputs[@]}; do echo Stageout ${hfile} to ${histdir} ./stageout.sh ${hfile} ${histdir} done + + break # as noted... there should only be one input file in this workflow. Force a break at this point. + done ls -lah