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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1705 of file Config.py.

1705  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1706  """
1707  """
1708  if not isinstance(process, Process):
1709  raise ValueError("the 'process' argument must be of type cms.Process")
1710  if not isinstance(SelectEvents,PSet):
1711  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1712  if not isinstance(outputCommands,vstring):
1713  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1714  self.__process = process
1715  self.__SelectEvents = SelectEvents
1716  self.__outputCommands = outputCommands
1717  # Need to remove MessageLogger from the subprocess now that MessageLogger is always present
1718  if self.__process.MessageLogger is not MessageLogger:
1719  print("""Warning: You have reconfigured service
1720 'edm::MessageLogger' in a subprocess.
1721 This service has already been configured.
1722 This particular service may not be reconfigured in a subprocess.
1723 The reconfiguration will be ignored.""")
1724  del self.__process.MessageLogger
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Function Documentation

◆ _place()

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

Definition at line 1744 of file Config.py.

1744  def _place(self,label,process):
1745  process._placeSubProcess('subProcess',self)

◆ dumpPython()

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

Definition at line 1725 of file Config.py.

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

1725  def dumpPython(self, options=PrintOptions()):
1726  out = "parentProcess"+str(hash(self))+" = process\n"
1727  out += self.__process.dumpPython()
1728  out += "childProcess = process\n"
1729  out += "process = parentProcess"+str(hash(self))+"\n"
1730  out += "process.addSubProcess(cms.SubProcess(process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +"))"
1731  return out
def dumpPython(process, name)
#define str(s)

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1732 of file Config.py.

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

Referenced by Types.InputTag.cppTag().

1732  def getProcessName(self):
1733  return self.__process.name_()
def getProcessName(pdgGen, requiredNumberOfGeneratedObjects)

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1746 of file Config.py.

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

1746  def getSubProcessPSet(self,parameterSet):
1747  topPSet = parameterSet.newPSet()
1748  self.__process.fillProcessDesc(topPSet)
1749  subProcessPSet = parameterSet.newPSet()
1750  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1751  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1752  subProcessPSet.addPSet(False,"process",topPSet)
1753  return subProcessPSet
1754 

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1738 of file Config.py.

References Config.SubProcess.__outputCommands.

1738  def outputCommands(self):
1739  return self.__outputCommands

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1734 of file Config.py.

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

1734  def process(self):
1735  return self.__process

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1736 of file Config.py.

References Config.SubProcess.__SelectEvents.

1736  def SelectEvents(self):
1737  return self.__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