43 ISvcLocator * m_svcLoc;
48 std::string FileName=
"";
50 std::string filename_in[SZ] = {
"../cmt/CppUnit_jobOptions.txt",
"../test/CppUnit_jobOptions.txt",
"../share/CppUnit_jobOptions.txt"};
51 std::ifstream inFile[SZ];
53 for (
int i=0; i<SZ; i++)
58 inFile[i].open(fn.c_str());
78 FileName =
"../run/CppUnit_jobOptions_generated.txt";
79 std::system(
"touch ../run/CppUnit_jobOptions_generated.txt; rm ../run/CppUnit_jobOptions_generated.txt");
80 std::ofstream jobopt(
"../run/CppUnit_jobOptions_generated.txt");
83 std::list<std::string> opts;
84 opts.push_back(
"#pragma print off");
85 opts.push_back(
"ApplicationMgr.Dlls += { \"StoreGate\" };");
87 opts.push_back(
"ApplicationMgr.ExtSvc += { \"ClassIDSvc\" };");
88 opts.push_back(
"ApplicationMgr.ExtSvc += { \"StoreGateSvc\", \"StoreGateSvc/DetectorStore\", \"StoreGateSvc/HistoryStore\" };");
89 opts.push_back(
"ApplicationMgr.ExtSvc += { \"ActiveStoreSvc\" };");
90 opts.push_back(
"AuditorSvc.Auditors += { \"AlgContextAuditor\"};");
91 opts.push_back(
"StoreGateSvc.OutputLevel = 2;");
92 opts.push_back(
"StoreGateSvc.ActivateHistory = false;");
94 opts.push_back(
"MessageSvc.useColors = false;");
95 opts.push_back(
"MessageSvc.OutputLevel = 3;");
97 for ( std::list<std::string>::const_iterator iopt=opts.begin();
98 iopt!=opts.end(); ++iopt )
100 jobopt << *iopt << std::endl;
106 std::string fileName=FileName;
111 std::cerr <<
"This test can not be run" << std::endl;
114 CPPUNIT_ASSERT( 0 != m_svcLoc);
117 static const bool CREATE(
true);
118 bool sc = ( m_svcLoc->service(
"StoreGateSvc",
119 m_storeGate,
CREATE) ).isSuccess();
120 CPPUNIT_ASSERT(
sc );
121 CPPUNIT_ASSERT( 0 != m_storeGate );
123 if (
false ==
sc || 0 == m_storeGate ) {
124 std::string
error =
"No valid pointer to StoreGateSvc !!";
125 std::cerr <<
error << std::endl;
131 }
catch ( std::exception& e ) {
132 std::cerr <<
"Catched : " << e.what() << std::endl;