File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9185,13 +9185,17 @@ bool testArrayRebin()
91859185 h1->Fill ( r.Uniform ( minRange * .9 , maxRange * 1.1 ) );
91869186
91879187 // Create vector - generate bin edges ( nbins is always > 2)
9188- // ignore fact that array may contains bins with zero size
91899188 Double_t * rebinArray = new Double_t[rebin];
91909189 r.RndmArray (rebin, rebinArray);
91919190 std::sort (rebinArray, rebinArray + rebin);
91929191 for ( Int_t i = 0 ; i < rebin; ++i ) {
91939192 rebinArray[i] = TMath::Nint ( rebinArray[i] * ( h1->GetNbinsX () - 2 ) + 2 );
91949193 rebinArray[i] = h1->GetBinLowEdge ( (Int_t) rebinArray[i] );
9194+ // compensate for the fact that array may contain bins with zero size
9195+ if (i > 0 ) {
9196+ if (rebinArray[i] <= rebinArray[i - 1 ])
9197+ rebinArray[i] = rebinArray[i - 1 ] + 1e-15 ;
9198+ }
91959199 }
91969200
91979201
You can’t perform that action at this time.
0 commit comments