Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9871e1f

Browse files
authored
Merge pull request #5026 from dmwm/era_by_run
Era by run
2 parents be12a68 + c3f1935 commit 9871e1f

File tree

4 files changed

+128
-8
lines changed

4 files changed

+128
-8
lines changed

etc/OXYProdOfflineConfiguration.py

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,53 @@
6060
# Data type
6161
# Processing site (where jobs run)
6262
# PhEDEx locations
63-
setAcquisitionEra(tier0Config, "Run2025C")
63+
64+
### Set Acquisition Era
65+
"""
66+
Any run under maxRunPreviousEra will take the latest acquisition era that is not default
67+
example:
68+
1. - All runs will be Run2025B
69+
70+
maxRunPreviousEra = 9999999
71+
acquisitionEra = {
72+
'default' : 'Run2025C',
73+
'maxRun' : {maxRunPreviousEra : 'Run2025B'}
74+
}
75+
76+
2. - Runs after run 100000 will be Run2025D
77+
- Run 390900, which should fall under Run2025B, would fall under Run2025C
78+
because we only compare according to the maximum run inside the 'maxRun' dict
79+
80+
maxRunPreviousEra = 391000
81+
maxRunEraB = 390950
82+
acquisitionEra = {
83+
'default' : 'Run2025D',
84+
'maxRun' : {maxRunPreviousEra : 'Run2025C'
85+
maxRunEraB : 'Run2025B'}
86+
}
87+
88+
All runs are assigned eras immediately at injection time,
89+
so we can keep old eras in the configuration file without risk.
90+
91+
i.e.
92+
93+
maxRunPreviousEra = 393800
94+
maxRunRun2025B = 392158
95+
maxRunRun2025A = 391529
96+
acquisitionEra = {
97+
'default' : 'Run2025D',
98+
'maxRun' : {maxRunPreviousEra : 'Run2025C',
99+
maxRunRun2025B : 'Run2025B',
100+
maxRunRun2025A : 'Run2025A'
101+
}
102+
}
103+
"""
104+
#maxRunPreviousEra = 1
105+
acquisitionEra = {
106+
'default' : 'PORun2025A',
107+
#'maxRun' : {maxRunPreviousEra : ''}
108+
}
109+
setAcquisitionEra(tier0Config, acquisitionEra)
64110
setEmulationAcquisitionEra(tier0Config, "Emulation2025", repack=False)
65111
setBaseRequestPriority(tier0Config, 251000)
66112
setBackfill(tier0Config, None)

etc/ProdOfflineConfiguration.py

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,53 @@
6060
# Data type
6161
# Processing site (where jobs run)
6262
# PhEDEx locations
63-
setAcquisitionEra(tier0Config, "Run2025C")
63+
64+
### Set Acquisition Era
65+
"""
66+
Any run under maxRunPreviousEra will take the latest acquisition era that is not default
67+
example:
68+
1. - All runs will be Run2025B
69+
70+
maxRunPreviousEra = 9999999
71+
acquisitionEra = {
72+
'default' : 'Run2025C',
73+
'maxRun' : {maxRunPreviousEra : 'Run2025B'}
74+
}
75+
76+
2. - Runs after run 100000 will be Run2025D
77+
- Run 390900, which should fall under Run2025B, would fall under Run2025C
78+
because we only compare according to the maximum run inside the 'maxRun' dict
79+
80+
maxRunPreviousEra = 391000
81+
maxRunEraB = 390950
82+
acquisitionEra = {
83+
'default' : 'Run2025D',
84+
'maxRun' : {maxRunPreviousEra : 'Run2025C'
85+
maxRunEraB : 'Run2025B'}
86+
}
87+
88+
All runs are assigned eras immediately at injection time,
89+
so we can keep old eras in the configuration file without risk.
90+
91+
i.e.
92+
93+
maxRunPreviousEra = 393800
94+
maxRunRun2025B = 392158
95+
maxRunRun2025A = 391529
96+
acquisitionEra = {
97+
'default' : 'Run2025D',
98+
'maxRun' : {maxRunPreviousEra : 'Run2025C',
99+
maxRunRun2025B : 'Run2025B',
100+
maxRunRun2025A : 'Run2025A'
101+
}
102+
}
103+
"""
104+
#maxRunPreviousEra = 1
105+
acquisitionEra = {
106+
'default' : 'Run2025C',
107+
#'maxRun' : {maxRunPreviousEra : 'Run2025B'}
108+
}
109+
setAcquisitionEra(tier0Config, acquisitionEra)
64110
setEmulationAcquisitionEra(tier0Config, "Emulation2025", repack=False)
65111
setBaseRequestPriority(tier0Config, 251000)
66112
setBackfill(tier0Config, None)

etc/ReplayOfflineConfiguration.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# 382686 - Collisions, 43.3 pb-1, 23.9583 TB NEW
4242
# 386674 Cosmics ~40 minutes in Run2024I with occupancy issues
4343

44-
setInjectRuns(tier0Config, [392204]) # 386925: 2024 Collisions, 390094: 2025 Cosmics, 390951: 2025 900 GeV Collisions
44+
setInjectRuns(tier0Config, [392204, 393274]) # 386925: 2024 Collisions, 390094: 2025 Cosmics, 390951: 2025 900 GeV Collisions
4545

4646
# Use this in order to limit the number of lumisections to process
4747
#setInjectLimit(tier0Config, 10)
@@ -81,7 +81,13 @@
8181
# Data type
8282
# Processing site (where jobs run)
8383
# PhEDEx locations
84-
setAcquisitionEra(tier0Config, "Tier0_REPLAY_2025")
84+
85+
maxRunPreviousEra = 392206
86+
acquisitionEra = {
87+
'default' : 'Tier0_REPLAY_2025',
88+
#'maxRun' : {maxRunPreviousEra : 'Tier0_REPLAY_2025A'}
89+
}
90+
setAcquisitionEra(tier0Config, acquisitionEra)
8591
setEmulationAcquisitionEra(tier0Config, "Emulation2025", repack=False)
8692
setBaseRequestPriority(tier0Config, 260000)
8793
setBackfill(tier0Config, 1)

src/python/T0/RunConfig/RunConfigAPI.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,28 @@ def extractConfigParameter(configParameter, era, run):
5353
else:
5454
return configParameter
5555

56+
def getAcquisitionEra(tier0Config, run):
57+
"""
58+
_getAcquisitionEra_
59+
Determines the acquisition era based on the current run
60+
"""
61+
if isinstance(tier0Config.Global.AcquisitionEra, dict):
62+
if 'maxRun' in tier0Config.Global.AcquisitionEra:
63+
thresholdRuns = list(tier0Config.Global.AcquisitionEra['maxRun'])
64+
caseRun = max(thresholdRuns)
65+
66+
if run <= caseRun:
67+
acqEra = tier0Config.Global.AcquisitionEra['maxRun'][caseRun]
68+
else:
69+
acqEra = tier0Config.Global.AcquisitionEra['default']
70+
else:
71+
acqEra = tier0Config.Global.AcquisitionEra['default']
72+
73+
else:
74+
acqEra = tier0Config.Global.AcquisitionEra
75+
76+
return acqEra
77+
5678
def configureRun(tier0Config, run, hltConfig, referenceHltConfig = None):
5779
"""
5880
_configureRun_
@@ -119,7 +141,7 @@ def configureRun(tier0Config, run, hltConfig, referenceHltConfig = None):
119141
if runInfo['setup_label'] == 'Emulation':
120142
bindsUpdateRun['ACQERA'] = tier0Config.Global.EmulationAcquisitionEra
121143
else:
122-
bindsUpdateRun['ACQERA'] = tier0Config.Global.AcquisitionEra
144+
bindsUpdateRun['ACQERA'] = getAcquisitionEra(tier0Config, run)
123145

124146
bindsStream = []
125147
bindsDataset = []
@@ -573,7 +595,7 @@ def configureRunStream(tier0Config, run, stream, specDirectory, dqmUploadProxy):
573595

574596
if tier0Config.Global.EnableUniqueWorkflowName:
575597
workflowName = "Repack_Run%d_Stream%s_%s_ID%d_v%s" % (run, stream,
576-
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, streamConfig.Repack.ProcessingVersion)
598+
getAcquisitionEra(tier0Config, run), tier0Config.Global.DeploymentID, streamConfig.Repack.ProcessingVersion)
577599
else:
578600
workflowName = "Repack_Run%d_Stream%s" % (run, stream)
579601

@@ -626,7 +648,7 @@ def configureRunStream(tier0Config, run, stream, specDirectory, dqmUploadProxy):
626648

627649
if tier0Config.Global.EnableUniqueWorkflowName:
628650
workflowName = "Express_Run%d_Stream%s_%s_ID%d_v%s" % (run, stream,
629-
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, streamConfig.Express.ProcessingVersion)
651+
getAcquisitionEra(tier0Config, run), tier0Config.Global.DeploymentID, streamConfig.Express.ProcessingVersion)
630652
else:
631653
workflowName = "Express_Run%d_Stream%s" % (run, stream)
632654

@@ -1041,7 +1063,7 @@ def releasePromptReco(tier0Config, specDirectory, dqmUploadProxy):
10411063

10421064
if tier0Config.Global.EnableUniqueWorkflowName:
10431065
workflowName = "PromptReco_Run%d_%s_%s_ID%d_v%s" % (run, dataset,
1044-
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, datasetConfig.ProcessingVersion)
1066+
getAcquisitionEra(tier0Config, run), tier0Config.Global.DeploymentID, datasetConfig.ProcessingVersion)
10451067
else:
10461068
workflowName = "PromptReco_Run%d_%s" % (run, dataset)
10471069

0 commit comments

Comments
 (0)