remove unneccesary mutex lock aand unlock for read only operations
This commit is contained in:
parent
36621dcf31
commit
e13db06ed3
|
@ -319,7 +319,7 @@ void SingleSpectra::FillHistograms(){
|
||||||
|
|
||||||
// qDebug() << randomChList;
|
// qDebug() << randomChList;
|
||||||
|
|
||||||
digiMTX[ID].lock();
|
// digiMTX[ID].lock();
|
||||||
|
|
||||||
// digi[ID]->GetData()->PrintAllData();
|
// digi[ID]->GetData()->PrintAllData();
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ void SingleSpectra::FillHistograms(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if( hist2DVisibility[ID] ) hist2D[ID]->UpdatePlot();
|
if( hist2DVisibility[ID] ) hist2D[ID]->UpdatePlot();
|
||||||
digiMTX[ID].unlock();
|
// digiMTX[ID].unlock();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,13 +94,13 @@ void Analyzer::BuildEvents(bool verbose){
|
||||||
|
|
||||||
unsigned int nData = mb->GetNumOfDigitizer();
|
unsigned int nData = mb->GetNumOfDigitizer();
|
||||||
std::vector<int> idList = mb->GetDigiIDList();
|
std::vector<int> idList = mb->GetDigiIDList();
|
||||||
for( unsigned int i = 0; i < nData; i++ ) digiMTX[idList[i]].lock();
|
// for( unsigned int i = 0; i < nData; i++ ) digiMTX[idList[i]].lock();
|
||||||
if( isBuildBackward ){
|
if( isBuildBackward ){
|
||||||
mb->BuildEventsBackWard(maxNumEventBuilt, verbose);
|
mb->BuildEventsBackWard(maxNumEventBuilt, verbose);
|
||||||
}else{
|
}else{
|
||||||
mb->BuildEvents(0, true, verbose);
|
mb->BuildEvents(0, true, verbose);
|
||||||
}
|
}
|
||||||
for( unsigned int i = 0; i < nData; i++ ) digiMTX[idList[i]].unlock();
|
// for( unsigned int i = 0; i < nData; i++ ) digiMTX[idList[i]].unlock();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user