diff --git a/RecoVertex/KalmanVertexFit/interface/SimpleVertexTree.h b/RecoVertex/KalmanVertexFit/interface/SimpleVertexTree.h index 792a68423c350..7947ed202d12c 100644 --- a/RecoVertex/KalmanVertexFit/interface/SimpleVertexTree.h +++ b/RecoVertex/KalmanVertexFit/interface/SimpleVertexTree.h @@ -106,6 +106,7 @@ class SimpleVertexTree { int maxTrack; TString* parameterNames[5]; TrackAssociatorByChi2 * associatorForParamAtPca; + std::atomic nFill{0}; }; #endif diff --git a/RecoVertex/KalmanVertexFit/src/SimpleVertexTree.cc b/RecoVertex/KalmanVertexFit/src/SimpleVertexTree.cc index 31089fbc9a91b..0ec3891bf5dbe 100644 --- a/RecoVertex/KalmanVertexFit/src/SimpleVertexTree.cc +++ b/RecoVertex/KalmanVertexFit/src/SimpleVertexTree.cc @@ -172,7 +172,6 @@ void SimpleVertexTree::fill() // // fill entry // - static int nFill(0); vertexTree->GetDirectory()->cd(); vertexTree->Fill(); if ( (++nFill)%1000==0 ) vertexTree->AutoSave();