TH1K.h

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TH1K.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Victor Perevoztchikov <perev@bnl.gov>  21/02/2001
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TH1K
00013 #define ROOT_TH1K
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TH1K                                                                 //
00019 //                                                                      //
00020 // 1-Dim histogram nearest K Neighbour class.                           //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #include "TH1.h"
00025 //________________________________________________________________________
00026 
00027 class TH1K : public TH1, public TArrayF {
00028 
00029 private:
00030    void Sort(); 
00031 protected:
00032    Int_t fReady;        //!
00033    Int_t fNIn;
00034    Int_t fKOrd; //!
00035    Int_t fKCur; //!
00036 public:
00037    TH1K();
00038    TH1K(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup,Int_t k=0);
00039    virtual ~TH1K();
00040 
00041    virtual Int_t     Fill(Double_t x);
00042    virtual Int_t     Fill(Double_t x,Double_t w){return TH1::Fill(x,w);}
00043    virtual Int_t     Fill(const char *name,Double_t w){return TH1::Fill(name,w);}
00044    virtual Double_t  GetBinContent(Int_t bin) const;
00045    virtual Double_t  GetBinContent(Int_t bin,Int_t) const {return GetBinContent(bin);}
00046    virtual Double_t  GetBinContent(Int_t bin,Int_t,Int_t) const {return GetBinContent(bin);}
00047 
00048    virtual Double_t  GetBinError(Int_t bin) const;
00049    virtual Double_t  GetBinError(Int_t bin,Int_t) const {return GetBinError(bin);}
00050    virtual Double_t  GetBinError(Int_t bin,Int_t,Int_t) const {return GetBinError(bin);}
00051     
00052     
00053    virtual void      Reset(Option_t *option="");
00054    virtual void      SavePrimitive(ostream &out, Option_t *option = "");
00055 
00056    void    SetKOrd(Int_t k){fKOrd=k;}
00057    
00058    ClassDef(TH1K,1)  //1-Dim Nearest Kth neighbour method
00059 };
00060 
00061 #endif

Generated on Tue Jul 5 14:22:51 2011 for ROOT_528-00b_version by  doxygen 1.5.1