Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:37

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   16/05/97
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TCutG
0013 #define ROOT_TCutG
0014 
0015 
0016 #include "TGraph.h"
0017 
0018 class TH2;
0019 
0020 class TCutG : public TGraph {
0021 
0022 protected:
0023    TString      fVarX;         ///< X variable
0024    TString      fVarY;         ///< Y variable
0025    TObject     *fObjectX;      ///<! pointer to an object corresponding to X
0026    TObject     *fObjectY;      ///<! pointer to an object corresponding to Y
0027 
0028 public:
0029    TCutG();
0030    TCutG(const TCutG &cutg);
0031    TCutG(const char *name, Int_t n=0);
0032    TCutG(const char *name, Int_t n, const Float_t *x, const Float_t *y);
0033    TCutG(const char *name, Int_t n, const Double_t *x, const Double_t *y);
0034    ~TCutG() override;
0035 
0036    TCutG &operator=(const TCutG &);
0037    virtual Double_t Area() const;
0038    virtual void     Center(Double_t &cx, Double_t &cy) const;
0039    TObject         *GetObjectX() const {return fObjectX;}
0040    TObject         *GetObjectY() const {return fObjectY;}
0041    const char      *GetVarX() const {return fVarX.Data();}
0042    const char      *GetVarY() const {return fVarY.Data();}
0043    virtual Double_t IntegralHist(TH2 *h, Option_t *option="") const;
0044    void             SavePrimitive(std::ostream &out, Option_t *option = "") override;
0045    virtual void     SetObjectX(TObject *obj);
0046    virtual void     SetObjectY(TObject *obj);
0047    virtual void     SetVarX(const char *varx); // *MENU*
0048    virtual void     SetVarY(const char *vary); // *MENU*
0049 
0050    ClassDefOverride(TCutG,2)  // A Graphical cut.
0051 };
0052 
0053 #endif