1#ifndef FMTparallelwriter_H_INCLUDED
2#define FMTparallelwriter_H_INCLUDED
7#include <boost/thread/recursive_mutex.hpp>
30 std::vector<Core::FMToutput>outputstowrite;
34 GDALDataset* resultsdataset;
37 std::map<std::string,OGRLayer*> resultslayer;
44 mutable boost::recursive_mutex mtx;
47 double resultsminimaldrift;
53 std::vector<std::string> alllayeroptions;
56 int outputfirstperiod;
62 std::string projectdirectory;
65 std::string projectname;
72 const std::map<std::string, std::vector<std::vector<double>>>& globalvalues,
73 const std::map<std::string, std::vector<std::vector<double>>>& localvalues,
74 const bool lower =
true)
const;
101 const std::string& driver,
102 const std::vector<Core::FMToutput>& outputs,
103 const std::vector<Models::FMTmodel*>& allmodels,
104 std::vector<std::string>layersoptions = std::vector<std::string>(),
105 double minimaldrift = 0.5,
112 const std::string& driver,
114 std::vector<std::string>layersoptions = std::vector<std::string>(),
117 std::string primaryfilelocation = std::string());
127 void write(
const std::string& modelname,
128 const std::map<std::string, std::vector<std::vector<double>>>& results,
129 const int& firstperiod,
const int& lastperiod,
const int& iteration)
const;
134 std::map<std::string, std::vector<std::vector<double>>>
getresults(
const std::unique_ptr<Models::FMTmodel>& modelptr,
const int& firstperiod,
const int& lastperiod)
const;
144 void getandwrite(
const std::unique_ptr<Models::FMTmodel>& modelptr,
const std::vector<Core::FMToutput>& loutputs);
#define FMTEXPORT
Definition: FMTutility.hpp:92
Definition: FMTmodel.hpp:60
Definition: FMTparallelwriter.hpp:27
FMTparallelwriter(const std::string &location, const std::string &driver, Core::FMToutputlevel outputlevel=Core::FMToutputlevel::totalonly, std::vector< std::string >layersoptions=std::vector< std::string >(), int firstperiod=1, int lastperiod=1, std::string primaryfilelocation=std::string())
virtual ~FMTparallelwriter()
void getandwrite(const std::unique_ptr< Models::FMTmodel > &modelptr, const std::vector< Core::FMToutput > &loutputs)
FMTparallelwriter(const FMTparallelwriter &rhs)=default
void setlayer(const Models::FMTmodel *model)
FMTparallelwriter(const std::string &location, const std::string &driver, const std::vector< Core::FMToutput > &outputs, const std::vector< Models::FMTmodel * > &allmodels, std::vector< std::string >layersoptions=std::vector< std::string >(), double minimaldrift=0.5, Core::FMToutputlevel outputlevel=Core::FMToutputlevel::totalonly)
const std::map< std::string, std::map< double, std::vector< double > > > getdriftprobability(const std::map< std::string, std::vector< std::vector< double > > > &globalvalues, const std::map< std::string, std::vector< std::vector< double > > > &localvalues, const bool lower=true) const
std::map< std::string, std::vector< std::vector< double > > > getresults(const std::unique_ptr< Models::FMTmodel > &modelptr, const int &firstperiod, const int &lastperiod) const
void write(const std::string &modelname, const std::map< std::string, std::vector< std::vector< double > > > &results, const int &firstperiod, const int &lastperiod, const int &iteration) const
FMTparallelwriter()=default
void setdriftprobability(const std::string &globalmodel, const std::string &localmodel) const
Definition: FMTmodelparser.hpp:51
FMToutputlevel
Definition: FMTutility.hpp:17
@ totalonly
Definition: FMTutility.hpp:19
Namespace containing all enumerator and classes used to construct or manipulate the different type of...
Definition: FMTareaparser.hpp:50
Namespace for parallel tasking may include multithreading / multiprocessing.
Definition: FMTopareaschedulertask.hpp:40