ROOT logo
// @(#)root/graf:$Id: TCutG.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   16/05/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TCutG
#define ROOT_TCutG

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TCutG                                                                //
//                                                                      //
// A Graphical cut.                                                     //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TGraph
#include "TGraph.h"
#endif

class TH2;

class TCutG : public TGraph {

protected:
   TString      fVarX;         //X variable
   TString      fVarY;         //Y variable
   TObject     *fObjectX;      //!pointer to an object corresponding to X
   TObject     *fObjectY;      //!pointer to an object corresponding to Y

public:
   TCutG();
   TCutG(const TCutG &cutg);
   TCutG(const char *name, Int_t n);
   TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
   TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
   virtual ~TCutG();
   TObject       *GetObjectX() const {return fObjectX;}
   TObject       *GetObjectY() const {return fObjectY;}
   const char    *GetVarX() const {return fVarX.Data();}
   const char    *GetVarY() const {return fVarY.Data();}
   Double_t       Integral(TH2 *h, Option_t *option="") const;
   virtual Int_t  IsInside(Double_t x, Double_t y) const;
   virtual void   SavePrimitive(ostream &out, Option_t *option = "");
   virtual void   SetObjectX(TObject *obj) {fObjectX = obj;}
   virtual void   SetObjectY(TObject *obj) {fObjectY = obj;}
   virtual void   SetVarX(const char *varx); // *MENU*
   virtual void   SetVarY(const char *vary); // *MENU*

   ClassDef(TCutG,2)  // A Graphical cut.
};

#endif
 TCutG.h:1
 TCutG.h:2
 TCutG.h:3
 TCutG.h:4
 TCutG.h:5
 TCutG.h:6
 TCutG.h:7
 TCutG.h:8
 TCutG.h:9
 TCutG.h:10
 TCutG.h:11
 TCutG.h:12
 TCutG.h:13
 TCutG.h:14
 TCutG.h:15
 TCutG.h:16
 TCutG.h:17
 TCutG.h:18
 TCutG.h:19
 TCutG.h:20
 TCutG.h:21
 TCutG.h:22
 TCutG.h:23
 TCutG.h:24
 TCutG.h:25
 TCutG.h:26
 TCutG.h:27
 TCutG.h:28
 TCutG.h:29
 TCutG.h:30
 TCutG.h:31
 TCutG.h:32
 TCutG.h:33
 TCutG.h:34
 TCutG.h:35
 TCutG.h:36
 TCutG.h:37
 TCutG.h:38
 TCutG.h:39
 TCutG.h:40
 TCutG.h:41
 TCutG.h:42
 TCutG.h:43
 TCutG.h:44
 TCutG.h:45
 TCutG.h:46
 TCutG.h:47
 TCutG.h:48
 TCutG.h:49
 TCutG.h:50
 TCutG.h:51
 TCutG.h:52
 TCutG.h:53
 TCutG.h:54
 TCutG.h:55
 TCutG.h:56
 TCutG.h:57
 TCutG.h:58
 TCutG.h:59