8 from TileCalibBlobPython
import TileCalibTools
9 from TileCalibBlobObjs.Classes
import TileCalibUtils
12 pointInTime = (999999999,0)
15 from TileCalibBlobPython.TileCalibLogger
import getLogger
19 db = TileCalibTools.openDbConn(
'COOLOFL_TILE/CONDBR2')
22 folder =
"/TILE/OFL02/PULSESHAPE/PHY"
31 blobReader = TileCalibTools.TileBlobReader(db,folder,folderTag)
34 comment = blobReader.getComment(pointInTime)
35 log.info(
"Comment: \"%s\"", comment)
38 cd = blobReader.getDrawer(0,0,pointInTime)
49 dyLG = cd.getDY(0,0,x)
51 dyHG = cd.getDY(0,1,x)
54 print(
"x=%5.1f \tyLG=%5.4f\tdyLG=%5.4f \tyHG=%5.4f\tdyHG=%5.4f" % (x,yLG,dyLG,yHG,dyHG) )
65 psLG = ROOT.TGraph(np)
66 dsLG = ROOT.TGraph(np)
67 psHG = ROOT.TGraph(np)
68 dsHG = ROOT.TGraph(np)
70 psLG.SetPoint(i,xarr[i],yarrLG[i])
71 dsLG.SetPoint(i,xarr[i],darrLG[i])
72 psHG.SetPoint(i,xarr[i],yarrHG[i])
73 dsHG.SetPoint(i,xarr[i],darrHG[i])
74 psLG.SetMarkerColor(ROOT.kBlue)
75 dsLG.SetMarkerColor(ROOT.kBlue)
76 psHG.SetMarkerColor(ROOT.kBlue)
77 dsHG.SetMarkerColor(ROOT.kBlue)
82 dsLG.SetMinimum(-0.03)
83 dsLG.SetMaximum(0.037)
84 dsHG.SetMinimum(-0.03)
85 dsHG.SetMaximum(0.037)
86 psLG.SetTitle(
"Low gain")
87 dsLG.SetTitle(
"Low gain derivative")
88 psHG.SetTitle(
"High gain")
89 dsHG.SetTitle(
"High gain derivative")
91 can = ROOT.TCanvas(
"can",
"Pulse Shapes")
103 from builtins
import input
108 c =
input(
'please enter a character: ')