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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1694 of file Config.py.

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

1733  def _place(self,label,process):
1734  process._placeSubProcess('subProcess',self)

◆ dumpPython()

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

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

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

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1721 of file Config.py.

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

Referenced by Types.InputTag.cppTag().

1721  def getProcessName(self):
1722  return self.__process.name_()
def getProcessName(pdgGen, requiredNumberOfGeneratedObjects)

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1735 of file Config.py.

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

1735  def getSubProcessPSet(self,parameterSet):
1736  topPSet = parameterSet.newPSet()
1737  self.__process.fillProcessDesc(topPSet)
1738  subProcessPSet = parameterSet.newPSet()
1739  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1740  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1741  subProcessPSet.addPSet(False,"process",topPSet)
1742  return subProcessPSet
1743 

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1727 of file Config.py.

References Config.SubProcess.__outputCommands.

1727  def outputCommands(self):
1728  return self.__outputCommands

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1723 of file Config.py.

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

1723  def process(self):
1724  return self.__process

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1725 of file Config.py.

References Config.SubProcess.__SelectEvents.

1725  def SelectEvents(self):
1726  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