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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 1657 of file Config.py.

1657  def __init__(self,process, SelectEvents = untracked.PSet(), outputCommands = untracked.vstring()):
1658  """
1659  """
1660  if not isinstance(process, Process):
1661  raise ValueError("the 'process' argument must be of type cms.Process")
1662  if not isinstance(SelectEvents,PSet):
1663  raise ValueError("the 'SelectEvents' argument must be of type cms.untracked.PSet")
1664  if not isinstance(outputCommands,vstring):
1665  raise ValueError("the 'outputCommands' argument must be of type cms.untracked.vstring")
1666  self.__process = process
1667  self.__SelectEvents = SelectEvents
1668  self.__outputCommands = outputCommands
1669  # Need to remove MessageLogger from the subprocess now that MessageLogger is always present
1670  if self.__process.MessageLogger is not MessageLogger:
1671  print("""Warning: You have reconfigured service
1672 'edm::MessageLogger' in a subprocess.
1673 This service has already been configured.
1674 This particular service may not be reconfigured in a subprocess.
1675 The reconfiguration will be ignored.""")
1676  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 1696 of file Config.py.

1696  def _place(self,label,process):
1697  process._placeSubProcess('subProcess',self)

◆ dumpPython()

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

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

1677  def dumpPython(self, options=PrintOptions()):
1678  out = "parentProcess"+str(hash(self))+" = process\n"
1679  out += self.__process.dumpPython()
1680  out += "childProcess = process\n"
1681  out += "process = parentProcess"+str(hash(self))+"\n"
1682  out += "process.addSubProcess(cms.SubProcess(process = childProcess, SelectEvents = "+self.__SelectEvents.dumpPython(options) +", outputCommands = "+self.__outputCommands.dumpPython(options) +"))"
1683  return out
def dumpPython(process, name)
#define str(s)

◆ getProcessName()

def Config.SubProcess.getProcessName (   self)

Definition at line 1684 of file Config.py.

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

Referenced by Types.InputTag.cppTag().

1684  def getProcessName(self):
1685  return self.__process.name_()
def getProcessName(pdgGen, requiredNumberOfGeneratedObjects)

◆ getSubProcessPSet()

def Config.SubProcess.getSubProcessPSet (   self,
  parameterSet 
)

Definition at line 1698 of file Config.py.

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

1698  def getSubProcessPSet(self,parameterSet):
1699  topPSet = parameterSet.newPSet()
1700  self.__process.fillProcessDesc(topPSet)
1701  subProcessPSet = parameterSet.newPSet()
1702  self.__SelectEvents.insertInto(subProcessPSet,"SelectEvents")
1703  self.__outputCommands.insertInto(subProcessPSet,"outputCommands")
1704  subProcessPSet.addPSet(False,"process",topPSet)
1705  return subProcessPSet
1706 

◆ nameInProcessDesc_()

def Config.SubProcess.nameInProcessDesc_ (   self,
  label 
)

◆ outputCommands()

def Config.SubProcess.outputCommands (   self)

Definition at line 1690 of file Config.py.

References Config.SubProcess.__outputCommands.

1690  def outputCommands(self):
1691  return self.__outputCommands

◆ process()

def Config.SubProcess.process (   self)

Definition at line 1686 of file Config.py.

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

1686  def process(self):
1687  return self.__process

◆ SelectEvents()

def Config.SubProcess.SelectEvents (   self)

Definition at line 1688 of file Config.py.

References Config.SubProcess.__SelectEvents.

1688  def SelectEvents(self):
1689  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