14 #define GAUDI_ASSERT_THROW_NAME( cond, msg, name ) \ 15 if ( !cond ) throw GaudiException{msg, name, StatusCode::FAILURE}; 17 #define GAUDI_ASSERT_THROW( cond, msg ) \ 18 if ( !cond ) throw GaudiException{msg, this->name(), StatusCode::FAILURE}; 24 const auto prefix_size =
prefix.size();
27 while ( opt !=
end(
options ) && std::string_view( opt->first ).substr( 0, prefix_size ) ==
prefix ) {
29 "failure setting " + opt->first +
" to " + opt->second,
"Gaudi::Application" );
37 if (
type ==
"Gaudi::Application" ) {
return std::make_unique<Application>(
std::move(
opts ) ); }
59 std::string_view
name = item.first;
60 const auto sep_pos =
name.find_last_of(
'.' );
61 std::string_view client =
name.substr( 0, sep_pos );
62 name.remove_prefix( sep_pos + 1 );
75 evtMax.assign( prop->getProperty(
"EvtMax" ) );
78 if ( app->initialize() ) {
86 app->finalize().ignore();
99 #ifdef GAUDI_HASCLASSVISIBILITY 100 # pragma GCC visibility push( default ) 108 for (
auto& opt : py_opts ) {
opts[opt.key] = opt.value; }
115 #ifdef GAUDI_HASCLASSVISIBILITY 116 # pragma GCC visibility pop int getAppReturnCode(const SmartIF< IProperty > &appmgr)
Get the application (current) return code.
Gaudi::Application * _py_Gaudi__Application__create(const char *name, const c_opt_t *options, long n)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Implementation of property with value of concrete type.
#define GAUDI_ASSERT_THROW_NAME(cond, msg, name)
virtual int run()
Implement the application main logic:
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
constexpr int GenericFailure
virtual const std::string & name() const =0
Retrieve the name of the instance.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
Main interface for the JobOptions service.
def create(cls, appType, opts)
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
Gaudi application entry point.
Application(Options opts)
Construct and configure the application from the provided options.
const StatusCode & ignore() const
Ignore/check StatusCode.
int _py_Gaudi__Application__run(Gaudi::Application *self)
The IEventProcessor is the interface to process events.
AttribStringParser::Iterator begin(const AttribStringParser &parser)
The IProperty is the basic interface for all components which have properties that can be set or get.
void _py_Gaudi__Application__delete(Gaudi::Application *self)
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
std::map< std::string, std::string > Options