WSL/SLF GitLab Repository

Commit c674e740 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Small change to the data generators so one can have access to the Config object

parent f3a36289
......@@ -230,7 +230,7 @@ void DataGenerator::setAlgorithms(const Config& cfg, const std::string& key_patt
for (size_t jj=0; jj<nrOfAlgorithms; jj++) {
std::vector<std::string> vecArgs;
getArgumentsForAlgorithm(cfg, parname, tmpAlgorithms[jj], vecArgs);
vecGenerators[jj] = GeneratorAlgorithmFactory::getAlgorithm( tmpAlgorithms[jj], vecArgs);
vecGenerators[jj] = GeneratorAlgorithmFactory::getAlgorithm( cfg, tmpAlgorithms[jj], vecArgs);
}
if (nrOfAlgorithms>0) {
......
......@@ -113,7 +113,7 @@ const double GeneratorAlgorithm::soil_albedo = .23; //grass
const double GeneratorAlgorithm::snow_albedo = .85; //snow
const double GeneratorAlgorithm::snow_thresh = .1; //if snow height greater than this threshold -> snow albedo
GeneratorAlgorithm* GeneratorAlgorithmFactory::getAlgorithm(const std::string& i_algoname, const std::vector<std::string>& vecArgs)
GeneratorAlgorithm* GeneratorAlgorithmFactory::getAlgorithm(const Config& /*cfg*/, const std::string& i_algoname, const std::vector<std::string>& vecArgs)
{
std::string algoname(i_algoname);
IOUtils::toUpper(algoname);
......
......@@ -120,7 +120,7 @@ class GeneratorAlgorithm {
class GeneratorAlgorithmFactory {
public:
static GeneratorAlgorithm* getAlgorithm(const std::string& i_algoname, const std::vector<std::string>& vecArgs);
static GeneratorAlgorithm* getAlgorithm(const Config& cfg, const std::string& i_algoname, const std::vector<std::string>& vecArgs);
};
} //end namespace mio
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment