|
Mantid
|
The main public API via which users interact with the Mantid framework. More...
#include <FrameworkManager.h>
Public Member Functions | |
| void | clear () |
| Clears all memory associated with the AlgorithmManager, ADS & IDS. | |
| void | clearAlgorithms () |
| Clear memory associated with the AlgorithmManager. | |
| void | clearData () |
| Clear memory associated with the ADS. | |
| void | clearInstruments () |
| Clear memory associated with the IDS. | |
| void | clearPropertyManagers () |
| Clear memory associated with the PropertyManagers. | |
| bool | deleteWorkspace (const std::string &wsName) |
| Deletes a workspace from the framework. | |
| std::shared_ptr< IAlgorithm > | exec (const std::string &algorithmName, int count,...) |
| Creates an algorithm and runs it, with variadic arguments. | |
| FrameworkManagerImpl (const FrameworkManagerImpl &)=delete | |
| int | getNumOMPThreads () const |
| Returns the number of OpenMP threads that will be used. | |
| Workspace * | getWorkspace (const std::string &wsName) |
| Returns a shared pointer to the workspace requested. | |
| void | loadPlugins () |
| Load framework plugins. | |
| FrameworkManagerImpl & | operator= (const FrameworkManagerImpl &)=delete |
| void | setNumOMPThreads (const int nthreads) |
| Set the number of OpenMP threads to the given value. | |
| void | setNumOMPThreadsToConfigValue () |
| Set the number of OpenMP threads to use based on the config value. | |
| void | shutdown () |
| shuts down and performs clean up tasks | |
Private Member Functions | |
| void | asynchronousStartupTasks () |
| Starts asynchronous tasks that are done as part of Start-up. | |
| void | checkIfNewerVersionIsAvailable () |
| check if a newer version of Mantid is available | |
| FrameworkManagerImpl () | |
| Private Constructor. | |
| void | loadPluginsUsingKey (const std::string &locationKey, const std::string &excludeKey) |
| Load a set of plugins using a key from the ConfigService. | |
| void | setGlobalNumericLocaleToC () |
| Set up the global locale. | |
| void | setupUsageReporting () |
| Setup Usage Reporting if enabled. | |
| void | updateInstrumentDefinitions () |
| Update instrument definitions from github. | |
| ~FrameworkManagerImpl ()=default | |
| Private Destructor. | |
Friends | |
| struct | Mantid::Kernel::CreateUsingNew< FrameworkManagerImpl > |
The main public API via which users interact with the Mantid framework.
Definition at line 27 of file FrameworkManager.h.
|
delete |
|
private |
Private Constructor.
Default constructor.
Definition at line 105 of file FrameworkManager.cpp.
References asynchronousStartupTasks(), Mantid::Kernel::Logger::debug(), Mantid::API::g_log, Mantid::Kernel::MemoryOptions::initAllocatorOptions(), loadPlugins(), Mantid::Kernel::Logger::notice(), setGlobalNumericLocaleToC(), setNumOMPThreadsToConfigValue(), and Mantid::welcomeMessage().
|
privatedefault |
Private Destructor.
|
private |
Starts asynchronous tasks that are done as part of Start-up.
Definition at line 333 of file FrameworkManager.cpp.
References checkIfNewerVersionIsAvailable(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), setupUsageReporting(), and updateInstrumentDefinitions().
Referenced by FrameworkManagerImpl().
|
private |
check if a newer version of Mantid is available
Check if a newer release of Mantid is available.
Definition at line 378 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), and Mantid::API::g_log.
Referenced by asynchronousStartupTasks().
| void Mantid::API::FrameworkManagerImpl::clear | ( | ) |
Clears all memory associated with the AlgorithmManager, ADS & IDS.
Clears all memory associated with the AlgorithmManager and with the Analysis & Instrument data services.
Definition at line 175 of file FrameworkManager.cpp.
References clearAlgorithms(), clearData(), clearInstruments(), and clearPropertyManagers().
Referenced by export_FrameworkManager(), and shutdown().
| void Mantid::API::FrameworkManagerImpl::clearAlgorithms | ( | ) |
Clear memory associated with the AlgorithmManager.
Definition at line 192 of file FrameworkManager.cpp.
Referenced by clear(), and export_FrameworkManager().
| void Mantid::API::FrameworkManagerImpl::clearData | ( | ) |
Clear memory associated with the ADS.
Definition at line 197 of file FrameworkManager.cpp.
Referenced by clear(), and export_FrameworkManager().
| void Mantid::API::FrameworkManagerImpl::clearInstruments | ( | ) |
Clear memory associated with the IDS.
Definition at line 202 of file FrameworkManager.cpp.
Referenced by clear(), and export_FrameworkManager().
| void Mantid::API::FrameworkManagerImpl::clearPropertyManagers | ( | ) |
Clear memory associated with the PropertyManagers.
Definition at line 207 of file FrameworkManager.cpp.
Referenced by clear(), and export_FrameworkManager().
| bool Mantid::API::FrameworkManagerImpl::deleteWorkspace | ( | const std::string & | wsName | ) |
Deletes a workspace from the framework.
Removes and deletes a workspace from the data service store.
| wsName | :: The user-given name for the workspace |
| NotFoundError | Thrown if workspace cannot be found |
Definition at line 267 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::error(), Mantid::API::g_log, and Mantid::Kernel::Exception::NotFoundError::what().
| IAlgorithm_sptr Mantid::API::FrameworkManagerImpl::exec | ( | const std::string & | algorithmName, |
| int | count, | ||
| ... | |||
| ) |
Creates an algorithm and runs it, with variadic arguments.
Run any algorithm with a variable number of parameters.
| algorithmName | |
| count | :: number of arguments given. |
Definition at line 218 of file FrameworkManager.cpp.
References count.
| int Mantid::API::FrameworkManagerImpl::getNumOMPThreads | ( | ) | const |
Returns the number of OpenMP threads that will be used.
Definition at line 170 of file FrameworkManager.cpp.
References PARALLEL_GET_MAX_THREADS.
Referenced by export_FrameworkManager().
| Workspace * Mantid::API::FrameworkManagerImpl::getWorkspace | ( | const std::string & | wsName | ) |
Returns a shared pointer to the workspace requested.
| wsName | :: The name of the workspace |
| NotFoundError | If workspace is not registered with analysis data service |
Definition at line 250 of file FrameworkManager.cpp.
| void Mantid::API::FrameworkManagerImpl::loadPlugins | ( | ) |
Load framework plugins.
Load all plugins from the framework.
Definition at line 137 of file FrameworkManager.cpp.
References loadPluginsUsingKey().
Referenced by FrameworkManagerImpl().
|
private |
Load a set of plugins using a key from the ConfigService.
Load a set of plugins from the path pointed to by the given config key.
| locationKey | A string containing a key to lookup in the ConfigService |
| excludeKey | A string |
Definition at line 303 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and Mantid::Kernel::LibraryManagerImpl::NonRecursive.
Referenced by loadPlugins().
|
delete |
|
private |
Set up the global locale.
Set the numeric formatting category of the C locale to classic C.
Definition at line 320 of file FrameworkManager.cpp.
Referenced by FrameworkManagerImpl().
| void Mantid::API::FrameworkManagerImpl::setNumOMPThreads | ( | const int | nthreads | ) |
Set the number of OpenMP threads to the given value.
Set the number of OpenMP cores to use based on the config value.
| nthreads | :: The maximum number of threads to use |
Definition at line 154 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and PARALLEL_SET_NUM_THREADS.
Referenced by export_FrameworkManager(), and setNumOMPThreadsToConfigValue().
| void Mantid::API::FrameworkManagerImpl::setNumOMPThreadsToConfigValue | ( | ) |
Set the number of OpenMP threads to use based on the config value.
Set the number of OpenMP cores to use based on the config value.
Definition at line 142 of file FrameworkManager.cpp.
References setNumOMPThreads().
Referenced by export_FrameworkManager(), and FrameworkManagerImpl().
|
private |
Setup Usage Reporting if enabled.
Definition at line 353 of file FrameworkManager.cpp.
Referenced by asynchronousStartupTasks().
| void Mantid::API::FrameworkManagerImpl::shutdown | ( | ) |
shuts down and performs clean up tasks
Definition at line 182 of file FrameworkManager.cpp.
References clear().
Referenced by export_FrameworkManager().
|
private |
Update instrument definitions from github.
Definition at line 366 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), and Mantid::API::g_log.
Referenced by asynchronousStartupTasks().
|
friend |
Definition at line 65 of file FrameworkManager.h.