ATLAS Offline Software
Loading...
Searching...
No Matches
AtlRunQueryFastBlobRead.py
Go to the documentation of this file.
1# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3
4import cppyy
5cppyy.gbl.cool.IDatabase # force the load of the dictionary (to stay on the safe side)
6from cppyy import gbl
7
8def 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
20getattr(gbl,"coral::Blob").read = blob_read