Go to the documentation of this file.
23 #include <type_traits>
25 #define GAUDI_ASSERT_THROW_NAME( cond, msg, name ) \
26 if ( !cond ) throw GaudiException{ msg, name, StatusCode::FAILURE };
28 #define GAUDI_ASSERT_THROW( cond, msg ) \
29 if ( !cond ) throw GaudiException{ msg, this->name(), StatusCode::FAILURE };
35 const auto prefix_size =
prefix.size();
38 while ( opt !=
end(
options ) && std::string_view( opt->first ).substr( 0, prefix_size ) ==
prefix ) {
40 "failure setting " + opt->first +
" to " + opt->second,
"Gaudi::Application" );
48 if (
type ==
"Gaudi::Application" ) {
return std::make_unique<Application>(
std::move(
opts ) ); }
80 evtMax.assign( prop->getProperty(
"EvtMax" ) );
83 if (
app->initialize() ) {
91 app->finalize().ignore();
104 #ifdef GAUDI_HASCLASSVISIBILITY
105 # pragma GCC visibility push( default )
112 gsl::span py_opts{
options,
static_cast<std::remove_cv_t<decltype( gsl::dynamic_extent )
>>(
n ) };
113 for (
auto& opt : py_opts ) {
opts[opt.key] = opt.value; }
120 #ifdef GAUDI_HASCLASSVISIBILITY
121 # pragma GCC visibility pop
void _py_Gaudi__Application__delete(Gaudi::Application *self)
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
def create(cls, appType, opts)
Gaudi::Application * _py_Gaudi__Application__create(const char *name, const c_opt_t *options, unsigned long n)
Gaudi application entry point.
int _py_Gaudi__Application__run(Gaudi::Application *self)
int getAppReturnCode(const SmartIF< IProperty > &appmgr)
Get the application (current) return code.
Application(Options opts)
Construct and configure the application from the provided options.
#define GAUDI_ASSERT_THROW_NAME(cond, msg, name)
Gaudi::Interfaces::IOptionsSvc & getOptsSvc()
Direct access to Gaudi::Interfaces::IOptionsSvc implementation.
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
virtual int run()
Implement the application main logic:
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr int GenericFailure