Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Friends | List of all members
Mantid::API::FrameworkManagerImpl Class Reference

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< IAlgorithmexec (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...
 
WorkspacegetWorkspace (const std::string &wsName)
 Returns a shared pointer to the workspace requested. More...
 
void loadPlugins ()
 Load framework plugins. More...
 
FrameworkManagerImploperator= (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 >
 

Detailed Description

The main public API via which users interact with the Mantid framework.

Author
Russell Taylor, Tessella Support Services plc
Date
05/10/2007

Definition at line 31 of file FrameworkManager.h.

Constructor & Destructor Documentation

◆ FrameworkManagerImpl() [1/2]

Mantid::API::FrameworkManagerImpl::FrameworkManagerImpl ( const FrameworkManagerImpl )
delete

◆ FrameworkManagerImpl() [2/2]

Mantid::API::FrameworkManagerImpl::FrameworkManagerImpl ( )
private

◆ ~FrameworkManagerImpl()

Mantid::API::FrameworkManagerImpl::~FrameworkManagerImpl ( )
privatedefault

Private Destructor.

Member Function Documentation

◆ asynchronousStartupTasks()

void Mantid::API::FrameworkManagerImpl::asynchronousStartupTasks ( )
private

◆ checkIfNewerVersionIsAvailable()

void Mantid::API::FrameworkManagerImpl::checkIfNewerVersionIsAvailable ( )
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().

◆ clear()

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().

◆ clearAlgorithms()

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().

◆ clearData()

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().

◆ clearInstruments()

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().

◆ clearPropertyManagers()

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().

◆ deleteWorkspace()

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.

Parameters
wsName:: The user-given name for the workspace
Returns
true if the workspace was found and deleted
Exceptions
NotFoundErrorThrown 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().

◆ disableNexusOutput()

void Mantid::API::FrameworkManagerImpl::disableNexusOutput ( )
private

Silence NeXus output.

Definition at line 370 of file FrameworkManager.cpp.

References Mantid::API::NexusErrorFunction().

◆ exec()

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.

Parameters
algorithmName
count:: number of arguments given.
Returns
the algorithm created

Definition at line 255 of file FrameworkManager.cpp.

References count, and Mantid::Kernel::SingletonHolder< T >::Instance().

◆ getNumOMPThreads()

int Mantid::API::FrameworkManagerImpl::getNumOMPThreads ( ) const

Returns the number of OpenMP threads that will be used.

Returns
The number of OpenMP threads that will be used in the next parallel call

Definition at line 207 of file FrameworkManager.cpp.

References PARALLEL_GET_MAX_THREADS.

Referenced by export_FrameworkManager().

◆ getWorkspace()

Workspace * Mantid::API::FrameworkManagerImpl::getWorkspace ( const std::string &  wsName)

Returns a shared pointer to the workspace requested.

Parameters
wsName:: The name of the workspace
Returns
A pointer to the workspace
Exceptions
NotFoundErrorIf workspace is not registered with analysis data service

Definition at line 287 of file FrameworkManager.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

◆ loadPlugins()

void Mantid::API::FrameworkManagerImpl::loadPlugins ( )

Load framework plugins.

Load all plugins from the framework.

Definition at line 170 of file FrameworkManager.cpp.

References loadPluginsUsingKey().

◆ loadPluginsUsingKey()

void Mantid::API::FrameworkManagerImpl::loadPluginsUsingKey ( const std::string &  locationKey,
const std::string &  excludeKey 
)
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.

Parameters
locationKeyA string containing a key to lookup in the ConfigService
excludeKeyA 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().

◆ operator=()

FrameworkManagerImpl & Mantid::API::FrameworkManagerImpl::operator= ( const FrameworkManagerImpl )
delete

◆ setGlobalNumericLocaleToC()

void Mantid::API::FrameworkManagerImpl::setGlobalNumericLocaleToC ( )
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.

◆ setNumOMPThreads()

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.

Parameters
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().

◆ 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().

◆ setupUsageReporting()

void Mantid::API::FrameworkManagerImpl::setupUsageReporting ( )
private

Setup Usage Reporting if enabled.

Definition at line 393 of file FrameworkManager.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance().

Referenced by asynchronousStartupTasks().

◆ shutdown()

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().

◆ updateInstrumentDefinitions()

void Mantid::API::FrameworkManagerImpl::updateInstrumentDefinitions ( )
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().

Friends And Related Function Documentation

◆ Mantid::Kernel::CreateUsingNew< FrameworkManagerImpl >

Definition at line 69 of file FrameworkManager.h.


The documentation for this class was generated from the following files: