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 857 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 912 of file upgradeWorkflowComponents.py.

912  def condition(self, fragment, stepList, key, hasHarvest):
913  if not 'PU' in key:
914  return False
915  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
916  return False
917  if self.suffix.endswith("S1"):
918  return "NuGun" in fragment
919  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 858 of file upgradeWorkflowComponents.py.

858  def setup_(self, step, stepName, stepDict, k, properties):
859  # just copy steps
860  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 861 of file upgradeWorkflowComponents.py.

861  def setupPU_(self, step, stepName, stepDict, k, properties):
862  # setup for stage 1
863  if "GenSim" in stepName:
864  stepNamePmx = stepName.replace('GenSim','Premix')
865  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
866  stepDict[stepNamePmx][k] = merge([
867  {
868  '-s': 'GEN,SIM,DIGI:pdigi_valid',
869  '--datatier': 'PREMIX',
870  '--eventcontent': 'PREMIX',
871  '--procModifiers': 'premix_stage1'
872  },
873  stepDict[stepName][k]
874  ])
875  # setup for stage 2
876  elif "Digi" in step or "Reco" in step:
877  # go back to non-PU step version
878  d = merge([stepDict[self.getStepName(step)][k]])
879  if d is None: return
880  if "Digi" in step:
881  tmpsteps = []
882  for s in d["-s"].split(","):
883  if s == "DIGI" or "DIGI:" in s:
884  tmpsteps.extend([s, "DATAMIX"])
885  else:
886  tmpsteps.append(s)
887  d = merge([{"-s" : ",".join(tmpsteps),
888  "--datamix" : "PreMix",
889  "--procModifiers": "premix_stage2"},
890  d])
891  # for combined stage1+stage2
892  if "_PMXS1S2" in self.suffix:
893  d = merge([digiPremixLocalPileup, d])
894  elif "Reco" in step:
895  if "--procModifiers" in d:
896  d["--procModifiers"] += ",premix_stage2"
897  else:
898  d["--procModifiers"] = "premix_stage2"
899  stepDict[stepName][k] = d
900  # Increase the input file step number by one for Nano in combined stage1+stage2
901  elif "Nano" in step:
902  # go back to non-PU step version
903  d = merge([stepDict[self.getStepName(step)][k]])
904  if "--filein" in d:
905  filein = d["--filein"]
906  m = re.search("step(?P<ind>\d+)_", filein)
907  if m:
908  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
909  stepDict[stepName][k] = d
910  # run2/3 WFs use Nano (not NanoPU) in PU WF
911  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 920 of file upgradeWorkflowComponents.py.

920  def workflow_(self, workflows, num, fragment, stepList, key):
921  fragmentTmp = fragment
922  if self.suffix.endswith("S1"):
923  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
924  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
925 # Premix stage1
926 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

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

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 935 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 929 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 927 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 934 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:38
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