Commit 6c587d7a5e44fb3c1a6773f400de4283d2407827

Authored by Hacene SI HADJ MOHAND
2 parents f4f69b71 266c1fa7

Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_Kernel

Showing 1 changed file with 23 additions and 10 deletions   Show diff stats
src/amdaParameterInfo/Main.cc
@@ -76,16 +76,29 @@ int main(int argc, char *argv[]) { @@ -76,16 +76,29 @@ int main(int argc, char *argv[]) {
76 char stopTimeIso[24]; 76 char stopTimeIso[24];
77 memset(startTimeIso, 0, 24*sizeof(char)); 77 memset(startTimeIso, 0, 24*sizeof(char));
78 memset(stopTimeIso, 0, 24*sizeof(char)); 78 memset(stopTimeIso, 0, 24*sizeof(char));
79 -  
80 - for (int y = 1970; y < MAX_YEAR; ++y) {  
81 - ss << std::setfill('0') << y << "-01-01T00:00:00.000";  
82 - memcpy(startTimeIso, ss.str().c_str(), 24*sizeof(char));  
83 - double startTime = AMDA::TimeUtil::readTimeInIso(startTimeIso);  
84 - ss.str("");  
85 - ss << std::setfill('0') << y << "-12-31T23:59:59.000";  
86 - memcpy(stopTimeIso, ss.str().c_str(), 24*sizeof(char));  
87 - double stopTime = AMDA::TimeUtil::readTimeInIso(stopTimeIso);  
88 - parameterManager.addInputInterval(startTime, stopTime, 0, emptyStr, emptyStr, 0); 79 + double startTime = 0.;
  80 + double stopTime = 0.;
  81 +
  82 + std::vector<std::string> gran;
  83 + gran.push_back("-01-01T00:01:00.000");
  84 + gran.push_back("-01-01T01:00:00.000");
  85 + gran.push_back("-01-02T00:00:00.000");
  86 + gran.push_back("-02-01T00:00:00.000");
  87 + gran.push_back("-12-31T00:00:00.000");
  88 +
  89 +
  90 + for (std::vector<std::string>::iterator itGran = gran.begin(); itGran != gran.end(); ++itGran) {
  91 + for (int y = 1970; y < MAX_YEAR; ++y) {
  92 + ss.str("");
  93 + ss << std::setfill('0') << y << "-01-01T00:00:00.000";
  94 + memcpy(startTimeIso, ss.str().c_str(), 24*sizeof(char));
  95 + startTime = AMDA::TimeUtil::readTimeInIso(startTimeIso);
  96 + ss.str("");
  97 + ss << std::setfill('0') << y << (*itGran);
  98 + memcpy(stopTimeIso, ss.str().c_str(), 24*sizeof(char));
  99 + stopTime = AMDA::TimeUtil::readTimeInIso(stopTimeIso);
  100 + parameterManager.addInputInterval(startTime, stopTime, 0, emptyStr, emptyStr, 0);
  101 + }
89 } 102 }
90 103
91 if (!lProperties["app.param.gapthreshold"].empty()) 104 if (!lProperties["app.param.gapthreshold"].empty())