Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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/// Geometry painter default destructor
34
36{
37 fgGeoPainter = nullptr;
38}
39
40////////////////////////////////////////////////////////////////////////////////
41/// Static function returning a pointer to the geometry painter.
42/// The painter will paint objects from the specified geometry.
43/// If the geometry painter does not exist a default painter is created.
44
46{
47 // if no painter set yet, create a default painter via the PluginManager
48 if (!fgGeoPainter) {
50 if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGeoPainter"))) {
51 if (h->LoadPlugin() == -1)
52 return nullptr;
53 fgGeoPainter = (TVirtualGeoPainter *)h->ExecPlugin(1, gGeoManager);
54 }
55 }
56 return fgGeoPainter;
57}
58
59////////////////////////////////////////////////////////////////////////////////
60/// Static function to set an alternative histogram painter.
61
63{
65}
#define h(i)
Definition RSha256.hxx:106
#define ClassImp(name)
Definition Rtypes.h:377
R__EXTERN TGeoManager * gGeoManager
#define gROOT
Definition TROOT.h:407
The manager class for any TGeo geometry.
Definition TGeoManager.h:44
Abstract class for geometry painters.
~TVirtualGeoPainter() override
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.