Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualGeoChecker.cxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9/** \class TVirtualGeoChecker
10\ingroup Geometry_classes
11
12Abstract class for geometry checkers
13*/
14
15#include "TROOT.h"
16#include "TVirtualGeoChecker.h"
17#include "TPluginManager.h"
18#include "TGeoManager.h"
19
21
22////////////////////////////////////////////////////////////////////////////////
23/// Geometry checker default constructor
24
26
27////////////////////////////////////////////////////////////////////////////////
28/// Geometry checker destructor
29
34
35////////////////////////////////////////////////////////////////////////////////
36/// Set number of points to be generated on the shape outline when checking for overlaps.
37
39{
41 if (npoints < 1000) {
42 Error("SetNmeshPoints", "Cannot allow less than 1000 points for checking - set to 1000");
43 fNmeshPoints = 1000;
44 }
45}
46
47////////////////////////////////////////////////////////////////////////////////
48/// Static function returning a pointer to the geometry checker.
49/// If the geometry checker does not exist a default checker is created.
50
52{
53 // if no painter set yet, create a default painter via the PluginManager
54 if (!fgGeoChecker) {
56 if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGeoChecker"))) {
57 if (h->LoadPlugin() == -1)
58 return nullptr;
59 fgGeoChecker = (TVirtualGeoChecker *)h->ExecPlugin(1, gGeoManager);
60 }
61 }
62 return fgGeoChecker;
63}
#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.
R__EXTERN TGeoManager * gGeoManager
#define gROOT
Definition TROOT.h:414
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1088
Abstract class for geometry checkers.
static TVirtualGeoChecker * fgGeoChecker
TVirtualGeoChecker * GeoChecker()
Static function returning a pointer to the geometry checker.
void SetNmeshPoints(Int_t npoints=1000)
Set number of points to be generated on the shape outline when checking for overlaps.
~TVirtualGeoChecker() override
Geometry checker destructor.
TVirtualGeoChecker()
Geometry checker default constructor.