[Rivet-svn] r3227 - in branches/2011-07-aida2yoda: include/Rivet src/Core src/Tools

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 19 20:37:08 BST 2011


Author: dgrell
Date: Tue Jul 19 20:37:08 2011
New Revision: 3227

Log:
now need to get make check to work. Rewrite AIDA blocks in RivetYODA.cc

Modified:
   branches/2011-07-aida2yoda/include/Rivet/RivetYODA.hh
   branches/2011-07-aida2yoda/src/Core/Analysis.cc
   branches/2011-07-aida2yoda/src/Tools/RivetYODA.cc

Modified: branches/2011-07-aida2yoda/include/Rivet/RivetYODA.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/RivetYODA.hh	Tue Jul 19 20:16:37 2011	(r3226)
+++ branches/2011-07-aida2yoda/include/Rivet/RivetYODA.hh	Tue Jul 19 20:37:08 2011	(r3227)
@@ -15,6 +15,7 @@
 #include "YODA/Profile1D.h"
 #include "YODA/Scatter2D.h"
 #include "YODA/Point2D.h"
+#include "YODA/ReaderAIDA.h"
 
 namespace Rivet {
 
@@ -41,6 +42,7 @@
   }
 
   using YODA::WriterYODA;
+  using YODA::ReaderAIDA;
   using YODA::Histo1D;
   using YODA::Profile1D;
   using YODA::Scatter2D;

Modified: branches/2011-07-aida2yoda/src/Core/Analysis.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Core/Analysis.cc	Tue Jul 19 20:16:37 2011	(r3226)
+++ branches/2011-07-aida2yoda/src/Core/Analysis.cc	Tue Jul 19 20:37:08 2011	(r3227)
@@ -180,7 +180,7 @@
 
 
   const BinEdges& Analysis::binEdges(const string& hname) const {
-    // _cacheBinEdges();
+    _cacheBinEdges();
     MSG_TRACE("Using histo bin edges for " << name() << ":" << hname);
     const BinEdges& edges = _histBinEdges.find(hname)->second;
     if (getLog().isActive(Log::TRACE)) {
@@ -395,7 +395,7 @@
 				       size_t yAxisId, const string& title,
 				       const string& xtitle, const string& ytitle) {
     // Get the bin edges (only read the AIDA file once)
-    // _cacheXAxisData();
+    _cacheXAxisData();
     // Build the axis code
     const string axisCode = makeAxisCode(datasetId, xAxisId, yAxisId);
     //const map<string, vector<DPSXPoint> > xpoints = getDPSXValsErrs(papername);

Modified: branches/2011-07-aida2yoda/src/Tools/RivetYODA.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Tools/RivetYODA.cc	Tue Jul 19 20:16:37 2011	(r3226)
+++ branches/2011-07-aida2yoda/src/Tools/RivetYODA.cc	Tue Jul 19 20:37:08 2011	(r3227)
@@ -5,14 +5,15 @@
 #include "Rivet/Tools/RivetPaths.hh"
 // #include <sstream>
 // #include <stdexcept>
+
 using namespace std;
 
 namespace Rivet {
 
   string getDatafilePath(string papername) {
-    const string path =  findAnalysisRefFile(papername + ".dat");
+    const string path =  findAnalysisRefFile(papername + ".aida");
     if (!path.empty()) return path;
-    throw Rivet::Error("Couldn't find ref data file '" + papername + ".dat" +
+    throw Rivet::Error("Couldn't find ref data file '" + papername + ".aida" +
                        " in $RIVET_REF_PATH, " + getRivetDataPath() + ", or .");
     return "";
   }
@@ -21,6 +22,13 @@
   map<string, vector<DPSXYPoint> > getDPSXYValsErrs(string papername) {
     // Get filename
     const string xmlfile = getDatafilePath(papername);
+    YODA::Reader & reader =  ReaderAIDA::create();
+
+    vector<YODA::AnalysisObject *> aovec;
+    reader.read(xmlfile, aovec);
+    cerr << "HERE1 " << aovec.size() << '\n';
+
+    // MEMLEAK of vector contents
 
   //   // Open AIDA XML file
   //   TiXmlDocument doc(xmlfile);
@@ -104,6 +112,12 @@
     // Get filename
     const string xmlfile = getDatafilePath(papername);
 
+    YODA::Reader & reader =  ReaderAIDA::create();
+
+    vector<YODA::AnalysisObject *> aovec;
+    reader.read(xmlfile, aovec);
+    cerr << "HERE2 " << aovec.size() << '\n';
+
   //   // Open AIDA XML file
   //   TiXmlDocument doc(xmlfile);
   //   doc.LoadFile();


More information about the Rivet-svn mailing list