Skip to content

Commit

Permalink
Merge pull request #12033 from Dr15Jones/makeHistFitThreadSafe_7_5
Browse files Browse the repository at this point in the history
Set ROOT histogram fitting to be thread-safe
  • Loading branch information
cmsbuild committed Oct 27, 2015
2 parents 9785dd0 + 15a24e3 commit e9392d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "TROOT.h"
#include "TH1F.h"
#include "TF1.h"
#include "TMinuitMinimizer.h"

/*****************************************************************************/
HIPixelMedianVtxProducer::HIPixelMedianVtxProducer(const edm::ParameterSet& ps) :
Expand All @@ -29,6 +30,10 @@ HIPixelMedianVtxProducer::HIPixelMedianVtxProducer(const edm::ParameterSet& ps)
theFitBinning(ps.getParameter<int>("FitBinsPerCm"))
{
produces<reco::VertexCollection>();

//In order to make fitting ROOT histograms thread safe
// one must call this undocumented function
TMinuitMinimizer::UseStaticMinuit(false);
}

/*****************************************************************************/
Expand Down

0 comments on commit e9392d8

Please sign in to comment.