43 from __future__
import print_function
44 import cppyy
as PyLCGDict
49 if type(t)
is str : t = PyLCGDict.makeClass(t)
56 ip = PyLCGDict.libPyROOT.MakeNullPointer(self.
type)
57 if obj._isvc.queryInterface(self.
type.interfaceID(), ip).isSuccess() :
67 begin = string.find(self.
descr, start)
70 end = string.find(self.
descr, stop)
72 if begin < len(self.
descr)
and end < len(self.
descr) :
73 result = self.
descr[begin:end]
75 result =
"Unable to find: " + start +
", " + stop
82 pers = theApp.service(
'EventPersistencySvc')
86 self.
icnv = iConverter.cast(pers)
90 self.
iaddr = iAddrCreator.cast(pers)
93 self.
dbCast = PyLCGDict.makeClass(
'DataBucketCast')
101 del libPyROOT.const_iterator
102 except AttributeError:
106 del libPyROOT.iterator
107 except AttributeError:
115 self.
typeName = decoder.extract(
'<typeName>',
'</typeName>')
118 self.
header = decoder.extract(
'<addrHeader>',
'</addrHeader>')
119 self.
header +=
'POOLContainer_CondAttrListCollection][CLID=x'
125 ioa = PyLCGDict.libPyROOT.MakeNullPointer(
'IOpaqueAddress')
128 dbb = PyLCGDict.libPyROOT.MakeNullPointer(
'DataBucketBase')
134 self.
icnv.createObj(ioa, dbb)
137 result = PyLCGDict.libPyROOT.MakeNullPointer(self.
type)
151 print(
"Channels, IOV, and string addresses")
153 for chan
in channels :
155 print(
"added chan/iov: ", chan, iov.iovPrint())
166 print(
"Create IOpaqueAddress pointer")
167 ioa = PyLCGDict.libPyROOT.MakeNullPointer(
'GenericAddress')
170 print(
"Create DataBucketBase pointer")
171 dbb = PyLCGDict.libPyROOT.MakeNullPointer(
'DataBucketBase')
174 print(
"Create IOpaqueAddress for address list")
175 sc = self.
iaddr.createAddress( 0, 0, strAddress, ioa )
176 print(
"Status code: ", sc)
179 CondAttrListCollAddress = PyLCGDict.makeClass(
'CondAttrListCollAddress')
181 collAddr.setAttrListColl(attrListColl)
185 print(
"Retrieve data object for IOA")
186 sc = self.
icnv.createObj(collAddr, dbb)
187 print(
"Status code: ", sc)
188 if sc.isFailure():
raise RuntimeError(
"Cannot read object")
192 result = PyLCGDict.libPyROOT.MakeNullPointer(self.
type)