Hi,
I am trying to add histograms to a list but getting some error, the code is like below:
import ROOT as r
filesig=['RSGraviton_controlPlot.root','BulkGraviton_controlPlot.root','Radion_controlPlot.root','nonreso_controlPlot.root','officialHH_gluglu_10_controlPlot.root']
histsig = []
variable ='InvariantMass_of_4_particle_with_totCharge==0'
sigtitle = ['RSGraviton','BulkGraviton','Radion','nonreco','SM']
color = [2,4,6,8,12]
for ifile in range(0,4) :
file_ = r.TFile(filesig[ifile])
histsig.append(file_.Get(variable +'_in_tau1iso_tau2iso'))
histsig[ifile].SetLineColor(color[ifile])
histsig[ifile].SetMarkerColor(color[ifile])
histsig[ifile].SetName(sigtitle[ifile])
print ifile, '****************',histsig
print histsig
The error which I am getting is
python test.py
0 **************** [<ROOT.TH1F object ("RSGraviton") at 0x33697b0>]
*** Break *** segmentation violation
1 **************** [
===========================================================
There was a crash.
This is the entire stack trace of all threads:
But the histograms are present in all files, Please help me.
Thanks,
Saswati