CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
upgradeWorkflowComponents.UpgradeWorkflowPremix Class Reference
Inheritance diagram for upgradeWorkflowComponents.UpgradeWorkflowPremix:
upgradeWorkflowComponents.UpgradeWorkflow upgradeWorkflowComponents.UpgradeWorkflowAdjustPU upgradeWorkflowComponents.UpgradeWorkflowPremixProdLike

Public Member Functions

def condition (self, fragment, stepList, key, hasHarvest)
 
def setup_ (self, step, stepName, stepDict, k, properties)
 
def setupPU_ (self, step, stepName, stepDict, k, properties)
 
def workflow_ (self, workflows, num, fragment, stepList, key)
 
- Public Member Functions inherited from upgradeWorkflowComponents.UpgradeWorkflow
def __init__ (self, steps, PU, suffix, offset)
 
def getStepName (self, step, extra="")
 
def getStepNamePU (self, step, extra="")
 
def init (self, stepDict)
 
def preventReuse (self, stepName, stepDict, k)
 
def setup (self, stepDict, k, properties)
 
def setupPU (self, stepDict, k, properties)
 
def workflow (self, workflows, num, fragment, stepList, key, hasHarvest)
 

Static Public Attributes

 offset
 
 PU
 
 steps
 
 suffix
 

Additional Inherited Members

- Public Attributes inherited from upgradeWorkflowComponents.UpgradeWorkflow
 allowReuse
 
 offset
 
 PU
 
 steps
 
 suffix
 

Detailed Description

Definition at line 808 of file upgradeWorkflowComponents.py.

Member Function Documentation

◆ condition()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.condition (   self,
  fragment,
  stepList,
  key,
  hasHarvest 
)

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Reimplemented in upgradeWorkflowComponents.UpgradeWorkflowPremixProdLike, and upgradeWorkflowComponents.UpgradeWorkflowAdjustPU.

Definition at line 865 of file upgradeWorkflowComponents.py.

865  def condition(self, fragment, stepList, key, hasHarvest):
866  if not 'PU' in key:
867  return False
868  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
869  return False
870  if self.suffix.endswith("S1"):
871  return "NuGun" in fragment
872  return True

References any(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

◆ setup_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.setup_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Reimplemented in upgradeWorkflowComponents.UpgradeWorkflowPremixProdLike.

Definition at line 809 of file upgradeWorkflowComponents.py.

809  def setup_(self, step, stepName, stepDict, k, properties):
810  # just copy steps
811  stepDict[stepName][k] = merge([stepDict[step][k]])

◆ setupPU_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.setupPU_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Reimplemented in upgradeWorkflowComponents.UpgradeWorkflowAdjustPU.

Definition at line 812 of file upgradeWorkflowComponents.py.

812  def setupPU_(self, step, stepName, stepDict, k, properties):
813  # setup for stage 1
814  if "GenSim" in stepName:
815  stepNamePmx = stepName.replace('GenSim','Premix')
816  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
817  stepDict[stepNamePmx][k] = merge([
818  {
819  '-s': 'GEN,SIM,DIGI:pdigi_valid',
820  '--datatier': 'PREMIX',
821  '--eventcontent': 'PREMIX',
822  '--procModifiers': 'premix_stage1'
823  },
824  stepDict[stepName][k]
825  ])
826  if "ProdLike" in self.suffix:
827  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
828  # setup for stage 2
829  elif "Digi" in step or "Reco" in step:
830  # go back to non-PU step version
831  d = merge([stepDict[self.getStepName(step)][k]])
832  if d is None: return
833  if "Digi" in step:
834  tmpsteps = []
835  for s in d["-s"].split(","):
836  if s == "DIGI" or "DIGI:" in s:
837  tmpsteps.extend([s, "DATAMIX"])
838  else:
839  tmpsteps.append(s)
840  d = merge([{"-s" : ",".join(tmpsteps),
841  "--datamix" : "PreMix",
842  "--procModifiers": "premix_stage2"},
843  d])
844  # for combined stage1+stage2
845  if "_PMXS1S2" in self.suffix:
846  d = merge([digiPremixLocalPileup, d])
847  elif "Reco" in step:
848  if "--procModifiers" in d:
849  d["--procModifiers"] += ",premix_stage2"
850  else:
851  d["--procModifiers"] = "premix_stage2"
852  stepDict[stepName][k] = d
853  # Increase the input file step number by one for Nano in combined stage1+stage2
854  elif "Nano" in step:
855  # go back to non-PU step version
856  d = merge([stepDict[self.getStepName(step)][k]])
857  if "--filein" in d:
858  filein = d["--filein"]
859  m = re.search("step(?P<ind>\d+)_", filein)
860  if m:
861  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
862  stepDict[stepName][k] = d
863  # run2/3 WFs use Nano (not NanoPU) in PU WF
864  stepDict[self.getStepName(step)][k] = merge([d])

References upgradeWorkflowComponents.UpgradeWorkflow.getStepName(), createfilelist.int, join(), submitPVValidationJobs.split(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

◆ workflow_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.workflow_ (   self,
  workflows,
  num,
  fragment,
  stepList,
  key 
)

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Definition at line 873 of file upgradeWorkflowComponents.py.

873  def workflow_(self, workflows, num, fragment, stepList, key):
874  fragmentTmp = fragment
875  if self.suffix.endswith("S1"):
876  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
877  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
878 # Premix stage1
879 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

References python.rootplot.root2matplotlib.replace(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 888 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 882 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 880 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 887 of file upgradeWorkflowComponents.py.

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
any
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
createfilelist.int
int
Definition: createfilelist.py:10
merge
Definition: merge.py:1
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444