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

glastRootIOTest.cxx

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

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