diff --git a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h index c8578cb84b13053b4146684448debe36f514c6cf..2a214623383bdeee5d3e6a98235724f14f5fa42a 100644 --- a/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h +++ b/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoLogVol.h @@ -39,7 +39,7 @@ class GeoLogVol : public RCBase } // In some cases (gases, liquids) materials be updated? - void setMaterial (const GeoMaterial *newMaterial) { + void setMaterial (const GeoMaterial *newMaterial) const { m_material=newMaterial; } @@ -52,7 +52,7 @@ class GeoLogVol : public RCBase std::string m_name{}; // Material composition of this volume. - GeoIntrusivePtr<const GeoMaterial> m_material{}; + mutable GeoIntrusivePtr<const GeoMaterial> m_material{}; // Shape of this volume. GeoIntrusivePtr<const GeoShape> m_shape{}; diff --git a/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx b/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx index fd8e240f49f4b9660d3ac05e558f38406c4a2417..63174c04931c6fb767815f6deb76247bccdba3e6 100644 --- a/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx +++ b/GeoModelExamples/KitchenSinkPlugin/src/KitchenSinkPlugin.cxx @@ -294,7 +294,7 @@ void KitchenSinkPlugin::create(GeoVPhysVol *world, bool /*publish*/) { double height=platformHeight/2.0+barThickness/2.0+flangeThickness/2.0+barThickness; double xHalfLength=leftRightLegSeparation/2.0-barWidth1/2.0-cutoutWidth/2.0-barWidth2/2.0 ; const GeoBox *wBox = new GeoBox(xHalfLength, cutoutDepth/2.0 ,barThickness/2.0); - GeoLogVol *wLog = new GeoLogVol("WLog", wBox, Aluminium); + const GeoLogVol *wLog = new GeoLogVol("WLog", wBox, Aluminium); GeoPhysVol *wPhys = new GeoPhysVol(wLog); GeoTransform *wTransform = new GeoTransform( GeoTrf::Translate3D(-(61.0+11.0/16.0+4.0)/2.0+xHalfLength+4,0,height)