Skip to content
Snippets Groups Projects
Commit 66334fc1 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'thread.DataModelAthenaPool-20200901' into 'master'

DataModelAthenaPool+TrkEventCnvTools: Enable thread-safety checker.

See merge request atlas/athena!36087
parents b1091906 1fb24a66
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36087DataModelAthenaPool+TrkEventCnvTools: Enable thread-safety checker.
Showing
with 26 additions and 20 deletions
Control/DataModelAthenaPool
......@@ -14,6 +14,7 @@
#include "TClass.h"
#include "TBuffer.h"
#include "RootUtils/TClassEditRootUtils.h"
#include "CxxUtils/checker_macros.h"
#include "TMemberStreamer.h"
#include "TStreamerElement.h"
#include "TStreamerInfo.h"
......@@ -26,6 +27,7 @@
#include <sstream>
#include <cstring>
#include <algorithm>
#include <mutex>
namespace {
......@@ -421,10 +423,6 @@ void test_dv (RootUtils::ILogger* logfn,
}
// List of classes we've already processed.
std::vector<TClass*> s_seen;
} // anonymous namespace
......@@ -443,6 +441,12 @@ namespace DataModelAthenaPool {
*/
void DataVectorConvert::initialize (RootUtils::ILogger* logfn /* = 0*/)
{
static std::mutex m;
std::lock_guard<std::mutex> lock (m);
// List of classes we've already processed.
static std::vector<TClass*> s_seen ATLAS_THREAD_SAFE;
TIter next (gROOT->GetListOfClasses());
while (TClass* cls = dynamic_cast<TClass*> (next())) {
if (std::strncmp (cls->GetName(), "DataVector<", 11) == 0) {
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -53,7 +53,7 @@ void test1()
int main()
{
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/ElementLinkCnv_p1_test.cxx
......@@ -80,7 +80,7 @@ void test1()
int main()
{
std::cout << "DataModelAthenaPool/ElementLinkCnv_p1_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/ElementLinkCnv_p2_test.cxx
......@@ -91,7 +91,7 @@ void test1()
int main()
{
std::cout << "DataModelAthenaPool/ElementLinkCnv_p2_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/ElementLinkCnv_p3_test.cxx
......@@ -77,7 +77,7 @@ void test1()
int main()
{
std::cout << "DataModelAthenaPool/ElementLinkCnv_p3_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/ElementLinkVectorCnv_p1_test.cxx
......@@ -109,7 +109,7 @@ void test1()
int main()
{
std::cout << "DataModelAthenaPool/ElementLinkVectorCnv_p1_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/NavigableCnv_p1_test.cxx
......@@ -150,7 +150,7 @@ void test2()
int main()
{
std::cout << "DataModelAthenaPool/NavigableCnv_p1_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
test2();
return 0;
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/NavigableCnv_p2_test.cxx
......@@ -140,7 +140,7 @@ void test2()
int main()
{
std::cout << "DataModelAthenaPool/NavigableCnv_p2_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
test2();
return 0;
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file DataModelAthenaPool/test/VectorElementLinkCnv_p1_test.cxx
......@@ -102,7 +102,7 @@ void test1()
int main()
{
std::cout << "DataModelAthenaPool/VectorElementLinkCnv_p1_test\n";
SGTest::initTestStore();
std::unique_ptr<SGTest::TestStore> testStore = SGTest::getTestStore();
test1();
return 0;
}
Tracking/TrkEventCnv/TrkEventCnvTools
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