17 #include "GaudiKernel/ISvcLocator.h"
18 #include "GaudiKernel/Bootstrap.h"
29 std::string options_file )
32 if (options_file.empty()) {
33 std::string::size_type
pos = progname.rfind (
"/");
34 if (
pos != std::string::npos)
35 progname.erase (0,
pos+1);
36 pos = progname.rfind (
".");
37 if (
pos != std::string::npos)
38 progname.erase (
pos, std::string::npos);
39 options_file =
"./" + progname +
"_generated.txt";
40 (void)
remove (options_file.c_str());
41 std::ofstream jobopt(options_file.c_str());
45 std::list<std::string>
opts;
46 opts.push_back(
"#pragma print off");
47 opts.push_back(
"ApplicationMgr.Dlls += { \"StoreGate\" };");
49 opts.push_back(
"ApplicationMgr.ExtSvc += { \"ClassIDSvc\" };");
50 opts.push_back(
"ApplicationMgr.ExtSvc += { \"StoreGateSvc\", \"StoreGateSvc/DetectorStore\", \"StoreGateSvc/ConditionStore\", \"StoreGateSvc/HistoryStore\" };");
51 opts.push_back(
"ApplicationMgr.ExtSvc += { \"ActiveStoreSvc\" };");
52 opts.push_back(
"AuditorSvc.Auditors += { \"AlgContextAuditor\"};");
53 opts.push_back(
"StoreGateSvc.OutputLevel = 2;");
54 opts.push_back(
"StoreGateSvc.ActivateHistory = false;");
56 opts.push_back(
"MessageSvc.useColors = false;");
57 opts.push_back(
"MessageSvc.OutputLevel = 3;");
59 for ( std::list<std::string>::const_iterator iopt=
opts.begin();
60 iopt!=
opts.end(); ++iopt )
62 jobopt << *iopt << std::endl;
70 ISvcLocator* svcLoc = 0;
72 std::cerr <<
"This test can not be run" << std::endl;
77 SmartIF<StoreGateSvc>
storeGate{svcLoc->service(
"StoreGateSvc" )};
81 std::string
error =
"No valid pointer to StoreGateSvc !!";
82 std::cerr <<
error << std::endl;
88 std::cerr <<
"Caught : " <<
e.what() << std::endl;