Skip to content
Snippets Groups Projects
Commit 1b1e1991 authored by scott snyder's avatar scott snyder
Browse files

MagFieldServices: Load dictionaries early.

Root has problems with loading dictionaries if multiple threads are running.
Force load some dictionaries we'll need during initialization.
See ATEAM-749.
parent a149108b
No related merge requests found
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -27,6 +27,7 @@
// ROOT
#include "TFile.h"
#include "TTree.h"
#include "TClass.h"
MagField::AtlasFieldMapCondAlg::AtlasFieldMapCondAlg(const std::string& name,
ISvcLocator* pSvcLocator)
......@@ -63,6 +64,14 @@ MagField::AtlasFieldMapCondAlg::initialize() {
else {
ATH_MSG_INFO ( "Initialize: Will update the field map from jobOpt file name");
}
// Load these dictionaries now, so we don't need to try to do so
// while multiple threads are running.
TClass::GetClass ("TLeafI");
TClass::GetClass ("TLeafD");
TClass::GetClass ("TLeafO");
TClass::GetClass ("TLeafS");
return StatusCode::SUCCESS;
}
......
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