SND@LHC Software
Loading...
Searching...
No Matches
ShipGeoConfig.AttrDict Class Reference
Inheritance diagram for ShipGeoConfig.AttrDict:
Collaboration diagram for ShipGeoConfig.AttrDict:

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 clone (self)
 

Private Attributes

 __dict__
 

Detailed Description

dict class that can address its keys as fields, e.g.
d['key'] = 1
assert d.key == 1

Definition at line 94 of file ShipGeoConfig.py.

Constructor & Destructor Documentation

◆ __init__()

ShipGeoConfig.AttrDict.__init__ (   self,
args,
**  kwargs 
)

Reimplemented in ShipGeoConfig.Config.

Definition at line 100 of file ShipGeoConfig.py.

100 def __init__(self, *args, **kwargs):
101 super(AttrDict, self).__init__(*args, **kwargs)
102 self.__dict__ = self
103

Member Function Documentation

◆ clone()

ShipGeoConfig.AttrDict.clone (   self)

Reimplemented in ShipGeoConfig.Config.

Definition at line 104 of file ShipGeoConfig.py.

104 def clone(self):
105 result = AttrDict()
106 for k, v in self.items():
107 if isinstance(v, AttrDict):
108 result[k] = v.clone()
109 else:
110 result[k] = v
111 return result
112
113

Member Data Documentation

◆ __dict__

ShipGeoConfig.AttrDict.__dict__
private

Definition at line 102 of file ShipGeoConfig.py.


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