CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Static Private Attributes
Modules._Module Class Reference
Inheritance diagram for Modules._Module:
Mixins._ConfigureComponent Mixins._TypedParameterizable Mixins._Labelable SequenceTypes._SequenceLeaf Mixins._Parameterizable SequenceTypes._Sequenceable Modules.EDAnalyzer Modules.EDFilter Modules.EDProducer Modules.OutputModule Modules.SwitchProducer Config.SwitchProducerTest Modules.SwitchProducerPickleable Modules.SwitchProducerTest Modules.SwitchProducerTest1Dis Modules.SwitchProducerTest2Dis

Public Member Functions

def __init__ (self, type_, *arg, **kargs)
 
def insertInto (self, parameterSet, myname)
 
def setPrerequisites (self, *libs)
 
- Public Member Functions inherited from Mixins._TypedParameterizable
def appendToProcessDescList_ (self, lst, myname)
 
def clone (self, *args, **params)
 
def copy (self)
 
def directDependencies (self)
 
def dumpConfig (self, options=PrintOptions())
 
def dumpPython (self, options=PrintOptions())
 
def dumpPythonAttributes (self, myname, options)
 
def moduleLabel_ (self, myname)
 
def nameInProcessDesc_ (self, myname)
 
def type_ (self)
 
- Public Member Functions inherited from Mixins._Parameterizable
def __delattr__ (self, name)
 
def __init__ (self, *arg, **kargs)
 
def __repr__ (self)
 
def __setattr__ (self, name, value)
 
def getParameter (self, params)
 
def hasParameter (self, params)
 
def insertContentsInto (self, parameterSet)
 
def isFrozen (self)
 
def isModified (self)
 
def parameterNames_ (self)
 
def parameters_ (self)
 
def setIsFrozen (self)
 
- Public Member Functions inherited from Mixins._Labelable
def __str__ (self)
 
def dumpSequenceConfig (self)
 
def dumpSequencePython (self, options=PrintOptions())
 
def hasLabel_ (self)
 
def label (self)
 
def label_ (self)
 
def setLabel (self, label)
 
- Public Member Functions inherited from SequenceTypes._SequenceLeaf
def __init__ (self)
 
def isLeaf (self)
 
- Public Member Functions inherited from SequenceTypes._Sequenceable
def __add__ (self, rhs)
 
def __invert__ (self)
 
def __mul__ (self, rhs)
 
def isOperation (self)
 
def resolve (self, processDict, keepIfCannotResolve=False)
 
def visitNode (self, visitor)
 

Private Member Functions

def _clonesequence (self, lookuptable)
 
def _errorstr (self)
 

Static Private Attributes

 __isStrict__
 

Detailed Description

base class for classes which denote framework event based 'modules'

Definition at line 134 of file Modules.py.

Constructor & Destructor Documentation

◆ __init__()

def Modules._Module.__init__ (   self,
  type_,
arg,
**  kargs 
)

Reimplemented from Mixins._TypedParameterizable.

Reimplemented in Modules.OutputModule, Modules.EDAnalyzer, Modules.EDFilter, and Modules.EDProducer.

Definition at line 137 of file Modules.py.

137  def __init__(self,type_,*arg,**kargs):
138  super(_Module,self).__init__(type_,*arg,**kargs)
139  if _Module.__isStrict__:
140  self.setIsFrozen()
141  saveOrigin(self, 2)

References Mixins.saveOrigin(), Mixins._ParameterTypeBase.setIsFrozen(), and Mixins._Parameterizable.setIsFrozen().

Member Function Documentation

◆ _clonesequence()

def Modules._Module._clonesequence (   self,
  lookuptable 
)
private

Reimplemented from SequenceTypes._Sequenceable.

Reimplemented in Modules.SwitchProducer.

Definition at line 142 of file Modules.py.

142  def _clonesequence(self, lookuptable):
143  try:
144  return lookuptable[id(self)]
145  except:
146  raise ModuleCloneError(self._errorstr())

References Modules._Module._errorstr(), and triggerObjects_cff.id.

◆ _errorstr()

def Modules._Module._errorstr (   self)
private

Reimplemented from SequenceTypes._Sequenceable.

Reimplemented in Modules.SwitchProducer.

Definition at line 147 of file Modules.py.

147  def _errorstr(self):
148  # return something like "EDAnalyzer("foo", ...)"
149  typename = format_typename(self)
150  return "%s('%s', ...)" %(typename, self.type_())
151 

Referenced by Modules._Module._clonesequence(), and Modules.SwitchProducer._clonesequence().

◆ insertInto()

def Modules._Module.insertInto (   self,
  parameterSet,
  myname 
)

Reimplemented from Mixins._TypedParameterizable.

Reimplemented in Modules.SwitchProducer.

Definition at line 155 of file Modules.py.

155  def insertInto(self, parameterSet, myname):
156  if "libraries_" in self.__dict__:
157  from ctypes import LibraryLoader, CDLL
158  import platform
159  loader = LibraryLoader(CDLL)
160  ext = platform.uname()[0] == "Darwin" and "dylib" or "so"
161  [loader.LoadLibrary("lib%s.%s" % (l, ext)) for l in self.libraries_]
162  super(_Module,self).insertInto(parameterSet,myname)
163 

◆ setPrerequisites()

def Modules._Module.setPrerequisites (   self,
libs 
)

Definition at line 152 of file Modules.py.

152  def setPrerequisites(self, *libs):
153  self.__dict__["libraries_"] = libs
154 

Member Data Documentation

◆ __isStrict__

Modules._Module.__isStrict__
staticprivate

Definition at line 136 of file Modules.py.

Mixins.saveOrigin
def saveOrigin(obj, level)
Definition: Mixins.py:682
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ExceptionHandling.format_typename
def format_typename(object)
Definition: ExceptionHandling.py:24