Logo ROOT  
Reference Guide
TVirtualGeoPainter.cxx
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 11/01/02
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/** \class TVirtualGeoPainter
13\ingroup Geometry_classes
14
15Abstract class for geometry painters
16*/
17
18#include "TROOT.h"
19#include "TVirtualGeoPainter.h"
20#include "TPluginManager.h"
21#include "TGeoManager.h"
22
24
26
27////////////////////////////////////////////////////////////////////////////////
28/// Geometry painter default constructor
29
31{
32}
33
34////////////////////////////////////////////////////////////////////////////////
35/// Geometry painter default destructor
36
38{
39 fgGeoPainter = 0;
40}
41
42
43////////////////////////////////////////////////////////////////////////////////
44/// Static function returning a pointer to the geometry painter.
45/// The painter will paint objects from the specified geometry.
46/// If the geometry painter does not exist a default painter is created.
47
49{
50 // if no painter set yet, create a default painter via the PluginManager
51 if (!fgGeoPainter) {
53 if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGeoPainter"))) {
54 if (h->LoadPlugin() == -1)
55 return 0;
57 }
58 }
59 return fgGeoPainter;
60}
61
62////////////////////////////////////////////////////////////////////////////////
63/// Static function to set an alternative histogram painter.
64
66{
68}
#define h(i)
Definition: RSha256.hxx:106
#define ClassImp(name)
Definition: Rtypes.h:365
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:601
#define gROOT
Definition: TROOT.h:415
The manager class for any TGeo geometry.
Definition: TGeoManager.h:43
Abstract class for geometry painters.
virtual ~TVirtualGeoPainter()
Geometry painter default destructor.
static TVirtualGeoPainter * fgGeoPainter
static void SetPainter(const TVirtualGeoPainter *painter)
Static function to set an alternative histogram painter.
static TVirtualGeoPainter * GeoPainter()
Static function returning a pointer to the geometry painter.
TVirtualGeoPainter(TGeoManager *manager)
Geometry painter default constructor.