ATLAS Offline Software
Geo2G4SvcAccessor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEO2G4_Geo2G4SvcAccessor_H
6 #define GEO2G4_Geo2G4SvcAccessor_H
7 
10 
11 #include "GaudiKernel/ISvcLocator.h"
12 #include "GaudiKernel/Bootstrap.h"
13 
15 public:
16  Geo2G4SvcBase* GetGeo2G4Svc() const;
17 };
18 
20 {
21  IService* g2gSvc;
22  ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap
23  StatusCode result = svcLocator->service("Geo2G4Svc",g2gSvc);
24 
25  if(result.isSuccess())
26  {
27  Geo2G4SvcBase* temp=dynamic_cast<Geo2G4SvcBase*>(g2gSvc);
28  return temp;
29  }
30  else
31  return 0;
32 }
33 
34 #endif
get_generator_info.result
result
Definition: get_generator_info.py:21
Geo2G4SvcAccessor::GetGeo2G4Svc
Geo2G4SvcBase * GetGeo2G4Svc() const
Definition: Geo2G4SvcAccessor.h:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IGeo2G4Svc.h
Geo2G4SvcAccessor
Definition: Geo2G4SvcAccessor.h:14
Geo2G4SvcBase
Definition: Geo2G4SvcBase.h:14
Geo2G4SvcBase.h