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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1698 of file Config.py.

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

1737  def _place(self,label,process):
1738  process._placeSubProcess('subProcess',self)

◆ dumpPython()

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

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

1718  def dumpPython(self, options=PrintOptions()):
1719  out = "parentProcess"+str(hash(self))+" = process\n"
1720  out += self.__process.dumpPython()
1721  out += "childProcess = process\n"
1722  out += "process = parentProcess"+str(hash(self))+"\n"
1723  out += "process.addSubProcess(cms.SubProcess(process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +"))"
1724  return out
def dumpPython(process, name)
#define str(s)

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1725 of file Config.py.

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

Referenced by Types.InputTag.cppTag().

1725  def getProcessName(self):
1726  return self.__process.name_()
def getProcessName(pdgGen, requiredNumberOfGeneratedObjects)

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1739 of file Config.py.

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

1739  def getSubProcessPSet(self,parameterSet):
1740  topPSet = parameterSet.newPSet()
1741  self.__process.fillProcessDesc(topPSet)
1742  subProcessPSet = parameterSet.newPSet()
1743  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1744  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1745  subProcessPSet.addPSet(False,"process",topPSet)
1746  return subProcessPSet
1747 

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1731 of file Config.py.

References Config.SubProcess.__outputCommands.

1731  def outputCommands(self):
1732  return self.__outputCommands

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1727 of file Config.py.

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

1727  def process(self):
1728  return self.__process

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1729 of file Config.py.

References Config.SubProcess.__SelectEvents.

1729  def SelectEvents(self):
1730  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