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 766 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 821 of file upgradeWorkflowComponents.py.

821  def condition(self, fragment, stepList, key, hasHarvest):
822  if not 'PU' in key:
823  return False
824  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
825  return False
826  if self.suffix.endswith("S1"):
827  return "NuGun" in fragment
828  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 767 of file upgradeWorkflowComponents.py.

767  def setup_(self, step, stepName, stepDict, k, properties):
768  # just copy steps
769  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 770 of file upgradeWorkflowComponents.py.

770  def setupPU_(self, step, stepName, stepDict, k, properties):
771  # setup for stage 1
772  if "GenSim" in stepName:
773  stepNamePmx = stepName.replace('GenSim','Premix')
774  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
775  stepDict[stepNamePmx][k] = merge([
776  {
777  '-s': 'GEN,SIM,DIGI:pdigi_valid',
778  '--datatier': 'PREMIX',
779  '--eventcontent': 'PREMIX',
780  '--procModifiers': 'premix_stage1'
781  },
782  stepDict[stepName][k]
783  ])
784  # setup for stage 2
785  elif "Digi" in step or "Reco" in step:
786  # go back to non-PU step version
787  d = merge([stepDict[self.getStepName(step)][k]])
788  if d is None: return
789  if "Digi" in step:
790  tmpsteps = []
791  for s in d["-s"].split(","):
792  if s == "DIGI" or "DIGI:" in s:
793  tmpsteps.extend([s, "DATAMIX"])
794  else:
795  tmpsteps.append(s)
796  d = merge([{"-s" : ",".join(tmpsteps),
797  "--datamix" : "PreMix",
798  "--procModifiers": "premix_stage2"},
799  d])
800  # for combined stage1+stage2
801  if "_PMXS1S2" in self.suffix:
802  d = merge([digiPremixLocalPileup, d])
803  elif "Reco" in step:
804  if "--procModifiers" in d:
805  d["--procModifiers"] += ",premix_stage2"
806  else:
807  d["--procModifiers"] = "premix_stage2"
808  stepDict[stepName][k] = d
809  # Increase the input file step number by one for Nano in combined stage1+stage2
810  elif "Nano" in step:
811  # go back to non-PU step version
812  d = merge([stepDict[self.getStepName(step)][k]])
813  if "--filein" in d:
814  filein = d["--filein"]
815  m = re.search("step(?P<ind>\d+)_", filein)
816  if m:
817  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
818  stepDict[stepName][k] = d
819  # run2/3 WFs use Nano (not NanoPU) in PU WF
820  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 829 of file upgradeWorkflowComponents.py.

829  def workflow_(self, workflows, num, fragment, stepList, key):
830  fragmentTmp = fragment
831  if self.suffix.endswith("S1"):
832  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
833  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
834 # Premix stage1
835 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

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

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 844 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 838 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 836 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 843 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