17static int LoadCanvasPainterLibraryOnce() {
18 static int loadResult =
gSystem->
Load(
"libROOTCanvasPainter");
20 R__ERROR_HERE(
"Gpad") <<
"Loading of libROOTCanvasPainter failed!";
23static void LoadCanvasPainterLibrary() {
24 static int loadResult = LoadCanvasPainterLibraryOnce();
33std::unique_ptr<ROOT::Experimental::Internal::RVirtualCanvasPainter::Generator>
37 static std::unique_ptr<Generator> generator;
44 if (!GetGenerator()) {
45 LoadCanvasPainterLibrary();
46 if (!GetGenerator()) {
47 R__ERROR_HERE(
"Gpad") <<
"RVirtualCanvasPainter::Generator failed to register!";
48 throw std::runtime_error(
"RVirtualCanvasPainter::Generator failed to initialize");
51 return GetGenerator()->Create(canv);
#define R__ERROR_HERE(GROUP)
typedef void((*Func_t)())
R__EXTERN TSystem * gSystem
virtual ~Generator()
Default destructor.
static std::unique_ptr< RVirtualCanvasPainter > Create(const RCanvas &canv)
Loads the plugin that implements this class.
virtual ~RVirtualCanvasPainter()
Default destructor.
static std::unique_ptr< Generator > & GetGenerator()
generator getter
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.