19#ifndef TIMESERIESMANAGER_H
20#define TIMESERIESMANAGER_H
70 std::vector< METEO_SET >& vecVecMeteo);
102 const std::vector< MeteoData >& vecMeteo,
const bool& invalidate_cache=
true);
105 const std::vector< METEO_SET >& vecMeteo);
151 void writeMeteoData(
const std::vector< METEO_SET >& vecMeteo,
const std::string& name=
"");
224 static bool compare(std::pair<Date, METEO_SET> p1, std::pair<Date, METEO_SET> p2);
225 void setDfltBufferProperties();
226 void fill_filtered_cache();
227 void fillRawBuffer(
const Date& date_start,
const Date& date_end);
235 std::map<Date, METEO_SET > point_cache;
239 Date raw_requested_start, raw_requested_end;
242 unsigned int processing_level;
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to generate meteo data from user-selected models or parametrizations. This class sits in betw...
Definition: DataGenerator.h:43
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
This class is the class to use for raw I/O operations. It is responsible for transparently loading th...
Definition: IOHandler.h:37
A class to buffer meteorological data. This class buffers MeteoData objects. It is currently NOT a pr...
Definition: Buffer.h:39
A facade class that invokes the processing of the filters and the resampling.
Definition: MeteoProcessor.h:39
Definition: ProcessingBlock.h:36
Definition: TimeSeriesManager.h:31
size_t getMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< METEO_SET > &vecVecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: TimeSeriesManager.cc:227
Date getDataEnd(const cache_types &cache) const
Returns the real end of the raw data in buffer.
Definition: TimeSeriesManager.cc:159
void setBufferProperties(const double &buffer_size, const double &buff_before)
Set buffer window properties requirements as known to the application itself.
Definition: TimeSeriesManager.cc:75
void clear_cache(const cache_types &cache)
Clear the chosen cache.
Definition: TimeSeriesManager.cc:379
const std::string toString() const
Definition: TimeSeriesManager.cc:439
double getAvgSamplingRate() const
Returns the average sampling rate in the data.
Definition: TimeSeriesManager.cc:110
void writeMeteoData(const std::vector< METEO_SET > &vecMeteo, const std::string &name="")
Definition: TimeSeriesManager.cc:343
cache_types
Definition: TimeSeriesManager.h:33
@ ALL
all caches
Definition: TimeSeriesManager.h:37
@ FILTERED
the filtered data cache
Definition: TimeSeriesManager.h:35
@ RAW
the raw data cache
Definition: TimeSeriesManager.h:34
@ POINTS
the (interpolated) points cache
Definition: TimeSeriesManager.h:36
void push_meteo_data(const IOUtils::ProcessingLevel &level, const Date &date_start, const Date &date_end, const std::vector< MeteoData > &vecMeteo, const bool &invalidate_cache=true)
Push a vector of time series of MeteoData objects into the TimeSeriesManager. This overwrites any int...
Definition: TimeSeriesManager.cc:196
void getBufferProperties(Duration &o_buffer_size, Duration &o_buff_before) const
Get the current buffer requirements (ie user defined buffer + filters/resampling requirements)
Definition: TimeSeriesManager.cc:96
Date getBufferStart(const cache_types &cache) const
Returns the beginning of the raw buffer.
Definition: TimeSeriesManager.cc:119
Date getDataStart(const cache_types &cache) const
Returns the real beginning of the raw data in buffer.
Definition: TimeSeriesManager.cc:143
void setProcessingLevel(const unsigned int &i_level)
Set the desired ProcessingLevel of the TimeSeriesManager instance The processing level affects the wa...
Definition: TimeSeriesManager.cc:102
size_t getStationData(const Date &date, STATIONS_SET &vecStation)
Definition: TimeSeriesManager.cc:218
IOHandler & getIOHandler() const
Returns a copy of the internal IOHandler object. This is convenient to clone an iomanager.
Definition: TimeSeriesManager.h:184
TimeSeriesManager(IOHandler &in_iohandler, const Config &in_cfg, const char &rank=1, const IOUtils::OperationMode &mode=IOUtils::STD)
Default constructor.
Definition: TimeSeriesManager.cc:32
void add_to_points_cache(const Date &i_date, const METEO_SET &vecMeteo)
Add a METEO_SET for a specific instance to the point cache.
Definition: TimeSeriesManager.cc:369
const Config getConfig() const
Returns a copy of the internal Config object.
Definition: TimeSeriesManager.h:177
void setRawBufferProperties(const Date &raw_buffer_start, const Date &raw_buffer_end)
Definition: TimeSeriesManager.cc:90
Date getBufferEnd(const cache_types &cache) const
Returns the end of the raw buffer.
Definition: TimeSeriesManager.cc:131
OperationMode
Keywords for mode of operation. Please keep all the GRID_xxx last!
Definition: IOUtils.h:63
@ STD
default: extract timeseries from timeseries or grids from grids or spatially interpolate timeseries
Definition: IOUtils.h:64
ProcessingLevel
Definition: IOUtils.h:54
std::vector< MeteoData > METEO_SET
Definition: MeteoData.h:32
std::vector< StationData > STATIONS_SET
Definition: StationData.h:145