11 usage =
"Usage: integrator_readDb.py [\"yyyy-mm-dd hh:mm:ss\"]"
12 if (len(sys.argv)>2)
or (
"-h" in sys.argv)
or (
"--help" in sys.argv):
18 pointInTime = sys.argv.pop(0)
21 from TileCalibBlobPython.TileCalibLogger
import getLogger
25 from TileCalibBlobPython
import TileCalibTools
26 db = TileCalibTools.openDb(
'SQLITE',
'CONDBR2',
'READONLY')
29 blobReader = TileCalibTools.TileBlobReader(db,
"/TILE/ONL01/INTEGRATOR")
32 comment = blobReader.getComment(pointInTime)
33 log.info(
"Comment: \"%s\"", comment)
36 for ros
in range(1,5):
40 cd = blobReader.getDrawer(ros,mod,pointInTime)
47 outStr =
"ros/mod/pmt/gain = %i/%2i/%2i/%i : " % (ros,mod,pmt,gain)
48 outStr+=
"gain=%f+/-%f " % (cd.getData(pmt,gain,0),cd.getData(pmt,gain,1))
49 outStr+=
"ped=%f+/-%f " % (cd.getData(pmt,gain,4),cd.getData(pmt,gain,5))
50 outStr+=
"rms=%f+/-%f " % (cd.getData(pmt,gain,6),cd.getData(pmt,gain,7))
51 outStr+=
"dac=%3i chi2=%f" % (cd.getData(pmt,gain,3),cd.getData(pmt,gain,2))