ATLAS Offline Software
Loading...
Searching...
No Matches
AFPDBBase.AFPDBRecordBase Class Reference
Inheritance diagram for AFPDBBase.AFPDBRecordBase:
Collaboration diagram for AFPDBBase.AFPDBRecordBase:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 serialiseValues (self)
 serialiseTypes (self)
 translateType (self, typeName)

Detailed Description

Definition at line 7 of file AFPDBBase.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Member Function Documentation

◆ serialiseTypes()

AFPDBBase.AFPDBRecordBase.serialiseTypes ( self)

Definition at line 20 of file AFPDBBase.py.

20 def serialiseTypes (self):
21 output = '"folder_payloadspec": "'
22 for quantity in dir(self): # loop over all elements in class
23 if not callable(getattr(self, quantity)) and not quantity.startswith('__'): # select only user variables
24 output += quantity + ': ' + self.translateType(type(getattr(self, quantity))) + ', ' # append variable name and type
25
26 output = output[:-2] # remove the last comma and space ", "
27 output += '"' # close parenthisis
28
29 return output
30

◆ serialiseValues()

AFPDBBase.AFPDBRecordBase.serialiseValues ( self)

Definition at line 8 of file AFPDBBase.py.

8 def serialiseValues (self):
9 output = "["
10 for quantity in dir(self): # loop over all elements in class
11 if not callable(getattr(self, quantity)) and not quantity.startswith("__"): # select only user variables
12 # print ("Moj " + quantity + " wynosi: " + str(getattr(self, quantity)))
13 output += str(getattr(self, quantity)) + ", "
14
15 output = output[:-2] # remove the last comma and space ", "
16 output += "]" # close bracket
17
18 return output
19

◆ translateType()

AFPDBBase.AFPDBRecordBase.translateType ( self,
typeName )

Definition at line 31 of file AFPDBBase.py.

31 def translateType (self, typeName):
32 if (typeName == int):
33 return "Int32"
34 elif (typeName == float):
35 return "Float"
36 elif (typeName == str):
37 return "String"
38 else:
39 raise ValueError ("Unknown type of field, typeName is %s. Need to update method translateType in AFPDBBase.py" % typeName)
40
41

The documentation for this class was generated from the following file: