Skip to content

Commit

Permalink
Merge pull request #17 from sPHENIX-Collaboration/online_triggered_ev…
Browse files Browse the repository at this point in the history
…ent_run2auau_new_2024p007_v1.0

Online triggered event run2auau new 2024p007 v1.0
  • Loading branch information
klendathu2k authored Oct 9, 2024
2 parents 08c0ed6 + c15a8c3 commit efed415
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 106 deletions.
Original file line number Diff line number Diff line change
@@ -1,90 +1,94 @@
#________________________________________________________________________________________________________DST_PHYSICS__
PHYS_DST_STREAMING_EVENT_run2auau:
DST_STREAMING_EVENT_run2auau_new_2024p007:

params:
name: DST_STREAMING_EVENT_run2auau
build: ana.439
build_name: ana439
build: new
build_name: new
dbtag: 2024p007
logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT})
outbase : $(name)_$(build)_$(tag)
script : run_cosmics.sh
payload : ./ProdFlow/run2pp/cosmics/
mem : 20480MB
payload : ./ProdFlow/run2pp/cosmics/
comment : "---"
rsync : "./ProdFlow/run2pp/cosmics/*,cups.py,bachi.py,odbc.ini"
mem : 20000MB
# 20GB of memory is not a typo
zstrig : 150
neventsperZS: 1000
neventsperZS: 10000
neventsperNoZS: 100
mnrun: 52076
mxrun: 53880

# and runnumber>=52076 and runnumber<=53880

input:
db: daqdb
direct_path: /sphenix/lustre01/sphnxpro/{mode}/*/physics/
direct_path: /sphenix/lustre01/sphnxpro/{mode}/*/*/
query: |-
with run2auau as (
select {mnrun} as firstrun,
{mxrun} as lastrun
),
with run2auau as (
select 53881 as firstrun,
99999 as lastrun
),
zero as (
zero as (
select lastrun, min(zsthr) as zsthr, max(zsthr) as zstrh2
from tpc_sampa_config group by lastrun order by lastrun desc
),
fullrun as (
select
'daqdb/filelist' as source ,
runnumber ,
0 as segment ,
string_agg( distinct split_part(filename,'/',-1), ' ' )
as files ,
string_agg( distinct split_part(filename,'/',-1) || ':' || firstevent || ':' || lastevent, ' ' )
as fileranges
from
filelist,run2auau
where
(
(filename like '/bbox%/TPC%physics%.evt' and lastevent>2 ) or
(filename like '/bbox%/TPOT%physics%.evt' and lastevent>2 ) or
(filename like '/bbox%/physics_intt%.evt' and lastevent>2 ) or
(filename like '/bbox%/GL1_physics%.evt' and lastevent>2 ) or
(filename like '/bbox%/physics_mvtx%.evt' and lastevent>2 )
)
),
and runnumber>=run2auau.firstrun
and runnumber<=run2auau.lastrun
fullrun as (
select
'daqdb/filelist' as source ,
runnumber ,
0 as segment ,
string_agg( distinct split_part(filename,'/',-1), ' ' ) as files ,
string_agg( distinct split_part(filename,'/',-1) || ':' || firstevent || ':' || lastevent, ' ' ) as fileranges
from
filelist,run2auau
where
(
(filename similar to '/bbox%/TPC%(beam|physics)%.evt' and lastevent>2 ) or
(filename similar to '/bbox%/TPOT%(beam|physics)%.evt' and lastevent>2 ) or
(filename similar to '/bbox%/(beam|physics)_intt%.evt' and lastevent>2 ) or
(filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 ) or
(filename similar to '/bbox%/(beam|physics)_mvtx%.evt' and lastevent>2 )
)
and runnumber>=run2auau.firstrun and runnumber<=run2auau.lastrun
{run_condition}
group by runnumber
having
every(transferred_to_sdcc) and
max(lastevent)>1000 and
sum( case when filename like '/bbox%/GL1_physics%' then 1 else 0 end )>0 and
(
sum( case when filename like '/bbox%/TPC%physics%' then 1 else 0 end )>0 or
sum( case when filename like '/bbox%/TPOT%physics%' then 1 else 0 end )>0 or
sum( case when filename like '/bbox%/physics%intt%' then 1 else 0 end )>0 or
sum( case when filename like '/bbox%/physics_mvtx%.evt' then 1 else 0 end )>0
)
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%/TPC%(beam|physics)%' then 1 else 0 end )>0 or
sum( case when filename similar to '/bbox%/TPOT%(beam|physics)%' then 1 else 0 end )>0 or
sum( case when filename similar to '/bbox%/(beam|physics)%intt%' then 1 else 0 end )>0 or
sum( case when filename similar to '/bbox%/(beam|physics)_mvtx%.evt' then 1 else 0 end )>0
)
order by runnumber
),
),
fullrunzeros as (
fullrunzeros as (
select source,runnumber,segment,files,fileranges,lastrun,runnumber-lastrun as rundiff,zsthr,(case when zsthr<350 then {neventsperZS} else {neventsperNoZS} end) as neventsper
select source,
runnumber,
segment,
files,
fileranges,
lastrun,
runnumber-lastrun as rundiff,
zsthr,
(case when zsthr>{zstrig} then {neventsperZS} else {neventsperNoZS} end) as neventsper
from fullrun cross join zero order by runnumber desc
from fullrun cross join zero order by runnumber desc
)
)
select distinct on (runnumber) source,runnumber,segment,files,fileranges,neventsper from fullrunzeros
select distinct on (runnumber) source,runnumber,segment,files,fileranges,neventsper from fullrunzeros
where rundiff>0 order by runnumber desc,rundiff
;
# TODO: Need to add error checking to make sure that outdir, logdir, etc... are quoted properly. Else, this will cause problems with argument substitution
filesystem:
Expand All @@ -109,22 +113,22 @@ PHYS_DST_STREAMING_EVENT_run2auau:



