Skip to content

Commit

Permalink
rename GeoSvc to ActsGeoSvc
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel committed Sep 20, 2023
1 parent 11f72df commit 1376d91
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions geosvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
from pprint import pprint
from Gaudi.Configuration import *

from Configurables import GeoSvc
from Configurables import ActsGeoSvc

algList = []

a = GeoSvc("GeoSvc")
a = ActsGeoSvc("ActsGeoSvc")
a.detectors = ["/home/delitez/ACTS/acts/thirdparty/OpenDataDetector/xml/OpenDataDetector.xml"]
a.debugGeometry = True
a.outputFileName = "MyObjFile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/

#include "GeoSvc.h"
#include "ActsGeoSvc.h"
#include "Acts/Geometry/TrackingGeometry.hpp"
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/Plugins/DD4hep/ConvertDD4hepDetector.hpp"
Expand All @@ -32,11 +32,11 @@

using namespace Gaudi;

DECLARE_COMPONENT(GeoSvc)
DECLARE_COMPONENT(ActsGeoSvc)

GeoSvc::GeoSvc(const std::string& name, ISvcLocator* svc) : base_class(name, svc), m_log(msgSvc(), name) {}
ActsGeoSvc::ActsGeoSvc(const std::string& name, ISvcLocator* svc) : base_class(name, svc), m_log(msgSvc(), name) {}

GeoSvc::~GeoSvc() {
ActsGeoSvc::~ActsGeoSvc() {
if (m_dd4hepGeo != nullptr) {
try {
m_dd4hepGeo->destroyInstance();
Expand All @@ -46,7 +46,7 @@ GeoSvc::~GeoSvc() {
}
}

StatusCode GeoSvc::initialize() {
StatusCode ActsGeoSvc::initialize() {
if (m_xmlFileNames.size() > 0) {
m_log << MSG::INFO << "Loading xml files from: '" << m_xmlFileNames << "'" << endmsg;
} else {
Expand Down Expand Up @@ -92,13 +92,13 @@ StatusCode GeoSvc::initialize() {
return StatusCode::SUCCESS;
}

StatusCode GeoSvc::execute() { return StatusCode::SUCCESS; }
StatusCode ActsGeoSvc::execute() { return StatusCode::SUCCESS; }

StatusCode GeoSvc::finalize() { return StatusCode::SUCCESS; }
StatusCode ActsGeoSvc::finalize() { return StatusCode::SUCCESS; }

StatusCode GeoSvc::buildDD4HepGeo() {
StatusCode ActsGeoSvc::buildDD4HepGeo() {
m_dd4hepGeo = &(dd4hep::Detector::getInstance());
m_dd4hepGeo->addExtension<IGeoSvc>(this);
m_dd4hepGeo->addExtension<IActsGeoSvc>(this);

/// Load geometry
for (auto& filename : m_xmlFileNames) {
Expand All @@ -112,7 +112,7 @@ StatusCode GeoSvc::buildDD4HepGeo() {
}

/// Create a geometry OBJ file
StatusCode GeoSvc::createGeoObj() {
StatusCode ActsGeoSvc::createGeoObj() {
// Convert DD4Hep geometry to acts

Acts::ObjVisualization3D m_obj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Service.h"
#include "GaudiKernel/ServiceHandle.h"
#include "IGeoSvc.h"
#include "IActsGeoSvc.h"

class GeoSvc : public extends<Service, IGeoSvc> {
class ActsGeoSvc : public extends<Service, IActsGeoSvc> {
public:
using VolumeSurfaceMap = std::unordered_map<uint64_t, const Acts::Surface*>;

Expand Down Expand Up @@ -74,9 +74,9 @@ class GeoSvc : public extends<Service, IGeoSvc> {
MsgStream m_log;

public:
GeoSvc(const std::string& name, ISvcLocator* svc);
ActsGeoSvc(const std::string& name, ISvcLocator* svc);

virtual ~GeoSvc();
virtual ~ActsGeoSvc();

virtual StatusCode initialize() final;

Expand All @@ -91,5 +91,5 @@ class GeoSvc : public extends<Service, IGeoSvc> {
virtual const Acts::TrackingGeometry& trackingGeometry() const;
};

inline const Acts::TrackingGeometry& GeoSvc::trackingGeometry() const { return *m_trackingGeo; }
inline const Acts::TrackingGeometry& ActsGeoSvc::trackingGeometry() const { return *m_trackingGeo; }
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ namespace Acts {
class Surface;
} // namespace Acts

class GAUDI_API IGeoSvc : virtual public IService {
class GAUDI_API IActsGeoSvc : virtual public IService {
public:
using VolumeSurfaceMap = std::unordered_map<uint64_t, const Acts::Surface*>;

public:
DeclareInterfaceID(IGeoSvc, 1, 0);
DeclareInterfaceID(IActsGeoSvc, 1, 0);

virtual const Acts::TrackingGeometry& trackingGeometry() const = 0;

virtual ~IGeoSvc() {}
virtual ~IActsGeoSvc() {}
};

#endif // IGEOSVC_H

0 comments on commit 1376d91

Please sign in to comment.