00001
00002
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
00015
00016
00017 #include <iostream>
00018
00019 int main( int argn, char** argc) {
00020 if(0) merit_loadRef();
00021
00022
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
00029 IInterface* iface = Gaudi::createApplicationMgr();
00030
00031 SmartIF<IProperty> propMgr ( IID_IProperty, iface );
00032 SmartIF<IAppMgrUI> appMgr ( IID_IAppMgrUI, iface );
00033
00034
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
00045 if ( appMgr ) {
00046 status = appMgr->run();
00047 }
00048 else {
00049 return 0;
00050 }
00051
00052
00053 return 0;
00054
00055 }