Gaudi Framework, version v20r4

Generated: 8 Jan 2009

GaudiMain.cpp File Reference

#include "GaudiKernel/SmartIF.h"
#include "GaudiKernel/Bootstrap.h"
#include "GaudiKernel/IAppMgrUI.h"
#include "GaudiKernel/IProperty.h"
#include "GaudiKernel/StatusCode.h"
#include <iostream>

Include dependency graph for GaudiMain.cpp:

Go to the source code of this file.

Functions

int GaudiMain (int argc, char **argv)


Function Documentation

int GaudiMain ( int  argc,
char **  argv 
)

Definition at line 14 of file GaudiMain.cpp.

00014                                                {
00015   IInterface* iface = Gaudi::createApplicationMgr();
00016   SmartIF<IProperty>     propMgr ( IID_IProperty, iface );
00017   SmartIF<IAppMgrUI>     appMgr  ( IID_IAppMgrUI, iface );
00018 
00019   if( !appMgr.isValid() || !propMgr.isValid() ) {
00020     std::cout << "Fatal error while creating the ApplicationMgr " << std::endl;
00021     return 1;
00022   }
00023 
00024   // Get the input configuration file from arguments
00025   std:: string opts = (argc>1) ? argv[1] : "jobOptions.txt";
00026 
00027   propMgr->setProperty( "JobOptionsPath", opts ).ignore();
00028 
00029   if( opts.substr( opts.length() - 3, 3 ) == ".py" ) {
00030     propMgr->setProperty( "EvtSel",         "NONE" ).ignore();
00031     propMgr->setProperty( "JobOptionsType", "NONE" ).ignore();
00032     propMgr->setProperty( "DLLs",           "['GaudiPython']" ).ignore();
00033     propMgr->setProperty( "Runable",        "PythonScriptingSvc" ).ignore();
00034   }
00035 
00036   // Run the application manager and process events
00037   StatusCode sc=appMgr->run();
00038   // Release Application Manager
00039   iface->release();
00040   // All done - exit
00041   return (sc.isSuccess())?0:1;
00042 }


Generated at Thu Jan 8 17:48:20 2009 for Gaudi Framework, version v20r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004