12 from PyCool
import cool
15 dbSvc = cool.DatabaseSvcFactory.databaseService()
18 dbstring =
'sqlite://;schema=MDTDQMFOFFLINE_DEAD.db;dbname=MDT_DQA'
20 if os.access(
'MDTDQMFOFFLINE_DEAD.db', os.R_OK):
22 os.unlink(
'MDTDQMFOFFLINE_DEAD.db')
24 except Exception
as e:
25 print(
'Unable to remove existing db file, reason', e)
27 db = dbSvc.createDatabase(dbstring)
28 except Exception
as e:
29 print(
'Problem creating database', e)
33 spec2 = cool.RecordSpecification()
34 spec2.extend(
"Chamber_Name", cool.StorageType.String255)
35 spec2.extend(
"Dead_multilayer", cool.StorageType.String255)
36 spec2.extend(
"Dead_layer", cool.StorageType.String255)
37 spec2.extend(
"Dead_mezz", cool.StorageType.String255)
38 spec2.extend(
"Dead_asd", cool.StorageType.String255)
39 spec2.extend(
"Dead_tube", cool.StorageType.String4k)
41 desc =
"<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>"
48 folderSpec = cool.FolderSpecification(
49 cool.FolderVersioning.MULTI_VERSION, spec2)
51 "/OFFLINE/DQMFOFFLINE/DQMFOFFLINE_DEAD", folderSpec, desc,
True)