CaloBlobReader is a helper class, managing the details of COOL interactions
Definition at line 271 of file CaloCondTools.py.
◆ __init__()
def python.CaloCondTools.CaloBlobReader.__init__ |
( |
|
self, |
|
|
|
db, |
|
|
|
folder, |
|
|
|
tag = "" |
|
) |
| |
Input:
- db : db should be an open database connection
- folder: full folder path
- tag : The folder tag, e.g. \"000-00\"
Definition at line 277 of file CaloCondTools.py.
277 def __init__(self, db, folder, tag=""):
280 - db : db should be an open database connection
281 - folder: full folder path
282 - tag : The folder tag, e.g. \"000-00\"
285 CaloCondLogger.__init__(self,
"CaloBlobReader")
290 self.__folder = self.__db.getFolder(folder)
291 except Exception
as e:
292 self.log().critical( e )
296 validFolderTypes = (
"run-lumi",
"time")
299 if self.__folderType
not in validFolderTypes:
300 raise Exception(
"Invalid folder type found: \'%s\'" % self.__folderType)
◆ folderIsMultiVersion()
def python.CaloCondTools.CaloBlobReader.folderIsMultiVersion |
( |
|
self | ) |
|
Returns true if MultiVersion folder is connected
Definition at line 343 of file CaloCondTools.py.
343 def folderIsMultiVersion(self):
345 Returns true if MultiVersion folder is connected
347 if self.__folder.versioningMode()==cool.FolderVersioning.MULTI_VERSION:
◆ getCells()
def python.CaloCondTools.CaloBlobReader.getCells |
( |
|
self, |
|
|
|
systemId, |
|
|
|
pointInTime |
|
) |
| |
Returns a CaloCondBlob object for the given system.
Definition at line 310 of file CaloCondTools.py.
310 def getCells(self, systemId, pointInTime):
312 Returns a CaloCondBlob object for the given system.
316 self.log().
debug(
"Validity key is %s", validityKey)
319 key = (systemId,validityKey)
320 obj = self.__objDict.
get(key)
323 channelId = cool.ChannelId(systemId)
324 obj = self.__folder.findObject(validityKey, channelId, self.__tag)
325 self.log().
debug(
"Fetching from DB: %s", obj)
326 blob = obj.payload()[0]
327 self.log().
debug(
"blob size: %d", blob.size())
329 self.__objDict[key] = obj
331 blob = obj.payload()[0]
332 self.log().
debug(
"blob size: %d", blob.size())
335 flt = g.CaloCondBlobFlt.getInstance(blob)
337 except Exception
as e:
338 self.log().
error(
"Fetching of systemId=%i failed with exception %s",systemId,e)
◆ __db
python.CaloCondTools.CaloBlobReader.__db |
|
private |
◆ __folder
python.CaloCondTools.CaloBlobReader.__folder |
|
private |
◆ __folderType
python.CaloCondTools.CaloBlobReader.__folderType |
|
private |
◆ __objDict
python.CaloCondTools.CaloBlobReader.__objDict |
|
private |
◆ __tag
python.CaloCondTools.CaloBlobReader.__tag |
|
private |
The documentation for this class was generated from the following file: