draw.optparse_parameters(parser, "eps", "400x300") parser.add_option( "", "--db-access", dest="dbaccess", default="-hna58pc052.cern.ch", help="DB access options [default: %default]", type="string", ) parser.usage = "%prog [options] <session-name>" (options, args) = parser.parse_args() if len(args) != 1: parser.print_help() sys.exit(1) plot_print = draw.Plot(options.pic_ext, options.pic_size) objs = read_and_analyze(args[0], options.dbaccess, plot_print) for s in ["dT", "dT_proj"]: c = TCanvas("T0_" + s, "T0_" + s, plot_print.size_x, plot_print.size_y) objs[s].draw() plot_print.make(c) if options.root_file: draw.save_to_root(objs.values(), options.root_file, options.root_dir) ## @}
__map_prog__ = options.map_prog table = args[0] detector = args[1] T0_error = float(args[2]) plot_print = draw.Plot(options.pic_ext,options.pic_size) T0 = read_table(table,options.dbaccess) if options.t0_file_tex: f_tex = file(options.t0_file_tex,'w') else: f_tex = None if args[1]!='all': hists = [det_card(T0,detector,T0_error,options.t_range,f_tex)] else: hists = all_det_card(T0,T0_error,options.t_range,f_tex) for h in hists: c = TCanvas(h().GetName(),h().GetName(),plot_print.size_x,plot_print.size_y) c.SetBottomMargin(0.25) c.SetLeftMargin(0.12) h.Draw() plot_print.make(c) if options.root_file: draw.save_to_root(hists,options.root_file,options.root_dir) ## @}