[yoda-svn] r279 - trunk/include/YODA

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Aug 18 14:36:17 BST 2011


Author: mkawalec
Date: Thu Aug 18 14:36:17 2011
New Revision: 279

Log:
Added a copy constructor to Axis2D.

Modified:
   trunk/include/YODA/Axis2D.h

Modified: trunk/include/YODA/Axis2D.h
==============================================================================
--- trunk/include/YODA/Axis2D.h	Thu Aug 18 14:28:02 2011	(r278)
+++ trunk/include/YODA/Axis2D.h	Thu Aug 18 14:36:17 2011	(r279)
@@ -90,7 +90,7 @@
     }
 
 
-    /// @brief A bin constructor
+    /// @brief A constructor accepting a list of bins and all the outflows
     ///
     /// Creates an Axis2D from existing bins
     /// @todo This is too large to be inline: move to the .cc
@@ -114,6 +114,19 @@
       _dbn = totalDbn;
     }
 
+    /// A copy constructor
+    Axis2D(const Axis2D& a) {
+      _bins = a._bins;
+      _dbn = a._dbn;
+      _outflows = a._outflows;
+
+      _binHashSparse.first.regenCache();
+      _binHashSparse.second.regenCache();
+      _regenDelimiters();
+    }
+
+
+
     //@}
 
     /// @name Bin insertion operators


More information about the yoda-svn mailing list