Skip to content
Snippets Groups Projects
Commit 6885b4dd authored by Andrei Gheata's avatar Andrei Gheata
Browse files

Lock methods ClearThreadData

git-svn-id: http://root.cern.ch/svn/root/trunk@41959 27541ba8-7e3a-0410-8455-c3a389f83636
parent 7b1acdab
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ TGeoBoolNode::ThreadData_t& TGeoBoolNode::GetThreadData() const
//______________________________________________________________________________
void TGeoBoolNode::ClearThreadData() const
{
TThread::Lock();
std::vector<ThreadData_t*>::iterator i = fThreadData.begin();
while (i != fThreadData.end())
{
......@@ -91,6 +92,7 @@ void TGeoBoolNode::ClearThreadData() const
}
fThreadData.clear();
fThreadSize = 0;
TThread::UnLock();
}
//______________________________________________________________________________
......
......@@ -366,6 +366,7 @@ TGeoManager::ThreadData_t& TGeoManager::GetThreadData() const
//______________________________________________________________________________
void TGeoManager::ClearThreadData() const
{
TThread::Lock();
std::vector<ThreadData_t*>::iterator i = fThreadData.begin();
while (i != fThreadData.end())
{
......@@ -377,6 +378,7 @@ void TGeoManager::ClearThreadData() const
TIter next(fVolumes);
TGeoVolume *vol;
while ((vol=(TGeoVolume*)next())) vol->ClearThreadData();
TThread::UnLock();
}
//_____________________________________________________________________________
......
......@@ -90,6 +90,7 @@ TGeoPatternFinder::ThreadData_t& TGeoPatternFinder::GetThreadData() const
//______________________________________________________________________________
void TGeoPatternFinder::ClearThreadData() const
{
TThread::Lock();
std::vector<ThreadData_t*>::iterator i = fThreadData.begin();
while (i != fThreadData.end())
{
......@@ -98,6 +99,7 @@ void TGeoPatternFinder::ClearThreadData() const
}
fThreadData.clear();
fThreadSize = 0;
TThread::UnLock();
}
//_____________________________________________________________________________
......
......@@ -2495,6 +2495,7 @@ TGeoVolumeAssembly::ThreadData_t& TGeoVolumeAssembly::GetThreadData() const
//______________________________________________________________________________
void TGeoVolumeAssembly::ClearThreadData() const
{
TThread::Lock();
TGeoVolume::ClearThreadData();
std::vector<ThreadData_t*>::iterator i = fThreadData.begin();
while (i != fThreadData.end())
......@@ -2504,6 +2505,7 @@ void TGeoVolumeAssembly::ClearThreadData() const
}
fThreadData.clear();
fThreadSize = 0;
TThread::UnLock();
}
//______________________________________________________________________________
......
......@@ -90,6 +90,7 @@ TGeoVoxelFinder::ThreadData_t& TGeoVoxelFinder::GetThreadData(Int_t tid) const
//______________________________________________________________________________
void TGeoVoxelFinder::ClearThreadData() const
{
TThread::Lock();
std::vector<ThreadData_t*>::iterator i = fThreadData.begin();
while (i != fThreadData.end())
{
......@@ -98,6 +99,7 @@ void TGeoVoxelFinder::ClearThreadData() const
}
fThreadData.clear();
fThreadSize = 0;
TThread::UnLock();
}
......
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