Skip to content

Commit

Permalink
era change by run
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Linares committed Nov 23, 2024
1 parent 1269c7d commit 6000877
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
7 changes: 5 additions & 2 deletions etc/ReplayOfflineConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# 382686 - Collisions, 43.3 pb-1, 23.9583 TB NEW
# 386674 Cosmics ~40 minutes in Run2024I with occupancy issues

setInjectRuns(tier0Config, [382686, 386674])
setInjectRuns(tier0Config, [380128, 382686, 386925])

# Use this in order to limit the number of lumisections to process
#setInjectLimit(tier0Config, 10)
Expand Down Expand Up @@ -68,7 +68,10 @@
# Data type
# Processing site (where jobs run)
# PhEDEx locations
setAcquisitionEra(tier0Config, "Tier0_REPLAY_2024")
setAcquisitionEra(tier0Config, { "oldEra": "Tier0_REPLAY_2024A",
"newEra": "Tier0_REPLAY_2024B",
"maxRunOldEra": 382686
})
setBaseRequestPriority(tier0Config, 260000)
setBackfill(tier0Config, 1)
setBulkDataType(tier0Config, "data")
Expand Down
31 changes: 25 additions & 6 deletions src/python/T0/RunConfig/RunConfigAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ def extractConfigParameter(configParameter, era, run):
else:
return configParameter

def getAcquisitionEra(tier0Config, run):
"""
_getAcquisitionEra_
Determines the acquisition era based on the current run
"""
if isinstance(tier0Config.Global.AcquisitionEra, dict):
if run <= tier0Config.Global.AcquisitionEra['maxRunOldEra']:
acqEra = tier0Config.Global.AcquisitionEra['oldEra']
else:
acqEra = tier0Config.Global.AcquisitionEra['newEra']
else:
acqEra = tier0Config.Global.AcquisitionEra

return acqEra

def configureRun(tier0Config, run, hltConfig, referenceHltConfig = None):
"""
_configureRun_
Expand Down Expand Up @@ -118,8 +134,10 @@ def configureRun(tier0Config, run, hltConfig, referenceHltConfig = None):
# Use different acquisition era for emulated data
if runInfo['setup_label'] == 'Emulation':
bindsUpdateRun['ACQERA'] = tier0Config.Global.EmulationAcquisitionEra

else:
bindsUpdateRun['ACQERA'] = tier0Config.Global.AcquisitionEra
bindsUpdateRun['ACQERA'] = getAcquisitionEra(tier0Config, run)


bindsStream = []
bindsDataset = []
Expand Down Expand Up @@ -548,13 +566,13 @@ def configureRunStream(tier0Config, run, stream, specDirectory, dqmUploadProxy):
outputs = {}
blockCloseDelay = None
taskName = None
acqEra = getAcquisitionEra(tier0Config, run)
if streamConfig.ProcessingStyle == "Bulk":

taskName = "Repack"

if tier0Config.Global.EnableUniqueWorkflowName:
workflowName = "Repack_Run%d_Stream%s_%s_ID%d_v%s" % (run, stream,
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, streamConfig.Repack.ProcessingVersion)
acqEra, tier0Config.Global.DeploymentID, streamConfig.Repack.ProcessingVersion)
else:
workflowName = "Repack_Run%d_Stream%s" % (run, stream)

Expand Down Expand Up @@ -604,7 +622,7 @@ def configureRunStream(tier0Config, run, stream, specDirectory, dqmUploadProxy):

if tier0Config.Global.EnableUniqueWorkflowName:
workflowName = "Express_Run%d_Stream%s_%s_ID%d_v%s" % (run, stream,
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, streamConfig.Express.ProcessingVersion)
acqEra, tier0Config.Global.DeploymentID, streamConfig.Express.ProcessingVersion)
else:
workflowName = "Express_Run%d_Stream%s" % (run, stream)

Expand Down Expand Up @@ -825,7 +843,7 @@ def releasePromptReco(tier0Config, specDirectory, dqmUploadProxy):
# retrieve phedex configs for run
getPhEDExConfigDAO = daoFactory(classname = "RunConfig.GetPhEDExConfig")
phedexConfigs = getPhEDExConfigDAO.execute(run, transaction = False)

for (dataset, fileset, repackProcVer) in recoRelease[run]:

bindsReleasePromptReco.append( { 'RUN' : run,
Expand Down Expand Up @@ -1014,8 +1032,9 @@ def releasePromptReco(tier0Config, specDirectory, dqmUploadProxy):
taskName = "Reco"

if tier0Config.Global.EnableUniqueWorkflowName:
acqEra = getAcquisitionEra(tier0Config, run)
workflowName = "PromptReco_Run%d_%s_%s_ID%d_v%s" % (run, dataset,
tier0Config.Global.AcquisitionEra, tier0Config.Global.DeploymentID, datasetConfig.ProcessingVersion)
acqEra, tier0Config.Global.DeploymentID, datasetConfig.ProcessingVersion)
else:
workflowName = "PromptReco_Run%d_%s" % (run, dataset)

Expand Down

0 comments on commit 6000877

Please sign in to comment.