import sys,math,os,time,glob pandapath=os.environ.get('PANDAPATH') sys.path.append(pandapath+'/macro/tpc/FOPI/python/argparse-1.2.1') sys.path.append(pandapath+'/macro/tpc/FOPI/mberger') import argparse from functions import * from anaFile import anaFile parser=argparse.ArgumentParser(description="plot number of failed and successful fits") parser.add_argument("files",help='the histogram files',type=str,nargs="+") args=parser.parse_args() import ROOT ROOT.gROOT.ProcessLine(".x rootlogon.C") #ROOT.gROOT.ProcessLine('gStyle->SetPalette(1)') set_palette() ROOT.gROOT.ProcessLine('gROOT->SetStyle("Plain")') ctmp=ROOT.TCanvas("ctmp","tmp") cgoodfits=ROOT.TCanvas("Cgoodfits","goodfits") hgoodfits=ROOT.TH1D("hgoodfit","Fitflag=0",len(args.files),0,len(args.files)) anaFiles=[] counter=-1 for f in args.files: counter+=1 anaFiles.append(anaFile(f)) h=anaFiles[-1].getHist("hfitflag") ngood=h.GetBinContent(1) print ngood hgoodfits.Fill(counter,ngood) ctmp.cd() h.Draw() ctmp.Update() u=raw_input("next?") cgoodfits.cd() hgoodfits.Draw() cgoodfits.Update() thisIsTheEnd()