Commit 8e99b602c876594a46b7828859b2bc0233fa4ef4

Authored by Benjamin Renard
1 parent 5547a326

Function to parse an ISO time accept now a time without mls defined

Fix epochPlot to enable the draw without any parameters
Add plot context file write in superposed mode
src/DD_Client_r_Lib/TimeUtil.cc
... ... @@ -84,10 +84,15 @@ double TimeUtil::readTimeInIso(char *Stime) {
84 84 ss.width(2);
85 85 ss >> tabTime[5]; //sec;
86 86  
87   - ss.width(1);
88   - ss >> c; //.
89   - ss.width(3);
90   - ss >> tabTime[6]; //ms;
  87 + if (ss.eof())
  88 + tabTime[6] = 0;
  89 + else
  90 + {
  91 + ss.width(1);
  92 + ss >> c; //.
  93 + ss.width(3);
  94 + ss >> tabTime[6]; //ms;
  95 + }
91 96  
92 97  
93 98 UT = UT2double(tabTime);
... ...
src/ParamOutputImpl/Plot/Epoch/EpochPlot.cc
... ... @@ -372,8 +372,7 @@ const std::string EpochPlot::getXAxisId() const {
372 372 return param.getYSeriePropertiesMap().begin()->second.getXAxisId();
373 373 }
374 374  
375   - //not found, TODO see if we should raise an exception...
376   - return "";
  375 + return "epochAxis";
377 376 }
378 377  
379 378 void EpochPlot::setCenterTimeId(std::string centerTimeId)
... ...
src/ParamOutputImpl/Plot/PlotOutput.cc
... ... @@ -289,6 +289,15 @@ void PlotOutput::drawAllIntervalsInOnePage()
289 289 // Compute and set left axis tickmark width depending on the panel constraints
290 290 computePanelLegendPosition();
291 291  
  292 + //write page context
  293 + if (_writeContextFile)
  294 + {
  295 + _contextWriter.startElement("page");
  296 + _contextWriter.addAttribute("startTime",std::to_string(_currentTimeInterval->_startTime).c_str());
  297 + _contextWriter.addAttribute("stopTime",std::to_string(_currentTimeInterval->_stopTime).c_str());
  298 + _page->writeContext(_contextWriter);
  299 + }
  300 +
292 301 /*
293 302 * Second step : Draw plot for each intervals
294 303 */
... ... @@ -308,12 +317,18 @@ void PlotOutput::drawAllIntervalsInOnePage()
308 317 _currentTimeInterval == _timeIntervalList->begin(),
309 318 //is second interval?
310 319 _currentTimeInterval == std::prev(_timeIntervalList->end()));
  320 + if (_writeContextFile && (_currentTimeInterval == _timeIntervalList->begin()))
  321 + //write plot context
  322 + plot->writeContext(_contextWriter);
311 323 }
312 324  
313 325 //go to next interval
314 326 ++_currentTimeInterval;
315 327 }
316 328  
  329 + if (_writeContextFile)
  330 + _contextWriter.endElement(); /* page */
  331 +
317 332 /*
318 333 * Third step : reset plots and data and prepare for post processing
319 334 */
... ...