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#ifdef MPI_BUILD
12#include <boost/mpi/environment.hpp>
13#endif
14
15#include "MantidAPI/DllConfig.h"
18#include <memory>
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 disableNexusOutput();
86 void asynchronousStartupTasks();
88 void setupUsageReporting();
90 void updateInstrumentDefinitions();
92 void checkIfNewerVersionIsAvailable();
93
94#ifdef MPI_BUILD
101 boost::mpi::environment m_mpi_environment;
102 int argc = 0;
103 char **argv;
104#endif
105};
106
108
109} // namespace API
110} // namespace Mantid
111
112namespace Mantid {
113namespace Kernel {
114EXTERN_MANTID_API template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<Mantid::API::FrameworkManagerImpl>;
115}
116} // 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:30
Manage the lifetime of a class intended to be a singleton.
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...