Mantid
Loading...
Searching...
No Matches
Framework
TestHelpers
src
TearDownWorld.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
//-----------------------------------------------------------------------------
8
// Includes
9
//-----------------------------------------------------------------------------
10
#include "
MantidFrameworkTestHelpers/TearDownWorld.h
"
11
#include "
MantidAPI/AlgorithmManager.h
"
12
#include "
MantidAPI/AnalysisDataService.h
"
13
#include "
MantidKernel/PropertyManagerDataService.h
"
14
15
// On MSVC all workspaces must be deleted by the time main() exits as the
16
// Workspace destruction can call to an OpenMP loop which is not allowed
17
// on MSVC after main() exits.
18
// See Workspace2D::~Workspace2D()
19
20
namespace
{
22
ClearAlgorithmManager
clearAlgManager;
24
ClearADS
clearADS;
26
ClearPropertyManagerDataService
clearPropSvc;
27
}
// namespace
28
29
//-----------------------------------------------------------------------------
30
// ClearAlgorithmManager
31
//-----------------------------------------------------------------------------
33
bool
ClearAlgorithmManager::tearDownWorld
() {
34
Mantid::API::AlgorithmManager::Instance().clear();
35
return
true
;
36
}
37
38
//-----------------------------------------------------------------------------
39
// ClearADS
40
//-----------------------------------------------------------------------------
41
43
bool
ClearADS::tearDownWorld
() {
44
Mantid::API::AnalysisDataService::Instance().clear();
45
return
true
;
46
}
47
48
//-----------------------------------------------------------------------------
49
// ClearPropertyManagerDataService
50
//-----------------------------------------------------------------------------
51
53
bool
ClearPropertyManagerDataService::tearDownWorld
() {
54
Mantid::Kernel::PropertyManagerDataService::Instance().clear();
55
return
true
;
56
}
AlgorithmManager.h
AnalysisDataService.h
PropertyManagerDataService.h
TearDownWorld.h
ClearADS
Defines a CxxTest::GlobalFixture that clears the AnalysisDataService when its tearDownWorld() method ...
Definition
TearDownWorld.h:29
ClearADS::tearDownWorld
bool tearDownWorld() override
Definition
TearDownWorld.cpp:43
ClearAlgorithmManager
Defines a CxxTest::GlobalFixture that clears the AlgorithmManager when its tearDownWorld() method is ...
Definition
TearDownWorld.h:19
ClearAlgorithmManager::tearDownWorld
bool tearDownWorld() override
Definition
TearDownWorld.cpp:33
ClearPropertyManagerDataService
Defines a CxxTest::GlobalFixture that clears the PropertyManagerDataService when its tearDownWorld() ...
Definition
TearDownWorld.h:39
ClearPropertyManagerDataService::tearDownWorld
bool tearDownWorld() override
Definition
TearDownWorld.cpp:53
Generated by
1.9.8