00001
00002
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
00014
00015
00016
00017
00018 #include <iostream>
00019
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
00031
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
00038 IInterface* iface = Gaudi::createApplicationMgr();
00039
00040 SmartIF<IProperty> propMgr ( IID_IProperty, iface );
00041 SmartIF<IAppMgrUI> appMgr ( IID_IAppMgrUI, iface );
00042
00043
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
00054 if ( appMgr ) {
00055 status = appMgr->run();
00056 }
00057 else {
00058 return 0;
00059 }
00060
00061
00062 return 0;
00063
00064 }