The Gaudi Framework  v33r0 (d5ea422b)
Gaudi._ConfigurablesModule Class Reference
Inheritance diagram for Gaudi._ConfigurablesModule:
Collaboration diagram for Gaudi._ConfigurablesModule:

Public Member Functions

def __init__ (self)
 
def __getattr__ (self, name)
 

Public Attributes

 ignoreMissingConfigurables
 

Private Attributes

 __name__
 

Detailed Description

Definition at line 27 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def Gaudi._ConfigurablesModule.__init__ (   self)

Definition at line 29 of file __init__.py.

29  def __init__(self):
30  # If set to true, does not raise an AttributeError if the configurable is not found.
31  self.ignoreMissingConfigurables = False
32  self.__name__ = __configurables_module_fullname__
33 

Member Function Documentation

◆ __getattr__()

def Gaudi._ConfigurablesModule.__getattr__ (   self,
  name 
)

Definition at line 34 of file __init__.py.

34  def __getattr__(self, name):
35  # trigger the load of the configurables database
36  from Gaudi.Configuration import confDbGetConfigurable, cfgDb
37  from Gaudi.CommonGaudiConfigurables import aliases
38  # return value
39  retval = None
40  # handle the special cases (needed for modules): __all__, __path__
41  if name == "__all__":
42  retval = cfgDb.keys()
43  elif name == "__path__":
44  raise AttributeError("'module' object has no attribute '__path__'")
45  elif name in cfgDb.keys(): # ignore private names
46  retval = confDbGetConfigurable(name)
47  elif name in aliases: # special case of aliases
48  retval = aliases[name]
49  elif self.ignoreMissingConfigurables:
50  import logging
51  logging.getLogger(__configurables_module_fullname__).warning(
52  'Configurable class %s not in database', name)
53  else:
54  # We raise an AttributeError exception if the configurable could not be found
55  # to respect the Python semantic.
56  raise AttributeError("module '%s' does not have attribute '%s'" %
57  (__configurables_module_fullname__, name))
58  return retval
59 
60 
61 # install the facade module instance as a module

Member Data Documentation

◆ __name__

Gaudi._ConfigurablesModule.__name__
private

Definition at line 32 of file __init__.py.

◆ ignoreMissingConfigurables

Gaudi._ConfigurablesModule.ignoreMissingConfigurables

Definition at line 31 of file __init__.py.


The documentation for this class was generated from the following file: