Commit 3d47da022d0d909954eec80933b7efb047f517b3

Authored by Erdogan Furkan
1 parent 55a5962e

Better now

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