Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::DataHandling::ISISJournal Class Reference

ISISJournal: Helper class to aid in fetching ISIS specific run information from journal files. More...

#include <ISISJournal.h>

Inheritance diagram for Mantid::DataHandling::ISISJournal:
Mantid::API::IJournal

Public Member Functions

std::vector< std::string > getCycleNames () override
 Get the list of cycle names. More...
 
std::vector< RunDatagetRuns (std::vector< std::string > const &valuesToLookup={}, RunData const &filters=RunData()) override
 Get data for runs that match the given filters. More...
 
 ISISJournal (ISISJournal &&rhs)
 
 ISISJournal (ISISJournal const &rhs)=delete
 
 ISISJournal (std::string const &instrument, std::string const &cycle, std::unique_ptr< Kernel::InternetHelper > internetHelper=std::make_unique< Kernel::InternetHelper >())
 Construct the journal class for a specific instrument and cycle. More...
 
ISISJournaloperator= (ISISJournal &&rhs)
 
ISISJournal const & operator= (ISISJournal const &rhs)=delete
 
virtual ~ISISJournal ()
 
- Public Member Functions inherited from Mantid::API::IJournal
virtual std::vector< std::string > getCycleNames ()=0
 Get the list of cycle names. More...
 
virtual std::vector< RunDatagetRuns (std::vector< std::string > const &valuesToLookup={}, RunData const &filters=RunData())=0
 Get data for runs that match the given filters. More...
 
 IJournal ()=default
 
 IJournal (IJournal &&rhs)
 
 IJournal (IJournal const &rhs)=delete
 
IJournaloperator= (IJournal &&rhs)
 
IJournal const & operator= (IJournal const &rhs)=delete
 
virtual ~IJournal ()
 

Private Member Functions

std::string getURLContents (std::string const &url)
 Get the contents of a file at a given URL. More...
 

Private Attributes

Poco::AutoPtr< Poco::XML::Document > m_indexDocument
 
std::string m_indexFileURL
 
std::unique_ptr< Kernel::InternetHelperm_internetHelper
 
Poco::AutoPtr< Poco::XML::Document > m_runsDocument
 
std::string m_runsFileURL
 

Additional Inherited Members

- Public Types inherited from Mantid::API::IJournal
using RunData = std::map< std::string, std::string >
 

Detailed Description

ISISJournal: Helper class to aid in fetching ISIS specific run information from journal files.

Definition at line 31 of file ISISJournal.h.

Constructor & Destructor Documentation

◆ ISISJournal() [1/3]

Mantid::DataHandling::ISISJournal::ISISJournal ( std::string const &  instrument,
std::string const &  cycle,
std::unique_ptr< Kernel::InternetHelper internetHelper = std::make_unique<Kernel::InternetHelper>() 
)

Construct the journal class for a specific instrument and cycle.

Parameters
instrument: the ISIS instrument name to request data for e.g. "INTER" (case insensitive)
cycle: the ISIS cycle the required data is from e.g. "19_4"
internetHelper: class for sending internet requests

Definition at line 241 of file ISISJournal.cpp.

◆ ~ISISJournal()

Mantid::DataHandling::ISISJournal::~ISISJournal ( )
virtualdefault

◆ ISISJournal() [2/3]

Mantid::DataHandling::ISISJournal::ISISJournal ( ISISJournal const &  rhs)
delete

◆ ISISJournal() [3/3]

Mantid::DataHandling::ISISJournal::ISISJournal ( ISISJournal &&  rhs)
default

Member Function Documentation

◆ getCycleNames()

std::vector< std::string > Mantid::DataHandling::ISISJournal::getCycleNames ( )
overridevirtual

Get the list of cycle names.

Get the cycle names.

Returns
: a list of all ISIS cycle names for the instrument
Exceptions
if there was an error fetching the runs

Implements Mantid::API::IJournal.

Definition at line 257 of file ISISJournal.cpp.

References getURLContents(), m_indexDocument, and m_indexFileURL.

◆ getRuns()

std::vector< ISISJournal::RunData > Mantid::DataHandling::ISISJournal::getRuns ( std::vector< std::string > const &  valuesToLookup = {},
ISISJournal::RunData const &  filters = RunData() 
)
overridevirtual

Get data for runs that match the given filters.

Get run names and other specified data for all runs that match the given filter criteria.

Parameters
valuesToLookup: optional list of additional values to be returned e.g. "run_number", "title"
filters: optional element names and values to filter the results by
Exceptions
if there was an error fetching the runs

Implements Mantid::API::IJournal.

Definition at line 276 of file ISISJournal.cpp.

References getURLContents(), m_runsDocument, and m_runsFileURL.

◆ getURLContents()

std::string Mantid::DataHandling::ISISJournal::getURLContents ( std::string const &  url)
private

Get the contents of a file at a given URL.

Parameters
url: the URL to fetch
Returns
: the contents of the file as a string
Exceptions
if there was an error fetching the file

Definition at line 292 of file ISISJournal.cpp.

References Mantid::Kernel::InternetHelper::BAD_REQUEST, m_internetHelper, and Mantid::Kernel::InternetHelper::OK.

Referenced by getCycleNames(), and getRuns().

◆ operator=() [1/2]

ISISJournal & Mantid::DataHandling::ISISJournal::operator= ( ISISJournal &&  rhs)
default

◆ operator=() [2/2]

ISISJournal const & Mantid::DataHandling::ISISJournal::operator= ( ISISJournal const &  rhs)
delete

Member Data Documentation

◆ m_indexDocument

Poco::AutoPtr<Poco::XML::Document> Mantid::DataHandling::ISISJournal::m_indexDocument
private

Definition at line 53 of file ISISJournal.h.

Referenced by getCycleNames().

◆ m_indexFileURL

std::string Mantid::DataHandling::ISISJournal::m_indexFileURL
private

Definition at line 51 of file ISISJournal.h.

Referenced by getCycleNames().

◆ m_internetHelper

std::unique_ptr<Kernel::InternetHelper> Mantid::DataHandling::ISISJournal::m_internetHelper
private

Definition at line 49 of file ISISJournal.h.

Referenced by getURLContents().

◆ m_runsDocument

Poco::AutoPtr<Poco::XML::Document> Mantid::DataHandling::ISISJournal::m_runsDocument
private

Definition at line 52 of file ISISJournal.h.

Referenced by getRuns().

◆ m_runsFileURL

std::string Mantid::DataHandling::ISISJournal::m_runsFileURL
private

Definition at line 50 of file ISISJournal.h.

Referenced by getRuns().


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