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. More... | |
void | clearAlgorithms () |
Clear memory associated with the AlgorithmManager. More... | |
void | clearData () |
Clear memory associated with the ADS. More... | |
void | clearInstruments () |
Clear memory associated with the IDS. More... | |
void | clearPropertyManagers () |
Clear memory associated with the PropertyManagers. More... | |
bool | deleteWorkspace (const std::string &wsName) |
Deletes a workspace from the framework. More... | |
std::shared_ptr< IAlgorithm > | exec (const std::string &algorithmName, int count,...) |
Creates an algorithm and runs it, with variadic arguments. More... | |
FrameworkManagerImpl (const FrameworkManagerImpl &)=delete | |
int | getNumOMPThreads () const |
Returns the number of OpenMP threads that will be used. More... | |
Workspace * | getWorkspace (const std::string &wsName) |
Returns a shared pointer to the workspace requested. More... | |
void | loadPlugins () |
Load framework plugins. More... | |
FrameworkManagerImpl & | operator= (const FrameworkManagerImpl &)=delete |
void | setNumOMPThreads (const int nthreads) |
Set the number of OpenMP threads to the given value. More... | |
void | setNumOMPThreadsToConfigValue () |
Set the number of OpenMP threads to use based on the config value. More... | |
void | shutdown () |
shuts down and performs clean up tasks More... | |
Private Member Functions | |
void | asynchronousStartupTasks () |
Starts asynchronous tasks that are done as part of Start-up. More... | |
void | checkIfNewerVersionIsAvailable () |
check if a newer version of Mantid is available More... | |
void | disableNexusOutput () |
Silence NeXus output. More... | |
FrameworkManagerImpl () | |
Private Constructor. More... | |
void | loadPluginsUsingKey (const std::string &locationKey, const std::string &excludeKey) |
Load a set of plugins using a key from the ConfigService. More... | |
void | setGlobalNumericLocaleToC () |
Set up the global locale. More... | |
void | setupUsageReporting () |
Setup Usage Reporting if enabled. More... | |
void | updateInstrumentDefinitions () |
Update instrument definitions from github. More... | |
~FrameworkManagerImpl ()=default | |
Private Destructor. More... | |
Friends | |
struct | Mantid::Kernel::CreateUsingNew< FrameworkManagerImpl > |
The main public API via which users interact with the Mantid framework.
Definition at line 31 of file FrameworkManager.h.
|
delete |
|
private |
Private Constructor.
Default constructor.
Definition at line 129 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, Mantid::Kernel::MemoryOptions::initAllocatorOptions(), Mantid::Kernel::SingletonHolder< T >::Instance(), Mantid::Kernel::Logger::notice(), and Mantid::welcomeMessage().
|
privatedefault |
Private Destructor.
|
private |
Starts asynchronous tasks that are done as part of Start-up.
Definition at line 373 of file FrameworkManager.cpp.
References checkIfNewerVersionIsAvailable(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), Mantid::Kernel::SingletonHolder< T >::Instance(), setupUsageReporting(), and updateInstrumentDefinitions().
|
private |
check if a newer version of Mantid is available
Check if a newer release of Mantid is available.
Definition at line 418 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and Mantid::Kernel::SingletonHolder< T >::Instance().
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 212 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 229 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by clear(), and export_FrameworkManager().
void Mantid::API::FrameworkManagerImpl::clearData | ( | ) |
Clear memory associated with the ADS.
Definition at line 234 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by clear(), and export_FrameworkManager().
void Mantid::API::FrameworkManagerImpl::clearInstruments | ( | ) |
Clear memory associated with the IDS.
Definition at line 239 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by clear(), and export_FrameworkManager().
void Mantid::API::FrameworkManagerImpl::clearPropertyManagers | ( | ) |
Clear memory associated with the PropertyManagers.
Definition at line 244 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
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 304 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::error(), Mantid::API::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), and Mantid::Kernel::Exception::NotFoundError::what().
|
private |
Silence NeXus output.
Definition at line 370 of file FrameworkManager.cpp.
References Mantid::API::NexusErrorFunction().
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 255 of file FrameworkManager.cpp.
References count, and Mantid::Kernel::SingletonHolder< T >::Instance().
int Mantid::API::FrameworkManagerImpl::getNumOMPThreads | ( | ) | const |
Returns the number of OpenMP threads that will be used.
Definition at line 207 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 287 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
void Mantid::API::FrameworkManagerImpl::loadPlugins | ( | ) |
Load framework plugins.
Load all plugins from the framework.
Definition at line 170 of file FrameworkManager.cpp.
References loadPluginsUsingKey().
|
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 340 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), 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 357 of file FrameworkManager.cpp.
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 187 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 175 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance(), and setNumOMPThreads().
Referenced by export_FrameworkManager().
|
private |
Setup Usage Reporting if enabled.
Definition at line 393 of file FrameworkManager.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by asynchronousStartupTasks().
void Mantid::API::FrameworkManagerImpl::shutdown | ( | ) |
shuts down and performs clean up tasks
Definition at line 219 of file FrameworkManager.cpp.
References clear(), and Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by export_FrameworkManager().
|
private |
Update instrument definitions from github.
Definition at line 406 of file FrameworkManager.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and Mantid::Kernel::SingletonHolder< T >::Instance().
Referenced by asynchronousStartupTasks().
|
friend |
Definition at line 69 of file FrameworkManager.h.