Logo ROOT  
Reference Guide
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
n
const Int_t n
Definition: legend1.C:16
TCutG::fObjectX
TObject * fObjectX
! pointer to an object corresponding to X
Definition: TCutG.h:25
TCutG::fVarY
TString fVarY
Y variable.
Definition: TCutG.h:24
TString::Data
const char * Data() const
Definition: TString.h:369
TGraph.h
TCutG::~TCutG
virtual ~TCutG()
TCutG destructor.
Definition: TCutG.cxx:243
TCutG::SetObjectX
virtual void SetObjectX(TObject *obj)
Set the X object (and delete the previous one if any).
Definition: TCutG.cxx:384
Float_t
float Float_t
Definition: RtypesCore.h:57
TCutG::GetObjectY
TObject * GetObjectY() const
Definition: TCutG.h:40
TCutG::GetObjectX
TObject * GetObjectX() const
Definition: TCutG.h:39
x
Double_t x[n]
Definition: legend1.C:17
TCutG::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TCutG.cxx:356
TString
Definition: TString.h:136
TCutG::SetVarY
virtual void SetVarY(const char *vary)
Set Y variable.
Definition: TCutG.cxx:412
TCutG::GetVarX
const char * GetVarX() const
Definition: TCutG.h:41
TCutG::IntegralHist
virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const
Compute the integral of 2-d histogram h for all bins inside the cut if option "width" is specified,...
Definition: TCutG.cxx:311
TCutG::operator=
TCutG & operator=(const TCutG &)
Assignment operator.
Definition: TCutG.cxx:254
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TCutG::GetVarY
const char * GetVarY() const
Definition: TCutG.h:42
h
#define h(i)
Definition: RSha256.hxx:124
TH2
Definition: TH2.h:30
TCutG::Area
virtual Double_t Area() const
Compute the area inside this TCutG The algorithm uses Stoke's theorem over the border of the closed p...
Definition: TCutG.cxx:272
y
Double_t y[n]
Definition: legend1.C:17
TCutG::SetObjectY
virtual void SetObjectY(TObject *obj)
Set the Y object (and delete the previous one if any).
Definition: TCutG.cxx:393
TCutG::SetVarX
virtual void SetVarX(const char *varx)
Set X variable.
Definition: TCutG.cxx:402
Double_t
double Double_t
Definition: RtypesCore.h:59
TGraph
Definition: TGraph.h:41
TObject
Definition: TObject.h:37
TCutG::fObjectY
TObject * fObjectY
! pointer to an object corresponding to Y
Definition: TCutG.h:26
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TCutG
Definition: TCutG.h:20
TCutG::TCutG
TCutG()
TCutG default constructor.
Definition: TCutG.cxx:99
TCutG::Center
virtual void Center(Double_t &cx, Double_t &cy) const
Compute the center x,y of this TCutG The algorithm uses Stoke's theorem over the border of the closed...
Definition: TCutG.cxx:289
TCutG::fVarX
TString fVarX
X variable.
Definition: TCutG.h:23
int