Mantid
Loading...
Searching...
No Matches
FrameworkManager.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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#pragma once
8
9#include <string>
10
11#include "MantidAPI/DllConfig.h"
14#include <memory>
15
16#ifdef MPI_BUILD
17#include <boost/mpi/environment.hpp>
18#endif
19
20namespace Mantid {
21
22namespace API {
23class IAlgorithm;
24class Workspace;
25
31class MANTID_API_DLL FrameworkManagerImpl {
32public:
35
37 void loadPlugins();
38
40 void setNumOMPThreadsToConfigValue();
42 void setNumOMPThreads(const int nthreads);
44 int getNumOMPThreads() const;
45
47 void clear();
49 void shutdown();
51 void clearAlgorithms();
52
54 void clearData();
55
57 void clearInstruments();
58
60 void clearPropertyManagers();
61
63 std::shared_ptr<IAlgorithm> exec(const std::string &algorithmName, int count, ...);
64
66 Workspace *getWorkspace(const std::string &wsName);
67
69 bool deleteWorkspace(const std::string &wsName);
70
71private:
73
78
80 void loadPluginsUsingKey(const std::string &locationKey, const std::string &excludeKey);
82 void setGlobalNumericLocaleToC();
84 void asynchronousStartupTasks();
86 void setupUsageReporting();
88 void updateInstrumentDefinitions();
90 void checkIfNewerVersionIsAvailable();
91
92#ifdef MPI_BUILD
98 std::unique_ptr<boost::mpi::environment> m_mpi_environment;
99 int argc = 0;
100 char **argv;
101#endif
102};
103
105
106} // namespace API
107} // namespace Mantid
108
109namespace Mantid {
110namespace Kernel {
111EXTERN_MANTID_API template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<Mantid::API::FrameworkManagerImpl>;
112}
113} // namespace Mantid
int count
counter
Definition Matrix.cpp:37
The main public API via which users interact with the Mantid framework.
FrameworkManagerImpl(const FrameworkManagerImpl &)=delete
FrameworkManagerImpl & operator=(const FrameworkManagerImpl &)=delete
~FrameworkManagerImpl()=default
Private Destructor.
Base Workspace Abstract Class.
Definition Workspace.h:29
Manage the lifetime of a class intended to be a singleton.
Mantid::Kernel::SingletonHolder< FrameworkManagerImpl > FrameworkManager
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...