Hi,
I am trying to add two histograms created with RDataFrame in PyRoot:
from ROOT import RDataFrame, TH1, TH1D
frame1 = RDataFrame('sig_ma1000_mDM10_MH600_tb1_st035','test/files/sig_ma1000_mDM10_MH600_tb1_st035.root')
frame2 = RDataFrame('sig_ma150_mDM10_MH1000_tb1_st070','test/files/sig_ma150_mDM10_MH1000_tb1_st070.root')
histo1 = frame1.Histo1D('jet0_pt')
histo2 = frame2.Histo1D('jet0_pt')
histo1.Add(histo2)
Unfortunately, I get following error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: none of the 3 overloaded methods succeeded. Full details:
bool TH1::Add(TF1* h1, double c1 = 1, const char* option = "") =>
could not convert argument 1
bool TH1::Add(const TH1* h1, double c1 = 1) =>
could not convert argument 1
bool TH1::Add(const TH1* h, const TH1* h2, double c1 = 1, double c2 = 1) =>
takes at least 2 arguments (1 given)
Does anybody understand, what I am doing wrong?
Cheers,
Ben
ROOT Version: 6.14
Platform: CC7
Compiler: GCC 4.8