Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::MultiFileNameParsing::RunRangeList Class Reference

A class that holds a list of ranges of runs. More...

#include <MultiFileNameParser.h>

Public Member Functions

void addRun (const unsigned int run)
 Add a run to the list of run ranges. More...
 
void addRunRange (const std::pair< unsigned int, unsigned int > &range)
 Add a range of runs. More...
 
void addRunRange (const unsigned int from, const unsigned int to)
 Add a range of runs. More...
 
std::set< std::pair< unsigned int, unsigned int > > rangeList () const
 
 RunRangeList ()
 Constructor. More...
 

Private Attributes

std::set< std::pair< unsigned int, unsigned int > > m_rangeList
 A set of pairs of unsigned ints, where each pair represents a range of runs. More...
 

Detailed Description

A class that holds a list of ranges of runs.

Each "range" is just a pair of unsigned ints. Adding ranges to the list will merge them with what is already there. This is essentially just a wrapper around a std::set<std::pair<unsigned int,unsigned int>> object.

Definition at line 147 of file MultiFileNameParser.h.

Constructor & Destructor Documentation

◆ RunRangeList()

Mantid::Kernel::MultiFileNameParsing::RunRangeList::RunRangeList ( )

Constructor.

Default constructor.

Definition at line 399 of file MultiFileNameParser.cpp.

Member Function Documentation

◆ addRun()

void Mantid::Kernel::MultiFileNameParsing::RunRangeList::addRun ( const unsigned int  run)

Add a run to the list of run ranges.

Adds a run to the list of run ranges.

Not particularly effecient.

Parameters
run:: the run to add.

Definition at line 406 of file MultiFileNameParser.cpp.

References m_rangeList.

Referenced by addRunRange(), and Mantid::Kernel::MultiFileNameParsing::suggestWorkspaceName().

◆ addRunRange() [1/2]

void Mantid::Kernel::MultiFileNameParsing::RunRangeList::addRunRange ( const std::pair< unsigned int, unsigned int > &  range)

Add a range of runs.

Add a range of runs to the list of run ranges.

Parameters
range:: the range to add

Definition at line 435 of file MultiFileNameParser.cpp.

References addRunRange().

◆ addRunRange() [2/2]

void Mantid::Kernel::MultiFileNameParsing::RunRangeList::addRunRange ( const unsigned int  from,
const unsigned int  to 
)

Add a range of runs.

Adds a range of runs of specified length to the list of run ranges.

Parameters
from:: the beginning of the run to add
to:: the end of the run to add

Definition at line 425 of file MultiFileNameParser.cpp.

References addRun().

Referenced by addRunRange().

◆ rangeList()

std::set< std::pair< unsigned int, unsigned int > > Mantid::Kernel::MultiFileNameParsing::RunRangeList::rangeList ( ) const
inline

Definition at line 153 of file MultiFileNameParser.h.

Member Data Documentation

◆ m_rangeList

std::set<std::pair<unsigned int, unsigned int> > Mantid::Kernel::MultiFileNameParsing::RunRangeList::m_rangeList
private

A set of pairs of unsigned ints, where each pair represents a range of runs.

Definition at line 165 of file MultiFileNameParser.h.

Referenced by addRun().


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