Gaudi Framework, version v25r0

Home   Generated: Mon Feb 17 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
GaudiMain.cpp File Reference
#include "GaudiKernel/SmartIF.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IAppMgrUI.h"
#include "GaudiKernel/IProperty.h"
#include "GaudiKernel/Property.h"
#include "GaudiKernel/StatusCode.h"
#include <iostream>
Include dependency graph for GaudiMain.cpp:

Go to the source code of this file.

Functions

GAUDI_API int GaudiMain (int argc, char **argv)
 

Function Documentation

GAUDI_API int GaudiMain ( int  argc,
char **  argv 
)

Definition at line 15 of file GaudiMain.cpp.

{
SmartIF<IProperty> propMgr ( iface );
if( !appMgr.isValid() || !propMgr.isValid() ) {
std::cout << "Fatal error while creating the ApplicationMgr " << std::endl;
return 1;
}
// Get the input configuration file from arguments
std:: string opts = (argc>1) ? argv[1] : "jobOptions.txt";
propMgr->setProperty( "JobOptionsPath", opts ).ignore();
if( opts.substr( opts.length() - 3, 3 ) == ".py" ) {
propMgr->setProperty( "EvtSel", "NONE" ).ignore();
propMgr->setProperty( "JobOptionsType", "NONE" ).ignore();
propMgr->setProperty( "DLLs", "['GaudiPython']" ).ignore();
propMgr->setProperty( "Runable", "PythonScriptingSvc" ).ignore();
}
// Run the application manager and process events
StatusCode sc = appMgr->run();
IntegerProperty returnCode("ReturnCode", 0);
propMgr->getProperty(&returnCode).ignore();
// Release Application Manager
iface->release();
// All done - exit
if (sc.isFailure() && returnCode.value() == 0) {
// propagate a valid error code in case of failure
returnCode.setValue(1);
}
return returnCode.value();
}

Generated at Mon Feb 17 2014 14:37:54 for Gaudi Framework, version v25r0 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004