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 ) ); }
70 std::string_view
name = item.first;
71 const auto sep_pos =
name.find_last_of(
'.' );
72 std::string_view client =
name.substr( 0, sep_pos );
73 name.remove_prefix( sep_pos + 1 );
87 evtMax.assign( prop->getProperty(
"EvtMax" ) );
90 if ( app->initialize() ) {
111 #ifdef GAUDI_HASCLASSVISIBILITY 112 # pragma GCC visibility push( default ) 119 gsl::span py_opts{
options,
static_cast<std::remove_cv_t<decltype( gsl::dynamic_extent )
>>(
n )};
120 for (
auto& opt : py_opts ) {
opts[opt.key] = opt.value; }
127 #ifdef GAUDI_HASCLASSVISIBILITY 128 # pragma GCC visibility pop int getAppReturnCode(const SmartIF< IProperty > &appmgr)
Get the application (current) return code.
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.
Gaudi::Application * _py_Gaudi__Application__create(const char *name, const c_opt_t *options, unsigned long n)
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