DST_TRKR_HIT_SET_run2auau:
DST_TRKR_HIT_run2auau_new_2024p007:
# DST_EVENT works from a pre-built set of run lists.
params:
name: DST_TRKR_HIT_run2auau
build: ana.439
build_name: ana439
build: new
build_name: new
dbtag: 2024p007
logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT})
outbase : $(name)_$(build)_$(tag)
script : run.sh
payload : ./ProdFlow/run2pp/TrackingProduction/
mem : 2048MB
rsync : "./ProdFlow/run2pp/TrackingProduction/*,cups.py,bachi.py,odbc.ini"
input : "DST_STREAMING_EVENT_run2auau_ana439_2024p007%"
mnrun : 43249
mxrun : 53880
input : "DST_STREAMING_EVENT_run2auau_new_2024p007%"
mnrun : 53881
mxrun : 99999

input:
db: fc
Expand All @@ -144,6 +148,7 @@ DST_TRKR_HIT_SET_run2auau:
and runnumber>={mnrun}
and runnumber<={mxrun}
order by runnumber
{limit_condition}
;
Expand All @@ -168,12 +173,12 @@ DST_TRKR_HIT_SET_run2auau:


#_________________________________________________________________________________________________________________________________________
DST_TRKR_CLUSTER_SET_run2auau:
DST_TRKR_CLUSTER_run2auau_new_2024p007:
# DST_EVENT works from a pre-built set of run lists.
params:
name: DST_TRKR_CLUSTER_run2auau
build: ana.439
build_name: ana439
build: new
build_name: new
dbtag: 2024p007
logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT})
outbase : $(name)_$(build)_$(tag)
Expand All @@ -182,9 +187,10 @@ DST_TRKR_CLUSTER_SET_run2auau:
mem : 2048MB
nevents : 0
rsync : "./ProdFlow/run2pp/TrackingProduction/*,cups.py,bachi.py,odbc.ini"
input : "DST_TRKR_HIT_run2auau_ana439_2024p007%"
mnrun : 43249
mxrun : 53880
input : "DST_TRKR_HIT_run2auau_new_2024p007%"
mnrun : 53881
mxrun : 99999


input:
db: fc
Expand All @@ -198,10 +204,12 @@ DST_TRKR_CLUSTER_SET_run2auau:
from
datasets
where
filename like '{input}'
{run_condition}
and runnumber>={mnrun}
and runnumber<={mxrun}
order by runnumber
{limit_condition}
;
Expand All @@ -224,12 +232,12 @@ DST_TRKR_CLUSTER_SET_run2auau:


#_________________________________________________________________________________________________________________________________________
DST_TRKR_SEED_SET_run2auau:
DST_TRKR_SEED_run2auau_new_2024p007:
# DST_EVENT works from a pre-built set of run lists.
params:
name: DST_TRKR_SEED_run2auau
build: ana.439
build_name: ana439
build: new
build_name: new
dbtag: 2024p007
logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT})
outbase : $(name)_$(build)_$(tag)
Expand All @@ -238,9 +246,10 @@ DST_TRKR_SEED_SET_run2auau:
mem : 2048MB
nevents : 0
rsync : "./ProdFlow/run2pp/TrackingProduction/*,cups.py,bachi.py,odbc.ini"
input : "DST_TRKR_CLUSTER_run2auau_ana439_2024p007%"
mnrun : 43249
mxrun : 53880
input : "DST_TRKR_CLUSTER_run2auau_new_2024p007%"
mnrun : 53881
mxrun : 99999


input:
db: fc
Expand All @@ -254,10 +263,12 @@ DST_TRKR_SEED_SET_run2auau:
from
datasets
where
filename like '{input}'
{run_condition}
and runnumber>={mnrun}
and runnumber<={mxrun}
order by runnumber
{limit_condition}
;
Expand All @@ -277,12 +288,12 @@ DST_TRKR_SEED_SET_run2auau:
priority : '3800'


DST_TRKR_TRACKS_SET_run2auau:
DST_TRKR_TRACKS_run2auau_new_2024p007:
# DST_EVENT works from a pre-built set of run lists.
params:
name: DST_TRKR_TRACKS_run2auau
build: ana.439
build_name: ana439
build: new
build_name: new
dbtag: 2024p007
logbase : $(name)_$(build)_$(tag)-$INT(run,{RUNFMT})-$INT(seg,{SEGFMT})
outbase : $(name)_$(build)_$(tag)
Expand All @@ -291,10 +302,11 @@ DST_TRKR_TRACKS_SET_run2auau:
mem : 2048MB
nevents : 0
rsync : "./ProdFlow/run2pp/TrackingProduction/*,cups.py,bachi.py,odbc.ini"
seeds : "DST_TRKR_SEED_run2auau_ana439_2024p007%"
clusters: "DST_TRKR_CLUSTER_run2auau_ana439_2024p007%"
mnrun : 43249
mxrun : 53880
seeds : "DST_TRKR_SEED_run2auau_new_2024p007%"
clusters: "DST_TRKR_CLUSTER_run2auau_new_2024p007%"
mnrun : 53881
mxrun : 99999




Expand All @@ -305,6 +317,7 @@ DST_TRKR_TRACKS_SET_run2auau:
'filecatalog/datasets' as source ,
runnumber ,
segment ,
string_agg( distinct split_part(filename,'/',-1), ' ' ) as files ,
string_agg( distinct split_part(filename,'/',-1) || ':' || 0 || ':' || -1, ' ' ) as fileranges
from
Expand All @@ -317,6 +330,7 @@ DST_TRKR_TRACKS_SET_run2auau:
and runnumber>={mnrun}
and runnumber<={mxrun}
group by runnumber,segment
having (
Expand Down
32 changes: 16 additions & 16 deletions run2auau/DST_TRIGGERED_EVENT_run2auau_new_2024p007.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ DST_TRIGGERED_EVENT_run2auau_new_2024p007:
script : run.sh
payload : ./ProdFlow/run2pp/TriggerProduction/
mem : 2048M
neventsper: 5000
noverflow: 1000
neventsper: 100000
noverflow: 20000
rsync : "ProdFlow/run2pp/TriggerProduction/*,cups.py,bachi.py,odbc.ini"


Expand All @@ -35,26 +35,26 @@ DST_TRIGGERED_EVENT_run2auau_new_2024p007:
#
input:
db: daqdb
direct_path: /sphenix/lustre01/sphnxpro/physics/*/beam/
direct_path: /sphenix/lustre01/sphnxpro/physics/*/*/
query: |-
with config as (
select
5000 as nevents,
1000 as noverflow
100000 as nevents,
20000 as noverflow
),
fullevents as (
select runnumber,max(lastevent) as lastevent
from filelist, config
where (filename like '/bbox%/GL1_beam%.evt' and lastevent>2 )
where (filename similar to '/bbox%/GL1_(beam|physics)%.evt' and lastevent>2 )
{run_condition}
group by runnumber
having
every(transferred_to_sdcc) and
max(lastevent)>1000 and
sum( case when filename like '/bbox%/GL1_beam%' then 1 else 0 end )>0
sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0
order by runnumber
),
Expand All @@ -71,12 +71,12 @@ DST_TRIGGERED_EVENT_run2auau_new_2024p007:
filelist,config
where
(
(filename like '/bbox%/%emcal%beam%.prdf' and lastevent>2 ) or
(filename like '/bbox%/%HCal%beam%.prdf' and lastevent>2 ) or
(filename like '/bbox%/%LL1%beam%.prdf' and lastevent>2 ) or
(filename like '/bbox%/GL1_beam%.evt' and lastevent>2 ) or
(filename like '/bbox%/%mbd%beam%.prdf' and lastevent>2 ) or
(filename like '/bbox%/%ZDC%beam%.prdf' and lastevent>2 )
(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 )
)
Expand All @@ -89,10 +89,10 @@ DST_TRIGGERED_EVENT_run2auau_new_2024p007:
having
every(transferred_to_sdcc) and
max(lastevent)>1000 and
sum( case when filename like '/bbox%/GL1_beam%' then 1 else 0 end )>0 and
sum( case when filename similar to '/bbox%/GL1_(beam|physics)%' then 1 else 0 end )>0 and
(
sum( case when filename like '/bbox%/%emcal%beam%' then 1 else 0 end )>0 or
sum( case when filename like '/bbox%/%HCal%beam%' then 1 else 0 end )>0
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
Expand Down
Loading

0 comments on commit efed415

Please sign in to comment.