//*CMZ :  2.23/03 16/09/99  12.46.23  by  Rene Brun
//*CMZ :  2.23/02 02/09/99  19.38.51  by  Rene Brun
//*CMZ :  2.23/01 31/08/99  15.24.04  by  Rene Brun
//*-- Author :    Rene Brun   30/08/99
//*KEEP,CopyRight,T=C.
/*************************************************************************
 * Copyright(c) 1995-1999, The ROOT System, All rights reserved.         *
 * Authors: Rene Brun and Fons Rademakers.                               *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/AA_LICENSE.                      *
 * For the list of contributors see $ROOTSYS/AA_CREDITS.                 *
 *************************************************************************/
//*KEND.

//*KEEP,TROOT.
#include "TROOT.h"
//*KEEP,TVirtualHistPainter,T=C++.
#include "TVirtualHistPainter.h"
//*KEND.

TClass  *TVirtualHistPainter::fgPainter = 0;

ClassImp(TVirtualHistPainter)

//______________________________________________________________________________
TVirtualHistPainter::TVirtualHistPainter()
{
//*-*-*-*-*-*-*-*-*-*-*Histogram painter default constructor*-*-*-*-*-*-*-*-*
//*-*                  ====================================
}

//______________________________________________________________________________
 TVirtualHistPainter::~TVirtualHistPainter()
{
//*-*-*-*-*-*-*-*-*-*-*Histogram painter default destructor*-*-*-*-*-*-*-*-*
//*-*                  ====================================
}


//______________________________________________________________________________
 TVirtualHistPainter *TVirtualHistPainter::HistPainter(TH1 *obj)
{
   // Static function returning a pointer to the current histogram painter.
   // The painter will paint the specified obj. If the histogram painter
   // does not exist a default painter is created.

   // if no painter set yet, set THistPainter by default
   if (!fgPainter) {
      if (gROOT->LoadClass("THistPainter","HistPainter")) return 0;
      TVirtualHistPainter::SetPainter("THistPainter");
      if (!fgPainter) return 0;
   }
   //create an instance of the histogram painter
   TVirtualHistPainter *p = (TVirtualHistPainter*)fgPainter->New();
   if (p) p->SetHistogram(obj);
   return p;
}

//______________________________________________________________________________
 void TVirtualHistPainter::SetPainter(const char *painter)
{
   // Static function to set an alternative histogram painter.

   fgPainter = gROOT->GetClass(painter);
}


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.