Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TCutG.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Rene Brun 16/05/97
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TCutG
13 #define ROOT_TCutG
14 
15 
16 #include "TGraph.h"
17 
18 class TH2;
19 
20 class TCutG : public TGraph {
21 
22 protected:
23  TString fVarX; ///< X variable
24  TString fVarY; ///< Y variable
25  TObject *fObjectX; ///<! pointer to an object corresponding to X
26  TObject *fObjectY; ///<! pointer to an object corresponding to Y
27 
28 public:
29  TCutG();
30  TCutG(const TCutG &cutg);
31  TCutG(const char *name, Int_t n=0);
32  TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
33  TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
34  virtual ~TCutG();
35 
36  TCutG &operator=(const TCutG &);
37  virtual Double_t Area() const;
38  virtual void Center(Double_t &cx, Double_t &cy) const;
39  TObject *GetObjectX() const {return fObjectX;}
40  TObject *GetObjectY() const {return fObjectY;}
41  const char *GetVarX() const {return fVarX.Data();}
42  const char *GetVarY() const {return fVarY.Data();}
43  virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const;
44  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
45  virtual void SetObjectX(TObject *obj);
46  virtual void SetObjectY(TObject *obj);
47  virtual void SetVarX(const char *varx); // *MENU*
48  virtual void SetVarY(const char *vary); // *MENU*
49 
50  ClassDef(TCutG,2) // A Graphical cut.
51 };
52 
53 #endif