Definition at line 43 of file AFPDBBase.py.
◆ __init__()
def AFPDBBase.AFPDBTableBase.__init__ |
( |
|
self | ) |
|
Definition at line 44 of file AFPDBBase.py.
47 self.iovStartLumiBlock = 0
49 self.iovEndLumiBlock = 0
51 self.tag =
"AFPTest-00-00-00"
52 self.folderName =
"/FWD/AFP/TEST"
53 self.spec = cool.RecordSpecification()
55 self.spec.
extend(
"data", cool.StorageType.String16M)
57 self.desc =
'<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type="71" clid="40774348" /></addrHeader><typeName>AthenaAttributeList</typeName>'
58 self.data = cool.Record(self.spec)
59 self.folderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, self.spec)
◆ createOrGetFolder()
def AFPDBBase.AFPDBTableBase.createOrGetFolder |
( |
|
self, |
|
|
|
db |
|
) |
| |
Definition at line 110 of file AFPDBBase.py.
110 def createOrGetFolder (self, db):
111 print (self.folderSpec)
112 if(db.existsFolder(self.folderName)):
113 self.folder=db.getFolder(self.folderName)
115 self.folder=db.createFolder(self.folderName, self.folderSpec, self.desc,
True)
◆ saveToDB()
def AFPDBBase.AFPDBTableBase.saveToDB |
( |
|
self | ) |
|
Definition at line 101 of file AFPDBBase.py.
102 self.data[
'data'] = self.serialiseTable()
103 iovStart=(self.iovStartRun<<32) + self.iovStartLumiBlock
104 print (
"before self.iovEndRun=" +
str(self.iovEndRun))
105 iovEnd=(self.iovEndRun<<32) + self.iovEndLumiBlock
106 print (
"after self.iovEndRun=" +
str(self.iovEndRun))
108 self.folder.storeObject(iovStart, iovEnd, self.data, 0, self.tag)
◆ serialiseHeader()
def AFPDBBase.AFPDBTableBase.serialiseHeader |
( |
|
self | ) |
|
Definition at line 63 of file AFPDBBase.py.
63 def serialiseHeader (self):
64 output =
'"node_description": '
66 output +=
'"<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\\"71\\" clid=\\"40774348\\" /></addrHeader><typeName>AthenaAttributeList</typeName> "'
◆ serialiseRecords()
def AFPDBBase.AFPDBTableBase.serialiseRecords |
( |
|
self | ) |
|
Definition at line 70 of file AFPDBBase.py.
70 def serialiseRecords (self):
71 output =
'"data_array": ['
72 if (len(self.records) > 0):
75 for entry
in self.records:
77 output +=
'"' +
str(channelID) +
'" : '
78 output += entry.serialiseValues()
◆ serialiseTable()
def AFPDBBase.AFPDBTableBase.serialiseTable |
( |
|
self | ) |
|
Definition at line 89 of file AFPDBBase.py.
89 def serialiseTable (self):
90 if (len(self.records) < 1):
91 raise ValueError (
"Empty records list. Please, fill records before serialising table.")
94 output += self.serialiseHeader() +
', '
95 output += self.records[0].serialiseTypes() +
', '
96 output += self.serialiseRecords()
◆ data
AFPDBBase.AFPDBTableBase.data |
◆ desc
AFPDBBase.AFPDBTableBase.desc |
◆ folder
AFPDBBase.AFPDBTableBase.folder |
◆ folderName
AFPDBBase.AFPDBTableBase.folderName |
◆ folderSpec
AFPDBBase.AFPDBTableBase.folderSpec |
◆ iovEndLumiBlock
AFPDBBase.AFPDBTableBase.iovEndLumiBlock |
◆ iovEndRun
AFPDBBase.AFPDBTableBase.iovEndRun |
◆ iovStartLumiBlock
AFPDBBase.AFPDBTableBase.iovStartLumiBlock |
◆ iovStartRun
AFPDBBase.AFPDBTableBase.iovStartRun |
◆ records
AFPDBBase.AFPDBTableBase.records |
◆ spec
AFPDBBase.AFPDBTableBase.spec |
◆ tag
AFPDBBase.AFPDBTableBase.tag |
The documentation for this class was generated from the following file: