00001
00002
00003
00004 #include "GaudiKernel/SmartIF.h"
00005 #include "GaudiKernel/Bootstrap.h"
00006 #include "GaudiKernel/IAppMgrUI.h"
00007 #include "GaudiKernel/IProperty.h"
00008 #include "GaudiKernel/Property.h"
00009 #include "GaudiKernel/System.h"
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <iostream>
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 int main( int argn, char** argc) {
00031
00032
00033
00034 const char * local_path = ::getenv("CALRECONROOT");
00035 std::string joboptions_file = std::string(local_path? local_path: "");
00036
00037 joboptions_file += std::string("/src/test/jobOptions.txt");
00038
00039
00040 IInterface* iface = Gaudi::createApplicationMgr();
00041
00042 SmartIF<IProperty> propMgr ( IID_IProperty, iface );
00043 SmartIF<IAppMgrUI> appMgr ( IID_IAppMgrUI, iface );
00044
00045
00046 StatusCode status = StatusCode::SUCCESS;
00047 if ( iface && propMgr == iface ) {
00048 status = propMgr->setProperty( StringProperty("JobOptionsPath", joboptions_file) );
00049 }
00050 else {
00051 exit(-1);
00052 }
00053
00054
00055
00056 if ( appMgr ) {
00057 status = appMgr->run();
00058 }
00059 else {
00060 return 0;
00061 }
00062
00063
00064 return 0;
00065
00066 }