Alkass
#1
Hi
I am trying to ReBinAxis like
histo_binned = new TH1F("","",axiss->GetNbins(), axiss->GetXbins ()->fArray );
int newBins = axiss->GetNbins();
h->SetBit(TH1::kCanRebin);
h->ReBinAxis(newBins,axiss->GetXbins ()->fArray);
but I get
Error: Can't call TH1D::ReBinAxis(newBins,histo_binned->GetXaxis()) in current scope Overlap.C:1309:
Possible candidates are...
(in TH1D)
(in TH1)
I also tried something like
h->ReBinAxis(h->GetXbins()*2,h->GetXaxis());
but I end up with the same error.
thanks
Alex
Alkass
#3
sorry, I still dont see what I am doing wrong…could you give me a corrected example ?
couet
#4
The signature of RebinAxis is:
virtual void RebinAxis (Double_t x, TAxis *axis)
you do:
h->ReBinAxis(newBins,axiss->GetXbins ()->fArray);
this is not a TAxis ------------ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
Alkass
#5
thanks; so, trying
[code]int newBins = axiss->GetNbins();
h->SetBit(TH1::kCanRebin);
h->ReBinAxis(newBins,axiss);
[/code]
still gives
TH1::ReBinAxis(newBins,axiss) in current scope Overlap.C:1318:
Possible candidates are...
(in TH1)
couet
#6
the fist parameter is a Double_t … not an int