Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualGraphPainter.cxx
Go to the documentation of this file.
1// @(#)root/hist:$Id$
2// Author: Olivier Couet 20/05/08
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#include "TROOT.h"
14#include "TPluginManager.h"
15
17
18
19/** \class TVirtualGraphPainter
20 \ingroup Histpainter
21 Abstract interface to a histogram painter
22*/
23
24////////////////////////////////////////////////////////////////////////////////
25/// Static function returning a pointer to the current graph painter.
26/// If the graph painter does not exist a default painter (singleton) is created.
27
29{
30 // if no painter set yet, create a default painter via the PluginManager
31 if (!fgPainter) {
33 if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGraphPainter"))) {
34 if (h->LoadPlugin() == -1) return nullptr;
35 fgPainter = (TVirtualGraphPainter*)gROOT->GetClass("TGraphPainter")->New();
36 }
37 }
38
39 // Create an instance of the graph painter
40 return fgPainter;
41}
42
43////////////////////////////////////////////////////////////////////////////////
44/// Static function to set an alternative histogram painter.
45
#define h(i)
Definition RSha256.hxx:106
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define gROOT
Definition TROOT.h:411
Abstract interface to a histogram painter.
static TVirtualGraphPainter * fgPainter
static void SetPainter(TVirtualGraphPainter *painter)
Static function to set an alternative histogram painter.
static TVirtualGraphPainter * GetPainter()
Static function returning a pointer to the current graph painter.