Example to illustrate high resolution peak searching function (class TSpectrum2). 
  
Found 3 candidate peaks
posx= 47, posy= 31, value=10314
posx= 28, posy= 31, value=4994
posx= 55, posy= 15, value=1500
   
 
void Src4() {
   for (i=0;i<nbinsx;i++)
   for (i=0;i<nbinsx;i++)
   auto search = (
TH2F*) 
f->Get(
"search2");
 
   for (i = 0; i < nbinsx; i++){
      for (j = 0; j < nbinsy; j++){
         source[i][j] = search->GetBinContent(i + 1,j + 1);
      }
    }
   nfound = s->SearchHighRes(source, 
dest, nbinsx, nbinsy, 3, 5, 
kFALSE, 10, 
kTRUE, 3);
 
   printf("Found %d candidate peaks\n",nfound);
   Double_t *PositionX = s->GetPositionX();
 
   Double_t *PositionY = s->GetPositionY();
 
   search->Draw("CONT");
   for (i=0;i<nfound;i++) {
      printf(
"posx= %d, posy= %d, value=%d\n",(
Int_t)(PositionX[i]+0.5), (
Int_t)(PositionY[i]+0.5),
 
      m->DrawMarker(PositionX[i],PositionY[i]);
 
   }
}
R__EXTERN TStyle * gStyle
 
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
 
2-D histogram with a float per channel (see TH1 documentation)}
 
Advanced 2-dimensional spectra processing.
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
#define dest(otri, vertexptr)
 
- Authors
 - Miroslav Morhac, Olivier Couet 
 
Definition in file Src4.C.