Skip to content

Commit

Permalink
feat: use const Detector in several DDRec constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
wdconinc committed Jul 26, 2023
1 parent 7a1062c commit 1ae088d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DDRec/include/DDRec/CellIDPositionConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace dd4hep {
public:

/// The constructor - takes the main description object.
CellIDPositionConverter( Detector& description ) : _description( &description ) {
CellIDPositionConverter(const Detector& description ) : _description( &description ) {
_volumeManager = VolumeManager::getVolumeManager(description);
}

Expand Down
4 changes: 2 additions & 2 deletions DDRec/include/DDRec/MaterialScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace dd4hep {
private:

/// Reference to detector setup
Detector& m_detector;
const Detector& m_detector;
/// Material manager
std::unique_ptr<MaterialManager> m_materialMgr; //!
/// Local cache: subdetector placements
Expand All @@ -64,7 +64,7 @@ namespace dd4hep {
public:

/// Standard constructor for the master instance
MaterialScan(Detector& description);
MaterialScan(const Detector& description);

/// Default destructor
virtual ~MaterialScan();
Expand Down
4 changes: 2 additions & 2 deletions DDRec/include/DDRec/SurfaceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace dd4hep {

public:
/// The constructor
SurfaceManager(Detector& theDetector);
SurfaceManager(const Detector& theDetector);

/// No default constructor
#if defined(G__ROOT)
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace dd4hep {


/// initialize all known surface maps
void initialize(Detector& theDetector) ;
void initialize(const Detector& theDetector) ;

SurfaceMapsMap _map ;
};
Expand Down
2 changes: 1 addition & 1 deletion DDRec/src/MaterialScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ MaterialScan::MaterialScan()
}

/// Default constructor
MaterialScan::MaterialScan(Detector& description)
MaterialScan::MaterialScan(const Detector& description)
: m_detector(description)
{
m_materialMgr.reset(new MaterialManager(m_detector.world().volume()));
Expand Down
4 changes: 2 additions & 2 deletions DDRec/src/SurfaceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace dd4hep {
namespace rec {


SurfaceManager::SurfaceManager(Detector& theDetector){
SurfaceManager::SurfaceManager(const Detector& theDetector){

// have to make sure the volume manager is populated once in order to have
// the volumeIDs attached to the DetElements
Expand All @@ -52,7 +52,7 @@ namespace dd4hep {
return 0 ;
}

void SurfaceManager::initialize(Detector& description) {
void SurfaceManager::initialize(const Detector& description) {

const std::vector<std::string>& types = description.detectorTypes() ;

Expand Down

0 comments on commit 1ae088d

Please sign in to comment.