Mantid
|
A class that holds information about a facility. More...
#include <FacilityInfo.h>
Public Member Functions | |
const std::vector< std::string > & | archiveSearch () const |
Return the archive search interface names. More... | |
const CatalogInfo & | catalogInfo () const |
Returns the catalogInfo class. More... | |
const std::string & | delimiter () const |
Returns the default delimiter between instrument name and run number. More... | |
const std::vector< std::string > | extensions () const |
Returns a list of file extensions. More... | |
FacilityInfo (const Poco::XML::Element *elem) | |
Constructor. More... | |
const InstrumentInfo & | instrument (std::string iName="") const |
Returns instruments with given name. More... | |
const std::vector< InstrumentInfo > & | instruments () const |
Returns a list of instruments of this facility. More... | |
std::vector< InstrumentInfo > | instruments (const std::string &tech) const |
Returns a list of instruments of given technique. More... | |
size_t | multiFileLimit () const |
Returns the multiple file limit. More... | |
const std::string & | name () const |
Return the name of the facility. More... | |
bool | noFilePrefix () const |
Returns a bool indicating whether prefix is required in file names. More... | |
const std::string & | preferredExtension () const |
Returns the preferred file extension. More... | |
const std::string & | timezone () const |
Returns the time zone designation compatible with pytz. More... | |
int | zeroPadding () const |
Returns default zero padding for this facility. More... | |
Private Member Functions | |
void | addExtension (const std::string &ext) |
Add new extension. More... | |
void | fillArchiveNames (const Poco::XML::Element *elem) |
Called from constructor to fill archive interface names. More... | |
void | fillDelimiter (const Poco::XML::Element *elem) |
Called from constructor to fill default delimiter. More... | |
void | fillExtensions (const Poco::XML::Element *elem) |
Called from constructor to fill file extensions. More... | |
void | fillHTTPProxy (const Poco::XML::Element *elem) |
void | fillInstruments (const Poco::XML::Element *elem) |
Called from constructor to fill instrument list. More... | |
void | fillMultiFileLimit (const Poco::XML::Element *elem) |
Called from constructor to fill the multifile limit. More... | |
void | fillNoFilePrefix (const Poco::XML::Element *elem) |
Called from constructor to fill the noFilePrefix flag. More... | |
void | fillTimezone (const Poco::XML::Element *elem) |
void | fillZeroPadding (const Poco::XML::Element *elem) |
Called from constructor to fill zero padding field. More... | |
Private Attributes | |
std::vector< std::string > | m_archiveSearch |
names of the archive search interface More... | |
CatalogInfo | m_catalogs |
Gain access to the catalogInfo class. More... | |
std::string | m_delimiter |
default delimiter between instrument name and run number More... | |
std::vector< std::string > | m_extensions |
file extensions in order of preference More... | |
std::vector< InstrumentInfo > | m_instruments |
list of instruments of this facility More... | |
size_t | m_multiFileLimit |
the multiple file limit More... | |
const std::string | m_name |
facility name More... | |
bool | m_noFilePrefix |
flag indicating if prefix is required in file names More... | |
std::string | m_timezone |
Timezone designation in pytz. More... | |
int | m_zeroPadding |
default zero padding for this facility More... | |
A class that holds information about a facility.
Definition at line 36 of file FacilityInfo.h.
|
explicit |
Constructor.
elem | :: The Poco::XML::Element to read the data from |
std::runtime_error | if name or file extensions are not defined |
Definition at line 39 of file FacilityInfo.cpp.
References fillArchiveNames(), fillDelimiter(), fillExtensions(), fillInstruments(), fillMultiFileLimit(), fillNoFilePrefix(), fillTimezone(), and fillZeroPadding().
|
private |
Add new extension.
Adds both a lowercase and uppercase version
ext | :: File extension, including the dot, e.g. ".nxs" or ".raw" |
Definition at line 104 of file FacilityInfo.cpp.
References m_extensions.
Referenced by fillExtensions().
|
inline |
Return the archive search interface names.
Definition at line 56 of file FacilityInfo.h.
Referenced by export_FacilityInfo(), and Mantid::API::FileFinderImpl::getArchiveSearch().
|
inline |
Returns the catalogInfo class.
Definition at line 65 of file FacilityInfo.h.
|
inline |
Returns the default delimiter between instrument name and run number.
Definition at line 46 of file FacilityInfo.h.
Referenced by export_FacilityInfo(), and Mantid::Kernel::InstrumentInfo::InstrumentInfo().
|
inline |
Returns a list of file extensions.
Definition at line 48 of file FacilityInfo.h.
Referenced by export_FacilityInfo(), Mantid::API::FileProperty::extsMatchRunFiles(), Mantid::API::FileFinderImpl::findRun(), Mantid::Algorithms::CreateFloodWorkspace::init(), Mantid::DataHandling::Load::init(), and Mantid::API::GenericDataProcessorAlgorithm< Base >::load().
|
private |
Called from constructor to fill archive interface names.
Definition at line 111 of file FacilityInfo.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Kernel::DateAndTimeHelpers::g_log, and m_archiveSearch.
Referenced by FacilityInfo().
|
private |
Called from constructor to fill default delimiter.
Definition at line 81 of file FacilityInfo.cpp.
References m_delimiter.
Referenced by FacilityInfo().
|
private |
Called from constructor to fill file extensions.
Definition at line 87 of file FacilityInfo.cpp.
References addExtension(), Mantid::Kernel::Logger::error(), Mantid::Kernel::DateAndTimeHelpers::g_log, Mantid::Kernel::StringTokenizer::TOK_IGNORE_EMPTY, and Mantid::Kernel::StringTokenizer::TOK_TRIM.
Referenced by FacilityInfo().
|
private |
|
private |
Called from constructor to fill instrument list.
Definition at line 144 of file FacilityInfo.cpp.
References Mantid::Kernel::DateAndTimeHelpers::g_log, m_instruments, m_name, n, and Mantid::Kernel::Logger::warning().
Referenced by FacilityInfo().
|
private |
Called from constructor to fill the multifile limit.
Definition at line 70 of file FacilityInfo.cpp.
References Mantid::Kernel::Strings::convert(), and m_multiFileLimit.
Referenced by FacilityInfo().
|
private |
Called from constructor to fill the noFilePrefix flag.
Definition at line 64 of file FacilityInfo.cpp.
References m_noFilePrefix.
Referenced by FacilityInfo().
|
private |
Definition at line 128 of file FacilityInfo.cpp.
References Mantid::Kernel::DateAndTimeHelpers::g_log, m_name, m_timezone, and Mantid::Kernel::Logger::notice().
Referenced by FacilityInfo().
|
private |
Called from constructor to fill zero padding field.
Definition at line 56 of file FacilityInfo.cpp.
References Mantid::Kernel::Strings::convert(), and m_zeroPadding.
Referenced by FacilityInfo().
const InstrumentInfo & Mantid::Kernel::FacilityInfo::instrument | ( | std::string | iName = "" | ) | const |
Returns instruments with given name.
Returns instrument with given name.
iName | Instrument name |
NotFoundError | if iName was not found |
Definition at line 172 of file FacilityInfo.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::Kernel::DateAndTimeHelpers::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), instrument(), m_instruments, name(), and Mantid::Kernel::InstrumentInfo::name().
Referenced by export_FacilityInfo(), MantidQt::MantidWidgets::InstrumentSelector::fillWithInstrumentsFromFacility(), Mantid::Kernel::ConfigServiceImpl::getInstrument(), and instrument().
|
inline |
Returns a list of instruments of this facility.
Definition at line 58 of file FacilityInfo.h.
Referenced by export_FacilityInfo(), MantidQt::MantidWidgets::InstrumentSelector::fillWithInstrumentsFromFacility(), and Mantid::Kernel::ConfigServiceImpl::setFacility().
std::vector< InstrumentInfo > Mantid::Kernel::FacilityInfo::instruments | ( | const std::string & | tech | ) | const |
Returns a list of instruments of given technique.
tech | :: Technique name |
Definition at line 204 of file FacilityInfo.cpp.
References m_instruments.
|
inline |
Returns the multiple file limit.
Definition at line 71 of file FacilityInfo.h.
|
inline |
Return the name of the facility.
Definition at line 41 of file FacilityInfo.h.
Referenced by Mantid::WorkflowAlgorithms::DgsReduction::exec(), export_FacilityInfo(), Mantid::API::FileFinderImpl::getArchiveSearch(), MantidQt::MantidWidgets::InstrumentSelector::getFacility(), Mantid::Kernel::ConfigServiceImpl::getInstrument(), MantidQt::MantidWidgets::InstrumentSelector::handleConfigChange(), and instrument().
|
inline |
Returns a bool indicating whether prefix is required in file names.
Definition at line 68 of file FacilityInfo.h.
Referenced by Mantid::API::FileFinderImpl::findRun().
|
inline |
Returns the preferred file extension.
Definition at line 50 of file FacilityInfo.h.
Referenced by export_FacilityInfo().
|
inline |
Returns the time zone designation compatible with pytz.
Definition at line 53 of file FacilityInfo.h.
Referenced by export_FacilityInfo().
|
inline |
Returns default zero padding for this facility.
Definition at line 44 of file FacilityInfo.h.
Referenced by export_FacilityInfo(), Mantid::Kernel::InstrumentInfo::fillZeroPadding(), and Mantid::Kernel::InstrumentInfo::zeroPadding().
|
private |
names of the archive search interface
Definition at line 93 of file FacilityInfo.h.
Referenced by fillArchiveNames().
|
private |
Gain access to the catalogInfo class.
Definition at line 87 of file FacilityInfo.h.
|
private |
default delimiter between instrument name and run number
Definition at line 91 of file FacilityInfo.h.
Referenced by fillDelimiter().
|
private |
file extensions in order of preference
Definition at line 92 of file FacilityInfo.h.
Referenced by addExtension().
|
private |
list of instruments of this facility
Definition at line 94 of file FacilityInfo.h.
Referenced by fillInstruments(), instrument(), and instruments().
|
private |
the multiple file limit
Definition at line 96 of file FacilityInfo.h.
Referenced by fillMultiFileLimit().
|
private |
facility name
Definition at line 88 of file FacilityInfo.h.
Referenced by fillInstruments(), and fillTimezone().
|
private |
flag indicating if prefix is required in file names
Definition at line 95 of file FacilityInfo.h.
Referenced by fillNoFilePrefix().
|
private |
Timezone designation in pytz.
Definition at line 89 of file FacilityInfo.h.
Referenced by fillTimezone().
|
private |
default zero padding for this facility
Definition at line 90 of file FacilityInfo.h.
Referenced by fillZeroPadding().