[yoda-svn] r265 - in trunk: include/YODA tests

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Aug 17 15:23:26 BST 2011


Author: mkawalec
Date: Wed Aug 17 15:23:26 2011
New Revision: 265

Log:
Added unpersisting of outflows and total distribution, removed colorised output in tests.

Modified:
   trunk/include/YODA/Axis2D.h
   trunk/include/YODA/Histo2D.h
   trunk/tests/TestScatter3D.cc

Modified: trunk/include/YODA/Axis2D.h
==============================================================================
--- trunk/include/YODA/Axis2D.h	Wed Aug 17 15:13:35 2011	(r264)
+++ trunk/include/YODA/Axis2D.h	Wed Aug 17 15:23:26 2011	(r265)
@@ -82,7 +82,10 @@
 
     /// @brief A bin constructor
     /// Creates an Axis2D from existing bins
-    Axis2D(Bins bins) {
+    Axis2D(const Bins& bins, 
+           const std::vector<std::vector<Dbn2D> >& outflows,
+           const Dbn2D& totalDbn) 
+    {
       vector<Segment> binLimits;
       for (size_t i = 0; i < bins.size(); ++i) {
         binLimits.push_back(make_pair(make_pair(bins[i].xMin(), bins[i].yMin()),
@@ -94,6 +97,9 @@
       }
       _regenDelimiters();
       if(isGriddy()) _setOutflows();
+      _outflows = outflows;
+
+      _dbn = totalDbn;
     }
 
     //@}

Modified: trunk/include/YODA/Histo2D.h
==============================================================================
--- trunk/include/YODA/Histo2D.h	Wed Aug 17 15:13:35 2011	(r264)
+++ trunk/include/YODA/Histo2D.h	Wed Aug 17 15:23:26 2011	(r265)
@@ -9,6 +9,7 @@
 #include "YODA/AnalysisObject.h"
 #include "YODA/HistoBin2D.h"
 #include "YODA/HistoBin1D.h"
+#include "YODA/Dbn2D.h"
 #include "YODA/Axis2D.h"
 #include "YODA/Exceptions.h"
 #include "YODA/Histo1D.h"
@@ -71,10 +72,11 @@
 
     /// @brief State-setting constructor
     /// Mainly intended for internal persistency use.
-    /// @todo Need to add state-setting for the total dbn and the outflows
-    Histo2D(const std::vector<HistoBin2D> bins,
+    Histo2D(const std::vector<HistoBin2D>& bins, 
+            const std::vector<std::vector<Dbn2D> >& outflows,
+            const Dbn2D& totalDbn,
             const std::string& path="", const std::string& title="")
-      : AnalysisObject("Histo2D", path, title), _axis(bins)
+      : AnalysisObject("Histo2D", path, title), _axis(bins, outflows, totalDbn)
     { }
 
     //@}

Modified: trunk/tests/TestScatter3D.cc
==============================================================================
--- trunk/tests/TestScatter3D.cc	Wed Aug 17 15:13:35 2011	(r264)
+++ trunk/tests/TestScatter3D.cc	Wed Aug 17 15:23:26 2011	(r265)
@@ -69,13 +69,12 @@
     return -1;
   }
 
-  cout << "Testing resetting: ";
+  cout << "Testing resetting: " << endl;
   s4.reset();
   if(s4.numPoints() != 0) {
     cout << "Resetting didn't work as it should!" << endl;
     return -1;
   }
-  cout << "\033[1;31m" << "Fine" << "\033[0m\n";
   cout << "-----------------------------------" << endl;
   return EXIT_SUCCESS;
 }


More information about the yoda-svn mailing list