Following the link here : https://root.cern.ch/doc/master/classTEfficiency.html#aa0e99b4161745fd3bee0ae5c0f58880e
In a root interactive sesson, I do:
-bash-4.1$ root -l Gallery_output.root
root [0]
Attaching file Gallery_output.root as _file0...
(TFile *) 0x3343fb0
root [1] MCTracktree->Draw("muontracklength_det >> h0(30,0,900)")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2] MCTracktree->Draw("muontracklength_det >> h1(30,0,900)","angle_smallest<0.1")
(Long64_t) 36684
root [3] TEfficiency* eff= new TEfficiency(h1,h0);
I get the following error:
ROOT_prompt_3:1:23: error: no matching constructor for initialization of 'TEfficiency'
TEfficiency* eff= new TEfficiency(h1,h0);
^ ~~~~~
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:80:7: note: candidate constructor not viable: no known conversion from
'TH1F *' to 'const TH1' for 1st argument; dereference the argument with *
TEfficiency(const TH1& passed,const TH1& total);
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:96:7: note: candidate constructor not viable: requires single argument
'heff', but 2 arguments were provided
TEfficiency(const TEfficiency& heff);
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:79:7: note: candidate constructor not viable: requires 0 arguments, but 2
were provided
TEfficiency();
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:81:7: note: candidate constructor not viable: requires 4 arguments, but 2
were provided
TEfficiency(const char* name,const char* title,Int_t nbins,
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:83:7: note: candidate constructor not viable: requires 5 arguments, but 2
were provided
TEfficiency(const char* name,const char* title,Int_t nbins,Double_t xlow,
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:88:7: note: candidate constructor not viable: requires 6 arguments, but 2
were provided
TEfficiency(const char* name,const char* title,Int_t nbinsx,
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:85:7: note: candidate constructor not viable: requires 8 arguments, but 2
were provided
TEfficiency(const char* name,const char* title,Int_t nbinsx,
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:93:7: note: candidate constructor not viable: requires 8 arguments, but 2
were provided
TEfficiency(const char* name,const char* title,Int_t nbinsx,
^
/cvmfs/fermilab.opensciencegrid.org/products/larsoft/root/v6_08_06g/Linux64bit+2.6-2.12-e14-nu-prof/etc/../include/TEfficiency.h:90:7: note: candidate constructor not viable: requires 11 arguments, but
2 were provided
TEfficiency(const char* name,const char* title,Int_t nbinsx,
Anybody have a clue as to what it means by “no matching constructor for initialization of TEfficiency” ?
Thanks !