Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GaudiMain.cxx

Go to the documentation of this file.
00001 
00002 // Include files
00003 #include "Gaudi/Kernel/SmartIF.h"
00004 #include "Gaudi/Kernel/Bootstrap.h"
00005 #include "Gaudi/Interfaces/IAppMgrUI.h"
00006 #include "Gaudi/Interfaces/IProperty.h"
00007 #include "Gaudi/JobOptionsSvc/Property.h"
00008 #include "Gaudi/System/System.h"
00009 
00010 extern "C" void merit_loadRef();
00011 //------------------------------------------------------------------------------
00012 //
00013 //
00014 //  Description: Test Main Program
00015 //
00016 //------------------------------------------------------------------------------
00017 #include <iostream>
00018 
00019 int main( int argn, char** argc) {
00020     if(0) merit_loadRef();
00021     // get the path to this package from its root environment variable: if not there,
00022     // assume that we are in the root
00023     const char * local_path = ::getenv("MERITROOT");
00024     std::string joboptions_file = std::string(local_path? local_path: "");
00025 
00026     joboptions_file +=  std::string("/src/test/jobOptions.txt");
00027     
00028     // Create an instance of an application manager
00029     IInterface* iface = Gaudi::createApplicationMgr();
00030     
00031     SmartIF<IProperty>     propMgr ( IID_IProperty, iface );
00032     SmartIF<IAppMgrUI>     appMgr  ( IID_IAppMgrUI, iface );
00033     
00034     // Set properties of algorithms and services
00035     StatusCode status = StatusCode::SUCCESS;
00036     if ( iface && propMgr == iface )    {
00037         status = propMgr->setProperty( StringProperty("JobOptionsPath", joboptions_file) );
00038     }
00039     else  {
00040         exit(-1);
00041     }
00042 
00043     
00044     // Run the application manager and process events
00045     if ( appMgr )   {
00046         status = appMgr->run();
00047     }
00048     else  {
00049         return 0;
00050     }
00051     
00052     // All done - exit
00053     return 0;
00054     
00055 }

Generated at Wed Nov 21 12:20:39 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000