CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
Config.SubProcess Class Reference
Inheritance diagram for Config.SubProcess:
Mixins._Unlabelable

Public Member Functions

def __init__ (self, process, SelectEvents=untracked.PSet(), outputCommands=untracked.vstring())
 
def dumpPython (self, options=PrintOptions())
 
def getProcessName (self)
 
def getSubProcessPSet (self, parameterSet)
 
def nameInProcessDesc_ (self, label)
 
def outputCommands (self)
 
def process (self)
 
def SelectEvents (self)
 
def type_ (self)
 

Private Member Functions

def _place (self, label, process)
 

Private Attributes

 __outputCommands
 
 __process
 
 __SelectEvents
 

Detailed Description

Allows embedding another process within a parent process. This allows one to 
chain processes together directly in one cmsRun job rather than having to run
separate jobs that are connected via a temporary file.

Definition at line 1465 of file Config.py.

Constructor & Destructor Documentation

◆ __init__()

def Config.SubProcess.__init__ (   self,
  process,
  SelectEvents = untracked.PSet(),
  outputCommands = untracked.vstring() 
)
 

Definition at line 1470 of file Config.py.

1470  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1471  """
1472  """
1473  if not isinstance(process, Process):
1474  raise ValueError("the 'process' argument must be of type cms.Process")
1475  if not isinstance(SelectEvents,PSet):
1476  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1477  if not isinstance(outputCommands,vstring):
1478  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1479  self.__process = process
1480  self.__SelectEvents = SelectEvents
1481  self.__outputCommands = outputCommands

Member Function Documentation

◆ _place()

def Config.SubProcess._place (   self,
  label,
  process 
)
private

Definition at line 1501 of file Config.py.

1501  def _place(self,label,process):
1502  process._placeSubProcess('subProcess',self)

◆ dumpPython()

def Config.SubProcess.dumpPython (   self,
  options = PrintOptions() 
)

Definition at line 1482 of file Config.py.

1482  def dumpPython(self, options=PrintOptions()):
1483  out = "parentProcess"+str(hash(self))+" = process\n"
1484  out += self.__process.dumpPython()
1485  out += "childProcess = process\n"
1486  out += "process = parentProcess"+str(hash(self))+"\n"
1487  out += "process.addSubProcess(cms.SubProcess(process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +"))"
1488  return out

References Config.SubProcess.__outputCommands, Config.Process.__process, Config.ProcessFragment.__process, Config.SubProcess.__process, Config.SubProcess.__SelectEvents, cond.hash, and str.

Referenced by Modules.SwitchProducer.__addParameter(), Types._AllowedParameterTypes.__init__(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), Mixins._Parameterizable.__setattr__(), Modules.SwitchProducer.__setattr__(), and SequenceTypes.Schedule.__str__().

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1489 of file Config.py.

1489  def getProcessName(self):
1490  return self.__process.name_()

References Config.Process.__process, Config.ProcessFragment.__process, and Config.SubProcess.__process.

Referenced by Types.InputTag.cppTag().

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1503 of file Config.py.

1503  def getSubProcessPSet(self,parameterSet):
1504  topPSet = parameterSet.newPSet()
1505  self.__process.fillProcessDesc(topPSet)
1506  subProcessPSet = parameterSet.newPSet()
1507  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1508  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1509  subProcessPSet.addPSet(False,"process",topPSet)
1510  return subProcessPSet
1511 

References Config.SubProcess.__outputCommands, Config.Process.__process, Config.ProcessFragment.__process, Config.SubProcess.__process, and Config.SubProcess.__SelectEvents.

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1495 of file Config.py.

1495  def outputCommands(self):
1496  return self.__outputCommands

References Config.SubProcess.__outputCommands.

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1491 of file Config.py.

1491  def process(self):
1492  return self.__process

References Config.Process.__process, Config.ProcessFragment.__process, and Config.SubProcess.__process.

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1493 of file Config.py.

1493  def SelectEvents(self):
1494  return self.__SelectEvents

References Config.SubProcess.__SelectEvents.

◆ type_()

def Config.SubProcess.type_ (   self)

Member Data Documentation

◆ __outputCommands

Config.SubProcess.__outputCommands
private

◆ __process

Config.SubProcess.__process
private

◆ __SelectEvents

Config.SubProcess.__SelectEvents
private
cond::hash
Definition: Time.h:19
str
#define str(s)
Definition: TestProcessor.cc:52
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
EgammaHLTValidationUtils.getProcessName
def getProcessName(pdgGen, requiredNumberOfGeneratedObjects)
Definition: EgammaHLTValidationUtils.py:21
ALCARECOTkAlCosmics0THLT_Output_cff.outputCommands
outputCommands
Definition: ALCARECOTkAlCosmics0THLT_Output_cff.py:17
ConfigBuilder.dumpPython
def dumpPython(process, name)
Definition: ConfigBuilder.py:93
AlCaRecoStreams_cff.SelectEvents
SelectEvents
Definition: AlCaRecoStreams_cff.py:450