ROOT  6.06/09
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 // //
17 // TCutG //
18 // //
19 // A Graphical cut. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TGraph
24 #include "TGraph.h"
25 #endif
26 
27 class TH2;
28 
29 class TCutG : public TGraph {
30 
31 protected:
32  TString fVarX; //X variable
33  TString fVarY; //Y variable
34  TObject *fObjectX; //!pointer to an object corresponding to X
35  TObject *fObjectY; //!pointer to an object corresponding to Y
36 
37 public:
38  TCutG();
39  TCutG(const TCutG &cutg);
40  TCutG(const char *name, Int_t n);
41  TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
42  TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
43  virtual ~TCutG();
44 
45  TCutG &operator=(const TCutG &);
46  virtual Double_t Area() const;
47  virtual void Center(Double_t &cx, Double_t &cy) const;
48  TObject *GetObjectX() const {return fObjectX;}
49  TObject *GetObjectY() const {return fObjectY;}
50  const char *GetVarX() const {return fVarX.Data();}
51  const char *GetVarY() const {return fVarY.Data();}
52  virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const;
53  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
54  virtual void SetObjectX(TObject *obj);
55  virtual void SetObjectY(TObject *obj);
56  virtual void SetVarX(const char *varx); // *MENU*
57  virtual void SetVarY(const char *vary); // *MENU*
58 
59  ClassDef(TCutG,2) // A Graphical cut.
60 };
61 
62 #endif
TCutG()
pointer to an object corresponding to Y
virtual void SetObjectX(TObject *obj)
Set the X object (and delete the previous one if any).
Definition: TCutG.cxx:382
float Float_t
Definition: RtypesCore.h:53
TObject * GetObjectY() const
Definition: TCutG.h:49
const char Option_t
Definition: RtypesCore.h:62
TH1 * h
Definition: legend2.C:5
TObject * fObjectX
Definition: TCutG.h:34
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
virtual ~TCutG()
TCutG destructor.
Definition: TCutG.cxx:241
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TCutG.cxx:354
TString fVarY
Definition: TCutG.h:33
TCutG & operator=(const TCutG &)
Assignment operator.
Definition: TCutG.cxx:252
const char * Data() const
Definition: TString.h:349
Graphical cut class.
Definition: TCutG.h:29
Double_t x[n]
Definition: legend1.C:17
virtual void SetVarY(const char *vary)
Set Y variable.
Definition: TCutG.cxx:410
ClassDef(TAttLine, 2)
TObject * GetObjectX() const
Definition: TCutG.h:48
char * out
Definition: TBase64.cxx:29
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:270
Service class for 2-Dim histogram classes.
Definition: TH2.h:36
virtual void SetObjectY(TObject *obj)
Set the Y object (and delete the previous one if any).
Definition: TCutG.cxx:391
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:287
virtual void SetVarX(const char *varx)
Set X variable.
Definition: TCutG.cxx:400
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
TString fVarX
Definition: TCutG.h:32
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
TObject * fObjectY
pointer to an object corresponding to X
Definition: TCutG.h:35
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
const char * GetVarY() const
Definition: TCutG.h:51
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:309
TObject * obj
const Int_t n
Definition: legend1.C:16
const char * GetVarX() const
Definition: TCutG.h:50