[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Mon Sep 26 17:15:02 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/50e058aa802d
branches:  multiweight
changeset: 5519:50e058aa802d
user:      Chris Pollard <cspollard at gmail.com>
date:      Mon Aug 22 12:31:52 2016 +0100
description:
multiweight branch creation.

details:   https://rivet.hepforge.org/hg/rivet/rev/556a8f9cb667
branches:  multiweight
changeset: 5520:556a8f9cb667
user:      Chris Pollard <cspollard at gmail.com>
date:      Mon Aug 22 16:57:03 2016 +0100
description:
finally checking this stuff in.

details:   https://rivet.hepforge.org/hg/rivet/rev/5d371020a353
branches:  multiweight
changeset: 5521:5d371020a353
user:      Chris Pollard <cspollard at gmail.com>
date:      Mon Sep 26 17:02:38 2016 +0100
description:
updated some comments

diffs (truncated from 855 to 50 lines):

--- a/include/Rivet/Analysis.hh	Wed Jul 06 23:39:10 2016 +0100
+++ b/include/Rivet/Analysis.hh	Mon Sep 26 17:02:38 2016 +0100
@@ -298,7 +298,7 @@
 
     /// Get the process cross-section per generated event in pb. Throws if this
     /// hasn't been set.
-    double crossSectionPerEvent() const;
+    vector<double> crossSectionPerEvent() const;
 
     /// Get the number of events seen (via the analysis handler). Use in the
     /// finalize phase only.
@@ -306,7 +306,7 @@
 
     /// Get the sum of event weights seen (via the analysis handler). Use in the
     /// finalize phase only.
-    double sumOfWeights() const;
+    const vector<double>& sumOfWeights() const;
 
 
   protected:
@@ -747,10 +747,10 @@
     /// Get a data object from the histogram system
     /// @todo Use this default function template arg in C++11
     // template <typename AO=AnalysisObjectPtr>
-    template <typename AO>
-    const std::shared_ptr<AO> getAnalysisObject(const std::string& name) const {
+    template <typename AOPtr>
+    const AOPtr& getAnalysisObject(const std::string& name) const {
       foreach (const AnalysisObjectPtr& ao, analysisObjects()) {
-        if (ao->path() == histoPath(name)) return dynamic_pointer_cast<AO>(ao);
+        if (ao->path() == histoPath(name)) return dynamic_cast<AOPtr&>(ao);
       }
       throw Exception("Data object " + histoPath(name) + " not found");
     }
@@ -758,10 +758,10 @@
     /// Get a data object from the histogram system (non-const)
     /// @todo Use this default function template arg in C++11
     // template <typename AO=AnalysisObjectPtr>
-    template <typename AO>
-    std::shared_ptr<AO> getAnalysisObject(const std::string& name) {
+    template <typename AOPtr>
+    AOPtr& getAnalysisObject(const std::string& name) {
       foreach (const AnalysisObjectPtr& ao, analysisObjects()) {
-        if (ao->path() == histoPath(name)) return dynamic_pointer_cast<AO>(ao);
+        if (ao->path() == histoPath(name)) return dynamic_cast<AOPtr&>(ao);
       }
       throw Exception("Data object " + histoPath(name) + " not found");
     }
@@ -775,22 +775,22 @@
 


More information about the Rivet-svn mailing list