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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1706 of file Config.py.

1706  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1707  """
1708  """
1709  if not isinstance(process, Process):
1710  raise ValueError("the 'process' argument must be of type cms.Process")
1711  if not isinstance(SelectEvents,PSet):
1712  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1713  if not isinstance(outputCommands,vstring):
1714  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1715  self.__process = process
1716  self.__SelectEvents = SelectEvents
1717  self.__outputCommands = outputCommands
1718  # Need to remove MessageLogger from the subprocess now that MessageLogger is always present
1719  if self.__process.MessageLogger is not MessageLogger:
1720  print("""Warning: You have reconfigured service
1721 'edm::MessageLogger' in a subprocess.
1722 This service has already been configured.
1723 This particular service may not be reconfigured in a subprocess.
1724 The reconfiguration will be ignored.""")
1725  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 1745 of file Config.py.

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

◆ dumpPython()

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

Definition at line 1726 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__().

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

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1733 of file Config.py.

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

Referenced by Types.InputTag.cppTag().

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

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1747 of file Config.py.

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

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

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1739 of file Config.py.

References Config.SubProcess.__outputCommands.

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

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1735 of file Config.py.

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

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

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1737 of file Config.py.

References Config.SubProcess.__SelectEvents.

1737  def SelectEvents(self):
1738  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