|
[yoda-svn] r560 - trunk/srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Mar 4 13:29:12 GMT 2013
Author: buckley Date: Mon Mar 4 13:29:12 2013 New Revision: 560 Log: Minor correction to path reading from AIDA, where slash separators were being double-counted Modified: trunk/src/ReaderAIDA.cc Modified: trunk/src/ReaderAIDA.cc ============================================================================== --- trunk/src/ReaderAIDA.cc Mon Mar 4 13:19:10 2013 (r559) +++ trunk/src/ReaderAIDA.cc Mon Mar 4 13:29:12 2013 (r560) @@ -36,8 +36,11 @@ const string plotname = dpsE->Attribute("name"); // DPS to be stored + /// @todo Use a proper path handling class... like Boost.Filesystem's path, but without the PITA linking + string sep = "/"; + if (plotpath.rfind("/") == plotpath.size()-1 || plotname.find("/") == 0) sep = ""; /// @todo Clarify the memory management resulting from this... need shared_ptr? - Scatter2D* dps = new Scatter2D(plotpath + "/" + plotname); + Scatter2D* dps = new Scatter2D(plotpath + sep + plotname); // FIXME: This code crashes when there are annotations in the AIDA file: //// Read in annotations
More information about the yoda-svn mailing list |