Skip to content
Snippets Groups Projects
Commit d6621c0f authored by Scott Snyder's avatar Scott Snyder Committed by Edward Moyse
Browse files

BeamPipeGeoModel: Enable thread-safety checking.

parent b597b0f8
No related branches found
No related tags found
3 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51741BeamPipeGeoModel: Enable thread-safety checking.
AtlasGeometryCommon/BeamPipeGeoModel
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#ifndef BeamPipeDetectorManager_h
......@@ -27,14 +27,14 @@ class BeamPipeDetectorManager : public GeoVDetectorManager
virtual PVConstLink getTreeTop(unsigned int i) const;
// Add a Tree top:
void addTreeTop(PVLink);
void addTreeTop(PVConstLink);
private:
const BeamPipeDetectorManager & operator=(const BeamPipeDetectorManager &right);
BeamPipeDetectorManager(const BeamPipeDetectorManager &right);
std::vector<PVLink> m_volume;
std::vector<PVConstLink> m_volume;
};
......
......@@ -20,8 +20,7 @@ void BeamPipeDetectorFactory_Lite::create(GeoPhysVol *world)
m_manager=new BeamPipeDetectorManager();
GeoVolumeCursor cursor(world);
while (!cursor.atEnd()) {
GeoVPhysVol *physVol=const_cast<GeoVPhysVol *> (cursor.getVolume().operator->());
if (cursor.getName()=="BeamPipe") m_manager->addTreeTop(physVol);
if (cursor.getName()=="BeamPipe") m_manager->addTreeTop(cursor.getVolume());
cursor.next();
}
}
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include "BeamPipeGeoModel/BeamPipeDetectorManager.h"
......@@ -28,7 +28,7 @@ PVConstLink BeamPipeDetectorManager::getTreeTop(unsigned int i) const
return m_volume[i];
}
void BeamPipeDetectorManager::addTreeTop(PVLink vol)
void BeamPipeDetectorManager::addTreeTop(PVConstLink vol)
{
vol->ref();
m_volume.push_back(vol);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment