Skip to content
Snippets Groups Projects
Commit 89b75b2e authored by FU Chengdong's avatar FU Chengdong
Browse files

allow only one of GearSvc and GeoSvc

parent d690ec7f
No related branches found
No related tags found
No related merge requests found
......@@ -17,18 +17,24 @@ TrackSystemSvc::~TrackSystemSvc(){
MarlinTrk::IMarlinTrkSystem* TrackSystemSvc::getTrackSystem(){
if(!m_trackSystem){
gear::GearMgr* mgr=0;
auto _gear = service<IGearSvc>("GearSvc");
if ( !_gear ) {
error() << "Failed to find GearSvc ..." << endmsg;
return 0;
info() << "Failed to find GearSvc ..." << endmsg;
}
else{
mgr = _gear->getGearMgr();
}
gear::GearMgr* mgr = _gear->getGearMgr();
auto _geoSvc = service<IGeoSvc>("GeoSvc");
if ( !_geoSvc ) {
error() << "Failed to find GeoSvc ..." << endmsg;
info() << "Failed to find GeoSvc ..." << endmsg;
}
if(mgr==0&&_geoSvc==0){
fatal() << "Both GearSvc and GeoSvc invalid!" << endmsg;
return 0;
}
m_trackSystem = new MarlinTrk::MarlinKalTest( *mgr, _geoSvc ) ;
}
return m_trackSystem;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment