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

DataBlockComposite: The DataBlockComposite handles a collection of DataBlocks. More...

#include <DataBlockComposite.h>

Inheritance diagram for Mantid::DataHandling::DataBlockComposite:
Mantid::DataHandling::DataBlock

Public Member Functions

void addDataBlock (const DataBlock &dataBlock)
 
std::vector< specnum_tgetAllSpectrumNumbers ()
 Provides a container with all spectrum numbers. More...
 
std::vector< DataBlockgetDataBlocks ()
 
std::unique_ptr< DataBlockGeneratorgetGenerator () const override
 
specnum_t getMaxSpectrumID () const override
 
specnum_t getMinSpectrumID () const override
 
size_t getNumberOfChannels () const override
 
int getNumberOfPeriods () const override
 
size_t getNumberOfSpectra () const override
 
bool isEmpty ()
 
DataBlockComposite operator+ (const DataBlockComposite &other)
 
bool operator== (const DataBlockComposite &other) const
 
void removeSpectra (DataBlockComposite &toRemove)
 Removes the input data blocks from the current list of data blocks. More...
 
void setMaxSpectrumID (specnum_t) override
 
void setMinSpectrumID (specnum_t) override
 
void truncate (specnum_t specMin, specnum_t specMax)
 
- Public Member Functions inherited from Mantid::DataHandling::DataBlock
 DataBlock ()
 
 DataBlock (const Mantid::NeXus::NXInt &data)
 
 DataBlock (int numberOfperiods, size_t numberOfSpectra, size_t numberOfChannels)
 
virtual std::unique_ptr< DataBlockGeneratorgetGenerator () const
 
virtual specnum_t getMaxSpectrumID () const
 
virtual specnum_t getMinSpectrumID () const
 
virtual size_t getNumberOfChannels () const
 
virtual int getNumberOfPeriods () const
 
virtual size_t getNumberOfSpectra () const
 
bool operator== (const DataBlock &other) const
 
virtual void setMaxSpectrumID (specnum_t minSpecID)
 
virtual void setMinSpectrumID (specnum_t minSpecID)
 
virtual ~DataBlock ()=default
 

Private Attributes

std::vector< DataBlockm_dataBlocks
 

Additional Inherited Members

- Protected Attributes inherited from Mantid::DataHandling::DataBlock
specnum_t m_maxSpectraID
 
specnum_t m_minSpectraID
 
size_t m_numberOfChannels
 
int m_numberOfPeriods
 
size_t m_numberOfSpectra
 

Detailed Description

DataBlockComposite: The DataBlockComposite handles a collection of DataBlocks.

It represents a set of contiguous spectrum numbers which are to be consumed elsewhere.

Definition at line 19 of file DataBlockComposite.h.

Member Function Documentation

◆ addDataBlock()

void Mantid::DataHandling::DataBlockComposite::addDataBlock ( const DataBlock dataBlock)

◆ getAllSpectrumNumbers()

std::vector< specnum_t > Mantid::DataHandling::DataBlockComposite::getAllSpectrumNumbers ( )

Provides a container with all spectrum numbers.

Returns
a container with all sepctrum numbers

Definition at line 409 of file DataBlockComposite.cpp.

References getGenerator().

Referenced by Mantid::DataHandling::LoadISISNexus2::checkOptionalProperties(), and Mantid::DataHandling::LoadISISNexus2::findSpectraDetRangeInFile().

◆ getDataBlocks()

std::vector< DataBlock > Mantid::DataHandling::DataBlockComposite::getDataBlocks ( )

◆ getGenerator()

std::unique_ptr< DataBlockGenerator > Mantid::DataHandling::DataBlockComposite::getGenerator ( ) const
overridevirtual

◆ getMaxSpectrumID()

specnum_t Mantid::DataHandling::DataBlockComposite::getMaxSpectrumID ( ) const
overridevirtual

◆ getMinSpectrumID()

specnum_t Mantid::DataHandling::DataBlockComposite::getMinSpectrumID ( ) const
overridevirtual

◆ getNumberOfChannels()

size_t Mantid::DataHandling::DataBlockComposite::getNumberOfChannels ( ) const
overridevirtual

◆ getNumberOfPeriods()

int Mantid::DataHandling::DataBlockComposite::getNumberOfPeriods ( ) const
overridevirtual

◆ getNumberOfSpectra()

size_t Mantid::DataHandling::DataBlockComposite::getNumberOfSpectra ( ) const
overridevirtual

◆ isEmpty()

bool Mantid::DataHandling::DataBlockComposite::isEmpty ( )

◆ operator+()

DataBlockComposite Mantid::DataHandling::DataBlockComposite::operator+ ( const DataBlockComposite other)

Definition at line 252 of file DataBlockComposite.cpp.

References m_dataBlocks.

◆ operator==()

bool Mantid::DataHandling::DataBlockComposite::operator== ( const DataBlockComposite other) const

Definition at line 342 of file DataBlockComposite.cpp.

References m_dataBlocks.

◆ removeSpectra()

void Mantid::DataHandling::DataBlockComposite::removeSpectra ( DataBlockComposite toRemove)

Removes the input data blocks from the current list of data blocks.

Parameters
toRemovedata block composite to remove

original: |--—| |----—| |-—| toRemove: |---—| |–| result: |—| |---—| |-—|

Definition at line 372 of file DataBlockComposite.cpp.

References getDataBlocks(), m_dataBlocks, Mantid::DataHandling::DataBlock::setMaxSpectrumID(), and Mantid::DataHandling::DataBlock::setMinSpectrumID().

Referenced by Mantid::DataHandling::LoadISISNexus2::checkOptionalProperties(), and Mantid::DataHandling::LoadISISNexus2::findSpectraDetRangeInFile().

◆ setMaxSpectrumID()

void Mantid::DataHandling::DataBlockComposite::setMaxSpectrumID ( specnum_t  )
overridevirtual

Reimplemented from Mantid::DataHandling::DataBlock.

Definition at line 220 of file DataBlockComposite.cpp.

◆ setMinSpectrumID()

void Mantid::DataHandling::DataBlockComposite::setMinSpectrumID ( specnum_t  )
overridevirtual

Reimplemented from Mantid::DataHandling::DataBlock.

Definition at line 205 of file DataBlockComposite.cpp.

◆ truncate()

void Mantid::DataHandling::DataBlockComposite::truncate ( specnum_t  specMin,
specnum_t  specMax 
)

Member Data Documentation

◆ m_dataBlocks

std::vector<DataBlock> Mantid::DataHandling::DataBlockComposite::m_dataBlocks
private

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