6 #include "GaudiKernel/SmartIF.h"
7 #include "GaudiKernel/Bootstrap.h"
8 #include "GaudiKernel/IAppMgrUI.h"
9 #include "GaudiKernel/IProperty.h"
10 #include "GaudiKernel/Property.h"
11 #include "GaudiKernel/StatusCode.h"
19 if( !appMgr || !propMgr ) {
20 std::cout <<
"Fatal error while creating the ApplicationMgr " << std::endl;
25 std:: string
opts = (argc>1) ? argv[1] :
"jobOptions.txt";
27 propMgr->setProperty(
"JobOptionsPath", opts ).ignore();
29 if( opts.compare( opts.length() - 3, 3,
".py" ) == 0 ) {
30 propMgr->setProperty(
"EvtSel",
"NONE" ).ignore();
31 propMgr->setProperty(
"JobOptionsType",
"NONE" ).ignore();
32 propMgr->setProperty(
"DLLs",
"['GaudiPython']" ).ignore();
33 propMgr->setProperty(
"Runable",
"PythonScriptingSvc" ).ignore();
39 propMgr->getProperty(&returnCode).ignore();
48 return returnCode.
value();
virtual StatusCode run()=0
Run the complete job (from initialize to terminate)
bool setValue(const TYPE &value) override
implementation of PropertyWithValue::setValue
bool isFailure() const
Test for a status code of FAILURE.
GAUDI_API long argc()
Number of arguments passed to the commandline (==numCmdLineArgs()); just to match argv call...
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
const TYPE & value() const
explicit conversion
GAUDI_API int GaudiMain(int argc, char **argv)
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
The IProperty is the basic interface for all components which have properties that can be set or get...
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)