24static int LoadCanvasPainterLibraryOnce() {
25 static int loadResult =
gSystem->
Load(
"libROOTCanvasPainter");
27 R__ERROR_HERE(
"Gpad") <<
"Loading of libROOTCanvasPainter failed!";
30static void LoadCanvasPainterLibrary() {
31 static int loadResult = LoadCanvasPainterLibraryOnce();
40std::unique_ptr<ROOT::Experimental::Internal::RVirtualCanvasPainter::Generator>
44 static std::unique_ptr<Generator> generator;
51 if (!GetGenerator()) {
52 LoadCanvasPainterLibrary();
53 if (!GetGenerator()) {
54 R__ERROR_HERE(
"Gpad") <<
"RVirtualCanvasPainter::Generator failed to register!";
55 throw std::runtime_error(
"RVirtualCanvasPainter::Generator failed to initialize");
58 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.