| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
GaudiProfiling.GenerateGaudiOpts.XmlDictObject Class Reference
Inheritance diagram for GaudiProfiling.GenerateGaudiOpts.XmlDictObject:
[legend]
Collaboration diagram for GaudiProfiling.GenerateGaudiOpts.XmlDictObject:
[legend]

## Public Member Functions
def | __init__ (self, initdict=None)
def | __getattr__ (self, item)
def | __setattr__ (self, item, value)
def | __str__ (self)
def | UnWrap (self)

## Static Public Member Functions
def | Wrap (x)

## Static Private Member Functions
def | _UnWrap (x)

## Detailed Description

    Adds object like functionality to the standard dictionary.

Definition at line 48 of file GenerateGaudiOpts.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__init__ | ( |  | self,
|  |  | initdict = `None`
| ) |  |

Definition at line 53 of file GenerateGaudiOpts.py.

53 def __init__(self, initdict=None):
54 if initdict is None:
55 initdict = {}
56 dict.__init__(self, initdict)
57

## Member Function Documentation

## ◆ __getattr__()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__getattr__ | ( |  | self,
|  |  | item
| ) |  |

Definition at line 58 of file GenerateGaudiOpts.py.

58 def __getattr__(self, item):
59 return self.__getitem__(item)
60

## ◆ __setattr__()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__setattr__ | ( |  | self,
|  |  | item,
|  |  | value
| ) |  |

Definition at line 61 of file GenerateGaudiOpts.py.

61 def __setattr__(self, item, value):
62 self.__setitem__(item, value)
63

## ◆ __str__()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.__str__ | ( |  | self | ) |

Definition at line 64 of file GenerateGaudiOpts.py.

64 def __str__(self):
65 if self.has_key('_text'):
66 return self.__getitem__('_text')
67 else:
68 return ''
69
GaudiPython.HistoUtils.__str__
__str__
Definition: HistoUtils.py:510

## ◆ _UnWrap()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject._UnWrap | ( |  | x | ) |
| static private

Definition at line 85 of file GenerateGaudiOpts.py.

85 def _UnWrap(x):
86 if isinstance(x, dict):
87 return dict(
88 (k, XmlDictObject._UnWrap(v)) for (k, v) in x.iteritems())
89 elif isinstance(x, list):
90 return [XmlDictObject._UnWrap(v) for v in x]
91 else:
92 return x
93

## ◆ UnWrap()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.UnWrap | ( |  | self | ) |

    Recursively converts an XmlDictObject to a standard dictionary and returns the result.

Definition at line 94 of file GenerateGaudiOpts.py.

94 def UnWrap(self):
95 """
96 Recursively converts an XmlDictObject to a standard dictionary and returns the result.
97 """
98
99 return XmlDictObject._UnWrap(self)
100
101

## ◆ Wrap()

def GaudiProfiling.GenerateGaudiOpts.XmlDictObject.Wrap | ( |  | x | ) |
| static

    Static method to wrap a dictionary recursively as an XmlDictObject

Definition at line 71 of file GenerateGaudiOpts.py.

71 def Wrap(x):
72 """
73 Static method to wrap a dictionary recursively as an XmlDictObject
74 """
75
76 if isinstance(x, dict):
77 return XmlDictObject(
78 (k, XmlDictObject.Wrap(v)) for (k, v) in x.iteritems())
79 elif isinstance(x, list):
80 return [XmlDictObject.Wrap(v) for v in x]
81 else:
82 return x
83

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

- GaudiProfiling/python/GaudiProfiling/GenerateGaudiOpts.py