CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def dumpPython
 
def insertInto
 
def nameInProcessDesc_
 
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 which are connected via a temporary file.

Definition at line 1006 of file Config.py.

Constructor & Destructor Documentation

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

Definition at line 1011 of file Config.py.

1012  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1013  """
1014  """
1015  if not isinstance(process, Process):
1016  raise ValueError("the 'process' argument must be of type cms.Process")
1017  if not isinstance(SelectEvents,PSet):
1018  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1019  if not isinstance(outputCommands,vstring):
1020  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1021  self.__process = process
1022  self.__SelectEvents = SelectEvents
self.__outputCommands = outputCommands

Member Function Documentation

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

Definition at line 1034 of file Config.py.

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

Definition at line 1023 of file Config.py.

References cond.hash.

Referenced by Mixins._Parameterizable.__addParameter(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), and Mixins._Parameterizable.__setattr__().

1024  def dumpPython(self,options):
1025  out = "parentProcess"+str(hash(self))+" = process\n"
1026  out += self.__process.dumpPython()
1027  out += "childProcess = process\n"
1028  out += "process = parentProcess"+str(hash(self))+"\n"
1029  out += "process.subProcess = cms.SubProcess( process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +")\n"
return out
def Config.SubProcess.insertInto (   self,
  parameterSet,
  newlabel 
)

Definition at line 1036 of file Config.py.

References Config.SubProcess.nameInProcessDesc_().

1037  def insertInto(self,parameterSet, newlabel):
1038  topPSet = parameterSet.newPSet()
1039  self.__process.fillProcessDesc(topPSet)
1040  subProcessPSet = parameterSet.newPSet()
1041  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1042  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1043  subProcessPSet.addPSet(False,"process",topPSet)
1044  parameterSet.addPSet(False,self.nameInProcessDesc_("subProcess"), subProcessPSet)
def nameInProcessDesc_
Definition: Config.py:1032
def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

Definition at line 1032 of file Config.py.

Referenced by Mixins._TypedParameterizable.insertInto(), Config.SubProcess.insertInto(), and Types.EDAlias.insertInto().

1033  def nameInProcessDesc_(self,label):
return '@sub_process'
def nameInProcessDesc_
Definition: Config.py:1032
def Config.SubProcess.type_ (   self)

Definition at line 1030 of file Config.py.

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

1031  def type_(self):
return 'subProcess'

Member Data Documentation

Config.SubProcess.__outputCommands
private

Definition at line 1022 of file Config.py.

Config.SubProcess.__process
private

Definition at line 1020 of file Config.py.

Config.SubProcess.__SelectEvents
private

Definition at line 1021 of file Config.py.