Commit 55a5962ed6fc0f350e37619b66c81f0019901b26
1 parent
eddfb311
Exists in
master
and in
48 other branches
Minor fixes
Showing
1 changed file
with
8 additions
and
3 deletions
Show diff stats
src/ParamOutputImpl/Plot/PanelPlotOutput.cc
... | ... | @@ -2109,34 +2109,39 @@ void PanelPlotOutput::writeContext(ContextFileWriter &writer, AMDA::Parameters:: |
2109 | 2109 | { |
2110 | 2110 | TimeTableCatalog::Catalog inputTTOrCat; |
2111 | 2111 | inputTTOrCat.read(ttOrCatPath, lReaderType); |
2112 | + writer.startElement("intervals"); | |
2112 | 2113 | |
2113 | 2114 | for (std::vector<TimeTableCatalog::TimeInterval>::const_iterator it = inputTTOrCat.getIntervals().begin(); it != inputTTOrCat.getIntervals().end(); ++it) |
2114 | 2115 | { |
2115 | 2116 | if (it->_startTime >= currentTimeInterval->_startTime && it->_stopTime <= currentTimeInterval->_stopTime) // inside the interval |
2116 | 2117 | { |
2117 | - writer.startElement("intervals"); | |
2118 | + writer.startElement("interval"); | |
2118 | 2119 | writer.addAttribute("name", inputTTOrCat._name.c_str()); |
2119 | 2120 | writer.addAttribute("id", std::to_string(it->_index).c_str()); |
2120 | 2121 | writer.addAttribute("startTime", std::to_string(it->_startTime).c_str()); |
2121 | 2122 | writer.addAttribute("stopTime", std::to_string(it->_stopTime).c_str()); |
2123 | + writer.endElement(); | |
2122 | 2124 | } |
2123 | 2125 | else if (it->_startTime <= currentTimeInterval->_startTime && it->_stopTime <= currentTimeInterval->_stopTime && it->_stopTime >= currentTimeInterval->_startTime) // begins before, ends inside |
2124 | 2126 | { |
2125 | - writer.startElement("intervals"); | |
2127 | + writer.startElement("interval"); | |
2126 | 2128 | writer.addAttribute("name", inputTTOrCat._name.c_str()); |
2127 | 2129 | writer.addAttribute("id", std::to_string(it->_index).c_str()); |
2128 | 2130 | writer.addAttribute("startTime", std::to_string(currentTimeInterval->_startTime).c_str()); |
2129 | 2131 | writer.addAttribute("stopTime", std::to_string(it->_stopTime).c_str()); |
2132 | + writer.endElement(); | |
2130 | 2133 | } |
2131 | 2134 | else if (it->_startTime >= currentTimeInterval->_startTime && it->_startTime <= currentTimeInterval->_stopTime && it->_stopTime >= currentTimeInterval->_stopTime) // begins inside, ends after |
2132 | 2135 | { |
2133 | - writer.startElement("intervals"); | |
2136 | + writer.startElement("interval"); | |
2134 | 2137 | writer.addAttribute("name", inputTTOrCat._name.c_str()); |
2135 | 2138 | writer.addAttribute("id", std::to_string(it->_index).c_str()); |
2136 | 2139 | writer.addAttribute("startTime", std::to_string(it->_startTime).c_str()); |
2137 | 2140 | writer.addAttribute("stopTime", std::to_string(currentTimeInterval->_stopTime).c_str()); |
2141 | + writer.endElement(); | |
2138 | 2142 | } |
2139 | 2143 | } |
2144 | + writer.endElement(); | |
2140 | 2145 | } |
2141 | 2146 | } |
2142 | 2147 | } | ... | ... |