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