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();
37 auto opt = options.upper_bound( prefix );
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" );
42 opt = options.erase( opt );
48 if ( type ==
"Gaudi::Application" ) {
return std::make_unique<Application>( std::move( opts ) ); }
49 return Factory::create( type, std::move( opts ) );
69 for (
const auto& [name, value] : options ) jos.set( name, value );
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::Application * _py_Gaudi__Application__create(const char *name, const c_opt_t *options, unsigned long n)
int _py_Gaudi__Application__run(Gaudi::Application *self)
#define GAUDI_ASSERT_THROW_NAME(cond, msg, name)
Gaudi application entry point.
Application(Options opts)
Construct and configure the application from the provided options.
SmartIF< IStateful > app
Handle to the ApplicationMgr instance.
virtual int run()
Implement the application main logic:
create(cls, appType, opts)
std::map< std::string, std::string > Options
Implementation of property with value of concrete type.
The IEventProcessor is the interface to process events.
The IProperty is the basic interface for all components which have properties that can be set or get.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Gaudi::Interfaces::IOptionsSvc & getOptsSvc()
Direct access to Gaudi::Interfaces::IOptionsSvc implementation.
Small smart pointer class with automatic reference counting for IInterface.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr int GenericFailure
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
int getAppReturnCode(const SmartIF< IProperty > &appmgr)
Get the application (current) return code.
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.