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