Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:33

0001 // @(#)root/hist:$Id$
0002 // Author: Rene Brun   30/08/99
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 #ifndef ROOT_TVirtualHistPainter
0012 #define ROOT_TVirtualHistPainter
0013 
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TVirtualHistPainter                                                  //
0018 //                                                                      //
0019 // Abstract base class for Histogram painters                           //
0020 //                                                                      //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 #include "TObject.h"
0024 
0025 class TClass;
0026 class TH1;
0027 class TF1;
0028 class TList;
0029 
0030 class TVirtualHistPainter : public TObject {
0031 
0032 private:
0033    static TClass   *fgPainter; ///< Pointer to class painter
0034 
0035 public:
0036    TVirtualHistPainter() { }
0037    ~TVirtualHistPainter() override { }
0038    Int_t      DistancetoPrimitive(Int_t px, Int_t py) override = 0;
0039    virtual void       DrawPanel() = 0;
0040    void       ExecuteEvent(Int_t event, Int_t px, Int_t py) override = 0;
0041    virtual TList     *GetContourList(Double_t contour) const = 0;
0042    char      *GetObjectInfo(Int_t px, Int_t py) const override = 0;
0043    virtual TList     *GetStack() const = 0;
0044    virtual Bool_t     IsInside(Int_t x, Int_t y) = 0;
0045    virtual Bool_t     IsInside(Double_t x, Double_t y) = 0;
0046    void       Paint(Option_t *option="") override = 0;
0047    virtual void       PaintStat(Int_t dostat, TF1 *fit) = 0;
0048    virtual void       ProcessMessage(const char *mess, const TObject *obj) = 0;
0049    virtual void       SetHighlight() = 0;
0050    virtual void       SetHistogram(TH1 *h) = 0;
0051    virtual void       SetStack(TList *stack) = 0;
0052    virtual Int_t      MakeCuts(char *cutsopt) = 0;
0053    virtual void       SetShowProjection(const char *option, Int_t nbins) = 0;
0054    virtual void       SetShowProjectionXY(const char *option, Int_t nbinsY, Int_t nbinsX) = 0;
0055 
0056    static TVirtualHistPainter *HistPainter(TH1 *obj);
0057    static void                 SetPainter(const char *painter);
0058 
0059    ClassDefOverride(TVirtualHistPainter,0)  //Abstract interface for histogram painters
0060 };
0061 
0062 #endif