[Rivet-svn] r2388 - in trunk: src/Core test

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Apr 5 19:49:26 BST 2010


Author: buckley
Date: Mon Apr  5 19:49:26 2010
New Revision: 2388

Log:
Trying to fix problems with yaml-cpp upgrade

Modified:
   trunk/src/Core/AnalysisInfo.cc
   trunk/test/testApi.cc

Modified: trunk/src/Core/AnalysisInfo.cc
==============================================================================
--- trunk/src/Core/AnalysisInfo.cc	Mon Apr  5 18:37:20 2010	(r2387)
+++ trunk/src/Core/AnalysisInfo.cc	Mon Apr  5 19:49:26 2010	(r2388)
@@ -74,10 +74,10 @@
       string key;
       it.first() >> key;
       stringstream sec;
-      sec << it.second();
-      const string secstr = sec.str().substr(0, sec.str().length()-1);
-      Log::getLog("Rivet.AnalysisInfo")
-        << Log::TRACE << key << ": " << secstr << endl;
+      // sec << it.second();
+      // const string secstr = sec.str().substr(0, sec.str().length()-1);
+      // Log::getLog("Rivet.AnalysisInfo")
+      //   << Log::TRACE << key << ": " << secstr << endl;
       try {
         if (key == "Name") {
           it.second() >> ai->_name;

Modified: trunk/test/testApi.cc
==============================================================================
--- trunk/test/testApi.cc	Mon Apr  5 18:37:20 2010	(r2387)
+++ trunk/test/testApi.cc	Mon Apr  5 19:49:26 2010	(r2388)
@@ -21,12 +21,13 @@
   double sum_of_weights = 0.0;
   while (evt) {
     rivet.analyze(*evt);
-    sum_of_weights+=evt->weights()[0];
-    // clean up and get next event
-    delete evt;
+    sum_of_weights += evt->weights()[0];
+
+    // Clean up and get next event
+    delete evt; evt = 0;
     hepmcio >> evt;
   }
-  delete file;
+  delete file; file = 0;
 
   rivet.setCrossSection(1.0);
   rivet.setSumOfWeights(sum_of_weights); // not necessary, but allowed


More information about the Rivet-svn mailing list