Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow for reordered DD4hep_service geometry arguments #1035

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/services/geometry/dd4hep/DD4hep_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,22 @@ DD4hep_service::~DD4hep_service(){
/// Call Initialize if needed.
//----------------------------------------------------------------
dd4hep::Detector* DD4hep_service::detector() {
std::call_once( init_flag, &DD4hep_service::Initialize, this);
std::call_once(init_flag, &DD4hep_service::Initialize, this);
return (m_dd4hepGeo);
}

//----------------------------------------------------------------
// cellIDPositionConverter
//
/// Return pointer to the cellIDPositionConverter object.
/// Call Initialize if needed.
//----------------------------------------------------------------
std::shared_ptr<const dd4hep::rec::CellIDPositionConverter>
DD4hep_service::cellIDPositionConverter() {
std::call_once(init_flag, &DD4hep_service::Initialize, this);
return (m_cellid_converter);
}

//----------------------------------------------------------------
// Initialize
//
Expand Down
5 changes: 1 addition & 4 deletions src/services/geometry/dd4hep/DD4hep_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ class DD4hep_service : public JService
virtual ~DD4hep_service();

virtual dd4hep::Detector* detector();
virtual std::shared_ptr<const dd4hep::rec::CellIDPositionConverter> cellIDPositionConverter() {
return m_cellid_converter;
}

virtual std::shared_ptr<const dd4hep::rec::CellIDPositionConverter> cellIDPositionConverter();
protected:
void Initialize();

Expand Down
Loading