//$Id: GaudiMain.cpp,v 1.9 2006/11/17 16:04:46 mato Exp $ // // Include files #include "GaudiKernel/SmartIF.h" #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/IAppMgrUI.h" #include "GaudiKernel/IProperty.h" #include //--- Example main program int main ( int argc, char** argv ) { // Create an instance of an application manager IInterface* iface = Gaudi::createApplicationMgr(); SmartIF propMgr ( iface ); SmartIF appMgr ( 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 ); if( opts.substr( opts.length() - 3, 3 ) == ".py" ) { propMgr->setProperty( "EvtSel", "NONE" ); propMgr->setProperty( "JobOptionsType", "NONE" ); propMgr->setProperty( "DLLs", "['GaudiPython']" ); propMgr->setProperty( "Runable", "PythonScriptingSvc" ); } // Run the application manager and process events appMgr->run().ignore(); // All done - exit iface->release().ignore(); return 0; }