ATLAS Offline Software
AtlRunQueryFastBlobRead.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2 
3 
4 import cppyy
5 cppyy.gbl.cool.IDatabase # force the load of the dictionary (to stay on the safe side)
6 from cppyy import gbl
7 
8 def blob_read(self, size = -1):
9  if size < 0:
10  endpos = self.size()
11  else:
12  endpos = self.pos + size
13  beginpos = self.pos
14  self.pos = endpos
15  buf = self.startingAddress()
16  buf.SetSize(self.size())
17  return buf[beginpos:endpos]
18 
19 # add the new functions
20 getattr(gbl,"coral::Blob").read = blob_read
python.utils.AtlRunQueryFastBlobRead.blob_read
def blob_read(self, size=-1)
Definition: AtlRunQueryFastBlobRead.py:8