8 from __future__
import print_function
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)
57 from PyCool
import cool
60 dbSvc = cool.DatabaseSvcFactory.databaseService()
63 dbstring =
'sqlite://;schema=MDTDQMFOFFLINE_NOISY.db;dbname=MDT_DQA'
65 if os.access(
'MDTDQMFOFFLINE_NOISY.db', os.R_OK):
67 os.unlink(
'MDTDQMFOFFLINE_NOISY.db')
68 except Exception
as e:
69 print(
'Unable to remove existing db file, reason', e)
71 db = dbSvc.createDatabase(dbstring)
72 except Exception
as e:
73 print(
'Problem creating database', e)
77 spec2 = cool.RecordSpecification()
78 spec2.extend(
"Chamber_Name", cool.StorageType.String255)
79 spec2.extend(
"Noisy_multilayer", cool.StorageType.String255)
80 spec2.extend(
"Noisy_layer", cool.StorageType.String255)
81 spec2.extend(
"Noisy_mezz", cool.StorageType.String255)
82 spec2.extend(
"Noisy_asd", cool.StorageType.String255)
83 spec2.extend(
"Noisy_tube", cool.StorageType.String4k)
85 desc =
"<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>"
92 folderSpec = cool.FolderSpecification(
93 cool.FolderVersioning.MULTI_VERSION, spec2)
95 "/OFFLINE/DQMFOFFLINE/DQMFOFFLINE_NOISY", folderSpec, desc,
True)