25 {
26
27
28
29 std::cout<<std::endl
30 << "**************************************************" << std::endl
31 << " BOSS version: "<<getenv("BES_RELEASE") << std::endl
32 << "************** BESIII Collaboration **************" << std::endl
33 << std::endl;
34
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;
40 return 1;
41 }
42
43
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())
48 {
49 std::cout<<"ERROR! the jobOptions file is empty!"<<std::endl;
50 exit(1);
51 }
53 std::string temp;
54 while(!fin.eof())
55 {
56 fin>>temp;
58 }
60 {
61 std::cout<<"Please check your jobOptions."<<std::endl;
62 exit(1);
63 }
64
65
66 propMgr->setProperty( "JobOptionsPath", opts );
67 if( opts.substr( opts.length() - 3, 3 ) == ".py" ) {
68
69
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" );
78 }
79
80
81 return (appMgr->run().isSuccess()) ? 0 : 1;
82}
EvtComplex cont(const EvtTensor4C &t1, const EvtTensor4C &t2)