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();
26 auto opt = options.upper_bound( prefix );
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" );
31 opt = options.erase( opt );
37 if ( type ==
"Gaudi::Application" ) {
return std::make_unique<Application>(
std::move( opts ) ); }
38 return Factory::create( type,
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" ) );
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)
#define GAUDI_ASSERT_THROW_NAME(cond, msg, name)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Implementation of property with value of concrete type.
virtual int run()
Implement the application main logic:
virtual StatusCode terminate()=0
Initialization (from CONFIGURED to OFFLINE).
constexpr int GenericFailure
virtual StatusCode start()=0
Start (from INITIALIZED to RUNNING).
SmartIF< IStateful > app
Handle to the ApplicationMgr 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.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Main interface for the JobOptions service.
virtual StatusCode stop()=0
Stop (from RUNNING to INITIALIZED).
def create(cls, appType, opts)
virtual StatusCode initialize()=0
Initialization (from CONFIGURED to INITIALIZED).
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.
int _py_Gaudi__Application__run(Gaudi::Application *self)
const StatusCode & ignore() const
Ignore/check StatusCode.
virtual StatusCode finalize()=0
Finalize (from INITIALIZED to CONFIGURED).
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...
virtual StatusCode configure()=0
Configuration (from OFFLINE to CONFIGURED).
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