59 explicit Recording(
const std::deque<Channel>& ChannelList);
68 explicit Recording( std::size_t c_n_channels, std::size_t c_n_sections = 0, std::size_t c_n_points = 0 );
84 const std::deque<Channel>&
get()
const {
return ChannelArray; }
89 std::deque<Channel>&
get() {
return ChannelArray; }
124 std::size_t
size()
const {
return ChannelArray.size(); }
134 double GetSR()
const {
return 1.0/dt; }
226 global_section_description=value;
251 void SetDateTime(
const struct tm &value) { memcpy(&datetime, &value,
sizeof(
struct tm)); }
252 void SetDateTime(
int year,
int month,
int mday,
int hour,
int minute,
int sec) ;
268 void SetXUnits(
const std::string& value) { xunits=value; }
297 virtual void resize(std::size_t c_n_channels);
328 const std::vector<std::size_t>& section_index,
bool isSig,
329 const std::vector<int>& shift)
const;
341 void SelectTrace(std::size_t sectionToSelect, std::ptrdiff_t base_start, std::ptrdiff_t base_end);
379 std::deque<Channel> ChannelArray;
380 std::string global_section_description, scaling;
385 std::string file_description, comment, xunits;
397 std::vector<std::size_t> selectedSections;
402 const char* listOfMarkers[256];
408 std::vector<int> sectionMarker;
Declares the Channel class.
A Channel contains several data Sections representing observations of the same physical quantity.
Represents a continuously sampled sweep of data points.
std::vector< double > Vector_double
#define StfioDll
Defines dll export or import functions for Windows.
virtual void resize(std::size_t c_n_channels)
Resize the Recording to a new number of channels.
void SetGlobalYUnits(std::size_t n_channel, const std::string &value)
Sets the y units for a channel.
void InitSectionMarkerList(size_t n)
Initialize List of Section Markers.
void SetEventDescription(int type, const char *Description)
Set Description of Event Type.
void SetFileDescription(const std::string &value)
Sets the file description.
const Section & cursec() const
Retrieves the currently accessed section in the active channel (read-only)
const std::string & GetFileDescription() const
Retrieves the file description.
Recording()
Default constuctor.
void SetCurSecIndex(std::size_t value)
Sets the index of the current section.
std::size_t GetChannelSize(std::size_t n_channel) const
Retrieves the number of sections in a channel.
const Vector_double & GetSelectBase() const
Retrieves the stored baseline values of the selected sections (read-only).
Recording(std::size_t c_n_channels, std::size_t c_n_sections=0, std::size_t c_n_points=0)
Constructor.
const Channel & operator[](std::size_t at) const
Unchecked channel access (read-only)
int SetTime(int hour, int minute, int sec)
std::size_t size() const
Retrieves the size of the channel array.
const Channel & secch() const
Retrieves the second (reference) channel (read-only)
void SetDateTime(int year, int month, int mday, int hour, int minute, int sec)
Recording(const std::deque< Channel > &ChannelList)
Constructor.
std::vector< std::size_t > & GetSelectedSectionsW()
Retrieves the indices of the selected sections (read and write).
Section & cursec()
Retrieves the currently accessed section in the active channel (read and write)
std::string GetEventDescription(int type)
Get Description of Event Type.
void SetScaling(const std::string &value)
Sets the scaling as a string.
const Section & secsec() const
Retrieves the currently accessed section in the second (reference) channel (read-only)
void SetXScale(double value)
Sets the x scaling.
void SetSecChIndex(std::size_t value)
Sets the index of the second channel.
Channel & operator[](std::size_t at)
Unchecked channel access (read and write)
int SetDate(int year, int month, int mday)
std::size_t GetSecChIndex() const
Retrieves the index of the second channel.
void MakeAverage(Section &AverageReturn, Section &SigReturn, std::size_t channel, const std::vector< std::size_t > §ion_index, bool isSig, const std::vector< int > &shift) const
Calculates an average of several traces.
void SetCurChIndex(std::size_t value)
Sets the index of the current channel.
double GetXScale() const
Retrieves the x scaling (sampling interval).
const std::string & GetScaling() const
Retrieves the scaling as a string.
int SetDate(const std::string &value)
Sets the date of recording as a string.
Channel & curch()
Retrieves active channel (read and write)
void AddRec(const Recording &toAdd)
Add a Recording at the end of this Recording.
void SetGlobalSectionDescription(const std::string &value)
Sets the common section description.
const std::string & GetComment() const
Retrieves a comment string.
Vector_double & GetSelectBaseW()
Retrieves the stored baseline values of the selected sections (read and write).
void SetDateTime(const struct tm &value)
Sets the date and time of recording as struct tm.
Channel & at(std::size_t n_c)
Range-checked access to a channel (read and write).
virtual void InsertChannel(Channel &c_Channel, std::size_t pos)
Insert a Channel at a given position.
void SetSectionType(size_t section_number, int type)
Set Type of Section.
void SetComment(const std::string &value)
Sets a comment string.
std::size_t GetCurSecIndex() const
Retrieves the index of the current section.
const Channel & at(std::size_t n_c) const
Range-checked access to a channel (read-only).
void SelectTrace(std::size_t sectionToSelect, std::ptrdiff_t base_start, std::ptrdiff_t base_end)
Selects a section.
int SetTime(const std::string &value)
Sets the time of recording as a string.
Recording(const Channel &c_Channel)
Constructor.
int GetSectionType(size_t section_number)
Get Type of Section.
void SetXUnits(const std::string &value)
Sets the x units.
const std::vector< std::size_t > & GetSelectedSections() const
Retrieves the indices of the selected sections (read-only).
std::size_t GetCurChIndex() const
Retrieves the index of the current channel.
void CopyAttributes(const Recording &c_Recording)
Copy descriptive attributes from another Recording to this Recording.
const Channel & curch() const
Retrieves the active channel (read-only)
bool UnselectTrace(std::size_t sectionToUnselect)
Unselects a section if it was selected before.
struct tm GetDateTime() const
Retrieves the date of recording as a string.
std::deque< Channel > & get()
Retrieves the channels (read and write).
virtual ~Recording()
Destructor.
const std::string & GetGlobalSectionDescription() const
Retrieves the common section description.
double GetSR() const
Retrieves the sampling rate ( 1 / x-scale )
const std::deque< Channel > & get() const
Retrieves the channels (read-only).
const std::string & GetXUnits() const
Retrieves the x units.