Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
sbnana
sbnanalysis
ana
SBNOscReco
plots
savegraph.py
Go to the documentation of this file.
1
import
ROOT
2
import
util
3
import
argparse
4
from
array
import
array
5
6
def
main
(args):
7
f = ROOT.TFile(args.input)
8
graph = f.Get(args.graph)
9
canvas = ROOT.TCanvas(
"canvas"
,
"Canvas"
, 250,100,700,500)
10
util.style
(args, graph)
11
graph.Draw(
"AC"
)
12
util.resize_graph
(args, graph)
13
graph.Draw(
"AC"
)
14
15
line = ROOT.TGraph(2, array(
'd'
, [0., 1.]), array(
'd'
, [1., 0.]))
16
line.SetLineColor(ROOT.kRed)
17
line.Draw(
"SAME"
)
18
19
canvas.Update()
20
21
util.wait
(args)
22
util.write
(args, canvas)
23
24
if
__name__ ==
"__main__"
:
25
parser = argparse.ArgumentParser()
26
parser =
util.with_io_args
(parser)
27
parser =
util.with_histostyle_args
(parser)
28
parser =
util.with_graphsize_args
(parser)
29
parser.add_argument(
"-g"
,
"--graph"
, required=
True
)
30
main
(parser.parse_args())
31
savegraph.main
def main
Definition:
savegraph.py:6
util.style
def style
Definition:
util.py:237
util.write
def write
Definition:
util.py:23
util.with_histostyle_args
def with_histostyle_args
Definition:
util.py:220
util.wait
def wait
Definition:
util.py:19
util.with_graphsize_args
def with_graphsize_args
Definition:
util.py:89
util.resize_graph
def resize_graph
Definition:
util.py:112
util.with_io_args
def with_io_args
Definition:
util.py:84
Generated by
1.8.5