The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
CustomAppFromOptions.py
Go to the documentation of this file.
14
15# Workaround for ROOT-10769
16import warnings
17
18with warnings.catch_warnings():
19 warnings.simplefilter("ignore")
20 import cppyy
21
22# - we have to load GaudiKernel get the base class
23cppyy.gbl.gSystem.Load("libGaudiKernel.so")
24
25# - pass to ROOT interpreter our code
26cppyy.gbl.gInterpreter.Declare(
27 r"""
28#include <Gaudi/Application.h>
29#include <iostream>
30
31namespace Test {
32 class CustomApp : public Gaudi::Application {
33 using Application::Application;
34 int run() override {
35 std::cout << "=== Custom Application ===\n";
36 return EXIT_SUCCESS;
37 }
38 };
39}
40DECLARE_COMPONENT(Test::CustomApp)
41"""
42)
43
44# IMPORTANT: gaudirun.py must be invoked passing "--application=Test::CustomApp"