TCutG.h

Go to the documentation of this file.
00001 // @(#)root/graf:$Id: TCutG.h 37309 2010-12-06 00:10:29Z pcanal $
00002 // Author: Rene Brun   16/05/97
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_TCutG
00013 #define ROOT_TCutG
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TCutG                                                                //
00018 //                                                                      //
00019 // A Graphical cut.                                                     //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 #ifndef ROOT_TGraph
00024 #include "TGraph.h"
00025 #endif
00026 
00027 class TH2;
00028 
00029 class TCutG : public TGraph {
00030 
00031 protected:
00032    TString      fVarX;         //X variable
00033    TString      fVarY;         //Y variable
00034    TObject     *fObjectX;      //!pointer to an object corresponding to X
00035    TObject     *fObjectY;      //!pointer to an object corresponding to Y
00036 
00037 public:
00038    TCutG();
00039    TCutG(const TCutG &cutg);
00040    TCutG(const char *name, Int_t n);
00041    TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
00042    TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
00043    virtual ~TCutG();
00044    virtual Double_t Area() const;
00045    virtual void     Center(Double_t &cx, Double_t &cy) const;
00046    TObject         *GetObjectX() const {return fObjectX;}
00047    TObject         *GetObjectY() const {return fObjectY;}
00048    const char      *GetVarX() const {return fVarX.Data();}
00049    const char      *GetVarY() const {return fVarY.Data();}
00050    virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const;
00051    virtual void     SavePrimitive(ostream &out, Option_t *option = "");
00052    virtual void     SetObjectX(TObject *obj);
00053    virtual void     SetObjectY(TObject *obj);
00054    virtual void     SetVarX(const char *varx); // *MENU*
00055    virtual void     SetVarY(const char *vary); // *MENU*
00056 
00057    ClassDef(TCutG,2)  // A Graphical cut.
00058 };
00059 
00060 #endif

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