1 from __future__
import print_function
2 from builtins
import range
5 from ROOT
import TCanvas,TH1F,gROOT,TFile,gStyle,gDirectory,TDatime,TLegend
12 print(
'unable to import GUI backend, switch to batch only mode')
20 Tk.Frame.__init__(self,master=root)
21 ROOT.gStyle.SetOptStat(0)
22 ROOT.gROOT.SetBatch(ROOT.kFALSE)
24 self.__canvas.SetHighLightColor(2);
25 self.__canvas.Range(-125.6732,-0.1364721,1123.878,1.178117)
26 self.__canvas.SetFillColor(0)
27 self.__canvas.SetBorderMode(0)
28 self.__canvas.SetBorderSize(2)
29 self.__canvas.SetGridx()
30 self.__canvas.SetGridy()
31 self.__canvas.SetFrameFillColor(19)
32 self.__canvas.SetFrameBorderMode(0)
33 self.__canvas.SetFrameBorderMode(0)
37 button=Tk.Button(master=root,text=
'Quit',command=sys.exit)
38 button.pack(side=Tk.BOTTOM)
42 ROOT.gStyle.SetOptStat(0)
43 ROOT.gROOT.SetBatch(ROOT.kTRUE)
45 self.__canvas.SetHighLightColor(2);
46 self.__canvas.Range(-125.6732,-0.1364721,1123.878,1.178117)
47 self.__canvas.SetFillColor(0)
48 self.__canvas.SetBorderMode(0)
49 self.__canvas.SetBorderSize(2)
50 self.__canvas.SetGridx()
51 self.__canvas.SetGridy()
52 self.__canvas.SetFrameFillColor(19)
53 self.__canvas.SetFrameBorderMode(0)
54 self.__canvas.SetFrameBorderMode(0)
58 self.__canvas.Modified()
60 self.__canvas.SetSelected(rootobj)
62 if __name__==
'__main__':
64 da = TDatime(2010,3,30,13,10,00)
65 h1f = TH1F(
"Luminposity",
"",1000,0.,1000)
66 h1f.GetXaxis().SetNdivisions(-503)
67 h1f.GetXaxis().SetTimeDisplay(1)
68 h1f.GetXaxis().SetTimeFormat(
"%d\/%m %H:%M")
69 h1f.GetXaxis().SetTimeOffset(da.Convert())
70 h1f.GetXaxis().SetLabelFont(32);
71 h1f.GetXaxis().SetLabelSize(0.03);
72 h1f.GetXaxis().SetTitleFont(32);
73 h1f.GetXaxis().SetTitle(
"Date");
75 h1f.GetYaxis().SetLabelFont(32);
76 h1f.GetYaxis().SetLabelSize(0.03);
77 h1f.GetYaxis().SetTitleFont(32);
78 h1f.GetYaxis().SetTitle(
"L (#mub^{-1})");
80 for i
in range(0,1000):
82 h1f.SetBinContent(i,20.2+i)
S & print(S &os, JobReport::InputFile const &f)
def __init__(self, outputfilename)