|
[yoda-svn] r573 - in trunk: include/YODA srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Mar 8 17:18:55 GMT 2013
Author: buckley Date: Fri Mar 8 17:18:55 2013 New Revision: 573 Log: More protection against comments in AIDA XML Modified: trunk/include/YODA/Point2D.h trunk/src/ReaderAIDA.cc Modified: trunk/include/YODA/Point2D.h ============================================================================== --- trunk/include/YODA/Point2D.h Fri Mar 8 00:11:41 2013 (r572) +++ trunk/include/YODA/Point2D.h Fri Mar 8 17:18:55 2013 (r573) @@ -263,6 +263,11 @@ //@} + /// @todo Support multiple weights (then need to discard setYMin/Max?) + + /// @todo Add setY(y, err) combinations for user convenience + + // @name Manipulations //@{ Modified: trunk/src/ReaderAIDA.cc ============================================================================== --- trunk/src/ReaderAIDA.cc Fri Mar 8 00:11:41 2013 (r572) +++ trunk/src/ReaderAIDA.cc Fri Mar 8 17:18:55 2013 (r573) @@ -30,7 +30,7 @@ // Walk down tree to get to the <dataPointSet> elements const TiXmlNode* aidaN = doc.FirstChild("aida"); if (!aidaN) throw ReadError("Couldn't get <aida> root element"); - for (const TiXmlNode* dpsN = aidaN->FirstChild("dataPointSet"); dpsN; dpsN = dpsN->NextSibling()) { + for (const TiXmlNode* dpsN = aidaN->FirstChild("dataPointSet"); dpsN; dpsN = dpsN->NextSibling("dataPointSet")) { const TiXmlElement* dpsE = dpsN->ToElement(); if (dpsE == 0) continue; const string plotpath = dpsE->Attribute("path"); @@ -43,7 +43,7 @@ /// @todo Clarify the memory management resulting from this... need shared_ptr? Scatter2D* dps = new Scatter2D(plotpath + sep + plotname); - // FIXME: This code crashes when there are annotations in the AIDA file: + /// @todo This code crashes when there are annotations in the AIDA file: fix //// Read in annotations //for (const TiXmlNode* annN = dpsN->FirstChild("annotation"); annN; annN = annN->NextSibling()) { // for (const TiXmlNode* itN = annN->FirstChild("item"); itN; itN = itN->NextSibling()) { @@ -52,13 +52,13 @@ //} size_t ipt = 0; - for (const TiXmlNode* dpN = dpsN->FirstChild("dataPoint"); dpN; dpN = dpN->NextSibling()) { + for (const TiXmlNode* dpN = dpsN->FirstChild("dataPoint"); dpN; dpN = dpN->NextSibling("dataPoint")) { ipt += 1; const TiXmlNode* xMeasN = dpN->FirstChild("measurement"); if (!xMeasN) { cerr << "Couldn't get any <measurement> tag in DPS " << dpsE->Attribute("name") << " point #" << ipt << endl; continue; } - const TiXmlNode* yMeasN = xMeasN->NextSibling(); + const TiXmlNode* yMeasN = xMeasN->NextSibling("measurement"); if (!yMeasN) { cerr << "Couldn't get y-axis <measurement> tag in DPS " << dpsE->Attribute("name") << " point #" << ipt << endl; continue; }
More information about the yoda-svn mailing list |