31 """Create sqlite file with DCS currents"""
33 os.environ[
'CLING_STANDARD_PCH'] =
'none'
34 from PyCool
import cool
35 from CoolConvUtilities
import AtlCoolLib, AtlCoolTool
38 if os.path.isfile(sqlite):
41 db = cool.DatabaseSvcFactory.databaseService().
createDatabase(f
'sqlite://;schema={sqlite};dbname=CONDBR2')
42 spec = cool.RecordSpecification()
43 spec.extend(
"value", cool.StorageType.Float)
44 spec.extend(
"quality_invalid", cool.StorageType.Bool)
45 f = AtlCoolLib.ensureFolder(db, folder, spec, AtlCoolLib.athenaDesc(
True,
'CondAttrListCollection'))
48 sol = cool.Record(spec)
50 sol[
'quality_invalid'] =
False
51 tor = cool.Record(spec)
53 tor[
'quality_invalid'] =
False
54 f.storeObject(v[0], cool.ValidityKeyMax, sol, 1)
55 f.storeObject(v[0], cool.ValidityKeyMax, tor, 3)
58 act = AtlCoolTool.AtlCoolTool(db)
59 print (act.more(folder))