-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsPlotTest.py
52 lines (37 loc) · 1.06 KB
/
sPlotTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python
# Salvatore Zaza
# Created 2013
from ROOT import *
from sCONST import *
if __name__ == "__main__":
gROOT.ProcessLine(CHSTRUCT);
dataF = "/home/salvo/Scrivania/Tesi/DATA/run_131111142833_1.root"
chID = "CH0"
tc = TCanvas("tc","sPlot")
tc.Divide(1,2)
pad = tc.FindObject("tc_1")
cpad = tc.FindObject("tc_2")
drawStr = chID+".value:"+chID+".seqTime>>h1"
cdrawStr = chID+".cvalue:"+chID+".seqTime>>h2"
cutStr = chID+".seqTime < 512"
tf = TFile(dataF)
tree = tf.Get("T5DATA")
"""
tc.cd(1)
tree.Draw(drawStr,cutStr,"p")
pad.FindObject("h1").SetTitle("T5 RAW DATA")
pad.FindObject("Graph").SetMarkerStyle(7)
pad.SetGridx(True)
pad.SetGridy(True)
pad.Modified()
tc.cd(2)
tree.Draw(cdrawStr,cutStr,"p")
cpad.FindObject("h2").SetTitle("T5 CALIBRATED DATA")
cpad.FindObject("Graph").SetMarkerStyle(7)
cpad.SetGridx(True)
cpad.SetGridy(True)
cpad.Modified()
tc.Update()
tc.Modified()
"""
#cmd = raw_input("\nEnter Command: ")