25int main(
int argc,
char* argv[] ) {
30 <<
"**************************************************" << std::endl
31 <<
" BOSS version: "<<getenv(
"BES_RELEASE") << std::endl
32 <<
"************** BESIII Collaboration **************" << std::endl
35 IInterface* iface = Gaudi::createApplicationMgr();
36 SmartIF<IProperty> propMgr ( iface );
37 SmartIF<IAppMgrUI> appMgr ( iface );
38 if( !appMgr.isValid() || !propMgr.isValid() ) {
39 std::cout <<
"Fatal error while creating the ApplicationMgr " << std::endl;
44 std:: string opts = (argc>1) ? argv[1] :
"jobOptions.txt";
45 std::cout<<
"the jobOptions file is : " <<opts<<std::endl;
46 std::ifstream fin(opts.c_str());
47 if(fin.peek()==std::ifstream::traits_type::eof())
49 std::cout<<
"ERROR! the jobOptions file is empty!"<<std::endl;
61 std::cout<<
"Please check your jobOptions."<<std::endl;
66 propMgr->setProperty(
"JobOptionsPath", opts );
67 if( opts.substr( opts.length() - 3, 3 ) ==
".py" ) {
70 propMgr->setProperty(
"JobOptionsType",
"NONE" );
71 propMgr->setProperty(
"DLLs",
72 "['BossServices', 'GaudiPython', 'McEventSelector' ,'GaudiSvc']" );
73 propMgr->setProperty(
"ExtSvc",
74 "[ 'McEventSelector/EventSelector']" );
75 propMgr->setProperty(
"Runable",
"PythonScriptingSvc" );
76 propMgr->setProperty(
"EventLoop",
"BossEventLoopMgr" );
77 propMgr->setProperty(
"OutStreamType",
"BossOutputStream" );
81 return (appMgr->run().isSuccess()) ? 0 : 1;