Problem using ReBinAxis

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

TH1::RebinAxis

sorry, I still dont see what I am doing wrong…could you give me a corrected example ?

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 ------------ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ

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)

the fist parameter is a Double_t … not an int