The Gaudi Framework  v36r1 (3e2fb5a8)
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__
 
 __loader__
 

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  self.__loader__ = None
34 

Member Function Documentation

◆ __getattr__()

def Gaudi._ConfigurablesModule.__getattr__ (   self,
  name 
)

Definition at line 35 of file __init__.py.

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

Member Data Documentation

◆ __loader__

Gaudi._ConfigurablesModule.__loader__
private

Definition at line 33 of file __init__.py.

◆ __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:
Gaudi.CommonGaudiConfigurables
Definition: CommonGaudiConfigurables.py:1
Gaudi.Configuration
Definition: Configuration.py:1