4 from __future__
import print_function
6 from PyCool
import cool
11 for quantity
in dir(self):
12 if not callable(getattr(self, quantity))
and not quantity.startswith(
"__"):
14 output +=
str(getattr(self, quantity)) +
", "
22 output =
'"folder_payloadspec": "'
23 for quantity
in dir(self):
24 if not callable(getattr(self, quantity))
and not quantity.startswith(
'__'):
25 output += quantity +
': ' + self.
translateType(
type(getattr(self, quantity))) +
', '
35 elif (typeName == float):
37 elif (typeName == str):
40 raise ValueError (
"Unknown type of field, typeName is %s. Need to update method translateType in AFPDBBase.py" % typeName)
51 self.
tag =
"AFPTest-00-00-00"
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>'
59 self.
folderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, self.
spec)
64 output =
'"node_description": '
66 output +=
'"<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\\"71\\" clid=\\"40774348\\" /></addrHeader><typeName>AthenaAttributeList</typeName> "'
71 output =
'"data_array": ['
77 output +=
'"' +
str(channelID) +
'" : '
78 output += entry.serialiseValues()
91 raise ValueError (
"Empty records list. Please, fill records before serialising table.")
95 output += self.
records[0].serialiseTypes() +
', '
108 self.
folder.storeObject(iovStart, iovEnd, self.
data, 0, self.
tag)