5 from PyCool
import cool
10 for quantity
in dir(self):
11 if not callable(getattr(self, quantity))
and not quantity.startswith(
"__"):
13 output +=
str(getattr(self, quantity)) +
", "
21 output =
'"folder_payloadspec": "'
22 for quantity
in dir(self):
23 if not callable(getattr(self, quantity))
and not quantity.startswith(
'__'):
24 output += quantity +
': ' + self.
translateType(
type(getattr(self, quantity))) +
', '
34 elif (typeName == float):
36 elif (typeName == str):
39 raise ValueError (
"Unknown type of field, typeName is %s. Need to update method translateType in AFPDBBase.py" % typeName)
50 self.
tag =
"AFPTest-00-00-00"
52 self.
spec = cool.RecordSpecification()
54 self.
spec.
extend(
"data", cool.StorageType.String16M)
56 self.
desc =
'<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type="71" clid="40774348" /></addrHeader><typeName>AthenaAttributeList</typeName>'
58 self.
folderSpec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, self.
spec)
63 output =
'"node_description": '
65 output +=
'"<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\\"71\\" clid=\\"40774348\\" /></addrHeader><typeName>AthenaAttributeList</typeName> "'
70 output =
'"data_array": ['
76 output +=
'"' +
str(channelID) +
'" : '
77 output += entry.serialiseValues()
90 raise ValueError (
"Empty records list. Please, fill records before serialising table.")
94 output += self.
records[0].serialiseTypes() +
', '
107 self.
folder.storeObject(iovStart, iovEnd, self.
data, 0, self.
tag)