The Gaudi Framework  master (cc9a61f4)
Loading...
Searching...
No Matches
GaudiConfig2._db Namespace Reference

Classes

class  ConfDB2
class  ConfigurablesDB

Functions

 _normalize_cpp_type_name (name)
 split_namespace (typename)

Variables

 _DB = ConfDB2()
 _TRANS_TABLE = str.maketrans("<>&*,: ().", "__rp__s___")

Function Documentation

◆ _normalize_cpp_type_name()

GaudiConfig2._db._normalize_cpp_type_name ( name)
protected
Translate a C++ type name (with templates etc.) to Python identifier.

Definition at line 70 of file _db.py.

70def _normalize_cpp_type_name(name):
71 """
72 Translate a C++ type name (with templates etc.) to Python identifier.
73 """
74 return name.replace(", ", ",").translate(_TRANS_TABLE)
75
76

◆ split_namespace()

GaudiConfig2._db.split_namespace ( typename)
Split a C++ qualified namespace in the tuple (top_namespace, rest) starting
searching the separator from pos.

>>> split_namespace('std::chrono::time_point')
('std', 'chrono::time_point')

Definition at line 77 of file _db.py.

77def split_namespace(typename):
78 """
79 Split a C++ qualified namespace in the tuple (top_namespace, rest) starting
80 searching the separator from pos.
81
82 >>> split_namespace('std::chrono::time_point')
83 ('std', 'chrono::time_point')
84 """
85 # find next namespace separator skipping template arguments
86 tpos = typename.find("<")
87 pos = typename.find("::")
88 # '<' can appear only in a class name, if we find a '::'
89 # earlier than a '<', then we got a namespace, else a class
90 if pos > 0 and (tpos < 0 or pos < tpos):
91 head = typename[:pos]
92 tail = typename[pos + 2 :]
93 else:
94 head = None
95 tail = typename
96 return (head, tail)
97
98

Variable Documentation

◆ _DB

GaudiConfig2._db._DB = ConfDB2()
protected

Definition at line 64 of file _db.py.

◆ _TRANS_TABLE

GaudiConfig2._db._TRANS_TABLE = str.maketrans("<>&*,: ().", "__rp__s___")
protected

Definition at line 67 of file _db.py.