[yoda-svn] yoda: Provide tuple fill() methods.

YODA Mercurial yoda at projects.hepforge.org
Tue Oct 25 17:30:01 BST 2016


details:   https://yoda.hepforge.org/hg/yoda/rev/0c4db7c316d3
branches:  multiweight
changeset: 1313:0c4db7c316d3
user:      David Grellscheid <david.grellscheid at durham.ac.uk>
date:      Tue Oct 25 17:29:52 2016 +0100
description:
Provide tuple fill() methods.

diffs (truncated from 124 to 50 lines):

--- a/include/YODA/Counter.h	Tue Oct 25 14:53:37 2016 +0100
+++ b/include/YODA/Counter.h	Tue Oct 25 17:29:52 2016 +0100
@@ -13,6 +13,7 @@
 #include <vector>
 #include <string>
 #include <map>
+#include <tuple>
 
 namespace YODA {
 
@@ -21,6 +22,10 @@
   class Counter : public AnalysisObject {
   public:
 
+
+    typedef std::tuple<> FillType;
+    typedef std::shared_ptr<Counter> Ptr;
+
     /// @name Constructors
     //@{
 
@@ -89,6 +94,9 @@
       _dbn.fill(weight, fraction);
     }
 
+    virtual void fill(FillType, double weight=1.0, double fraction=1.0) {
+      fill(weight, fraction);
+    }
 
     /// @brief Reset the histogram.
     ///
--- a/include/YODA/Histo2D.h	Tue Oct 25 14:53:37 2016 +0100
+++ b/include/YODA/Histo2D.h	Tue Oct 25 17:29:52 2016 +0100
@@ -14,6 +14,7 @@
 #include "YODA/Exceptions.h"
 
 #include <vector>
+#include <tuple>
 
 namespace YODA {
 
@@ -36,6 +37,9 @@
     typedef HistoBin2D Bin;
     typedef Axis::Outflows Outflows;
 
+    typedef std::tuple<double, double> FillType;
+    typedef std::shared_ptr<Histo2D> Ptr;
+
 
     /// @name Constructors


More information about the yoda-svn mailing list