#!/usr/bin/python -itt from factfits import FactFits from ROOT import TCanvas, TGraph #define filenames data_filename_1 = "/fact/aux/2012/04/17/20120417_030.FTM_CONTROL_TRIGGER_RATES.fits" #data_filename_2 = "/fact/aux/2012/04/17/20120417_031.FTM_CONTROL_TRIGGER_RATES.fits" file_handle_1 = FactFits(data_filename_1) #file_handle_2 = FactFits(data_filename_2) file_handle_1.register("TriggerRate") file_handle_1.register("Time") #file_handle_2.register("TriggerRate") #file_handle_2.register("Time") trigger_rate_array = [] time_array = [] for row in file_handle_1: trigger_rate_array.append(row.TriggerRate) time_array.append(row.Time) #for row in file_handle_2: # trigger_rate_array.append(row.TriggerRate) # time_array.append(row.Time) canv = TCanvas("canv","title",10,10,600,400) graph = TGraph(len(trigger_rate_array),time_array,trigger_rate_array) graph.Draw("ap")