31 #include "../common/exceptions/WOutOfBounds.h"
32 #include "WEEG2Segment.h"
33 #include "WEEGValueMatrix.h"
34 #include "WRecording.h"
35 #include "exceptions/WDHException.h"
36 #include "io/WPagerEEG.h"
39 : m_segmentID( segmentID ),
44 throw WDHException( std::string(
"Couldn't construct new EEG segment: pager invalid" ) );
49 std::ostringstream stream;
50 stream <<
"The EEG has no segment number " <<
m_segmentID;
57 throw WDHException( std::string(
"Couldn't construct new EEG segment: invalid number of samples" ) );
General purpose exception and therefore base class for all DataHandler related exceptions.
WEEG2Segment(std::size_t segmentID, std::shared_ptr< WPagerEEG > pager)
Constructor.
std::size_t m_nbSamples
number of samples this segment consists of
std::size_t getNumberOfSamples() const
Get the number of samples this segment consists of.
std::shared_ptr< WPagerEEG > m_pager
pager class which contains the data, read from a file on demand
std::size_t m_segmentID
number of this segment
std::shared_ptr< WEEGValueMatrix > getValues(std::size_t start, std::size_t length) const
Get the values of all channels for a given sample range.
Indicates invalid element access of a container.
static const unsigned int MAX_RECORDING_SAMPLES
Maximum number of samples of a recording.