67 explicit SensorData(
const std::string& file_name);
71 explicit SensorData(std::vector<std::size_t> time_steps);
78 void addTimeSeries(
const std::string& data_name, std::vector<float>* data,
79 const std::string& data_unit_string =
"");
85 const std::string& data_unit_string =
"");
A container for sensor data at an observation site. The class stores a number of time series and has ...
std::size_t getEndTime() const
Returns the last time step.
const std::vector< float > * getTimeSeries(SensorDataType time_series_name) const
Returns the time series with the given name.
const std::vector< std::size_t > & getTimeSteps() const
Returns the time step vector (if it exists)
std::size_t getStartTime() const
Returns the first time step.
const std::vector< SensorDataType > & getTimeSeriesNames() const
Returns all time series names contained in this container.
std::vector< SensorDataType > _vec_names
std::vector< std::vector< float > * > _data_vecs
SensorData(const std::string &file_name)
std::size_t getStepSize() const
std::vector< std::string > _data_unit_string
std::vector< std::size_t > _time_steps
void addTimeSeries(const std::string &data_name, std::vector< float > *data, const std::string &data_unit_string="")
int readDataFromFile(const std::string &file_name)
Reads a CSV-file with time series data and fills the container.
TimeStepType getTimeUnit() const
Returns the unit the time steps.
static SensorDataType convertString2SensorDataType(const std::string &s)
Converts Strings to Sensor Data Types.
static std::string convertSensorDataType2String(SensorDataType t)
Converts Sensor Data Types to Strings.
void setTimeUnit(TimeStepType t)
Allows to set a unit for the time steps.