CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Config.SubProcess Class Reference
Inheritance diagram for Config.SubProcess:

Public Member Functions

def __init__
 
def dumpPython
 
def getProcessName
 
def getSubProcessPSet
 
def nameInProcessDesc_
 
def outputCommands
 
def process
 
def SelectEvents
 
def type_
 

Private Member Functions

def _place
 

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 1546 of file Config.py.

Constructor & Destructor Documentation

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

Definition at line 1551 of file Config.py.

1552  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1553  """
1554  """
1555  if not isinstance(process, Process):
1556  raise ValueError("the 'process' argument must be of type cms.Process")
1557  if not isinstance(SelectEvents,PSet):
1558  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1559  if not isinstance(outputCommands,vstring):
1560  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1561  self.__process = process
1562  self.__SelectEvents = SelectEvents
1563  self.__outputCommands = outputCommands
1564  # Need to remove MessageLogger from the subprocess now that MessageLogger is always present
1565  if self.__process.MessageLogger is not MessageLogger:
1566  print("""Warning: You have reconfigured service
1567 'edm::MessageLogger' in a subprocess.
1568 This service has already been configured.
1569 This particular service may not be reconfigured in a subprocess.
1570 The reconfiguration will be ignored.""")
del self.__process.MessageLogger
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Function Documentation

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

Definition at line 1590 of file Config.py.

1591  def _place(self,label,process):
process._placeSubProcess('subProcess',self)
def Config.SubProcess.dumpPython (   self,
  options = PrintOptions() 
)

Definition at line 1571 of file Config.py.

References 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__().

1572  def dumpPython(self, options=PrintOptions()):
1573  out = "parentProcess"+str(hash(self))+" = process\n"
1574  out += self.__process.dumpPython()
1575  out += "childProcess = process\n"
1576  out += "process = parentProcess"+str(hash(self))+"\n"
1577  out += "process.addSubProcess(cms.SubProcess(process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +"))"
return out
#define str(s)
def Config.SubProcess.getProcessName (   self)

Definition at line 1578 of file Config.py.

Referenced by Types.InputTag.cppTag().

1579  def getProcessName(self):
return self.__process.name_()
def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1592 of file Config.py.

1593  def getSubProcessPSet(self,parameterSet):
1594  topPSet = parameterSet.newPSet()
1595  self.__process.fillProcessDesc(topPSet)
1596  subProcessPSet = parameterSet.newPSet()
1597  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1598  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1599  subProcessPSet.addPSet(False,"process",topPSet)
1600  return subProcessPSet
def getSubProcessPSet
Definition: Config.py:1592
def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

Definition at line 1588 of file Config.py.

Referenced by Mixins._TypedParameterizable.appendToProcessDescList_(), Types.EDAlias.appendToProcessDescList_(), ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto(), Modules.SwitchProducer.insertInto(), Mixins._TypedParameterizable.insertInto(), and Types.EDAlias.insertInto().

1589  def nameInProcessDesc_(self,label):
return label
def nameInProcessDesc_
Definition: Config.py:1588
def Config.SubProcess.outputCommands (   self)

Definition at line 1584 of file Config.py.

References Config.SubProcess.__outputCommands.

1585  def outputCommands(self):
return self.__outputCommands
def Config.SubProcess.process (   self)

Definition at line 1580 of file Config.py.

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

1581  def process(self):
return self.__process
def Config.SubProcess.SelectEvents (   self)

Definition at line 1582 of file Config.py.

References Config.SubProcess.__SelectEvents.

1583  def SelectEvents(self):
return self.__SelectEvents
def Config.SubProcess.type_ (   self)

Definition at line 1586 of file Config.py.

Referenced by Modules.Service.__str__(), Modules.Service._placeImpl(), Modules.ESSource._placeImpl(), Modules.ESProducer._placeImpl(), Modules.ESPrefer.copy(), Mixins._TypedParameterizable.dumpPython(), Modules.ESPrefer.dumpPythonAs(), Modules.Service.dumpSequencePython(), RandomRunSource.RandomRunSource.insertInto(), Modules.Service.insertInto(), ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto(), Mixins._TypedParameterizable.insertInto(), Modules.ESSource.moduleLabel_(), Modules.ESProducer.moduleLabel_(), Modules.ESSource.nameInProcessDesc_(), Modules.ESProducer.nameInProcessDesc_(), and Modules.ESPrefer.nameInProcessDesc_().

1587  def type_(self):
return 'subProcess'

Member Data Documentation

Config.SubProcess.__outputCommands
private

Definition at line 1562 of file Config.py.

Referenced by Config.SubProcess.outputCommands().

Config.SubProcess.__process
private

Definition at line 1560 of file Config.py.

Referenced by Config.SubProcess.process().

Config.SubProcess.__SelectEvents
private

Definition at line 1561 of file Config.py.

Referenced by Config.SubProcess.SelectEvents().