[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed Jun 15 12:30:01 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/12ad157d35c4
branches:  
changeset: 5259:12ad157d35c4
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jun 15 12:14:04 2016 +0100
description:
Oops, fix typo

details:   https://rivet.hepforge.org/hg/rivet/rev/150a9e0621fd
branches:  
changeset: 5260:150a9e0621fd
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jun 15 12:14:18 2016 +0100
description:
Use default ctor macro in EXAMPLE

details:   https://rivet.hepforge.org/hg/rivet/rev/69020e07fdc4
branches:  
changeset: 5261:69020e07fdc4
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Jun 15 12:15:33 2016 +0100
description:
Use default ctor macro in other EXAMPLE* analyses

diffs (truncated from 83 to 50 lines):

--- a/include/Rivet/ProjectionApplier.hh	Wed Jun 15 00:17:39 2016 +0100
+++ b/include/Rivet/ProjectionApplier.hh	Wed Jun 15 12:15:33 2016 +0100
@@ -144,15 +144,17 @@
       const PROJ& rtn = dynamic_cast<const PROJ&>(reg);
       return rtn;
     }
+
+    /// @brief Register a contained projection (user-facing version)
+    /// @todo Add SFINAE to require that PROJ inherit from Projection
+    template <typename PROJ>
+    const PROJ& declare(const PROJ& proj, const std::string& name) { return declareProjection(proj, name); }
+
     /// @brief Register a contained projection (user-facing version)
     /// @deprecated Use declareProjection() or declare()
     /// @todo Add SFINAE to require that PROJ inherit from Projection
     template <typename PROJ>
-    const PROJ& addProjection(const PROJ& proj, const std::string& name) { return addProjection(proj, name); }
-    /// @brief Register a contained projection (user-facing version)
-    /// @todo Add SFINAE to require that PROJ inherit from Projection
-    template <typename PROJ>
-    const PROJ& declare(const PROJ& proj, const std::string& name) { return addProjection(proj, name); }
+    const PROJ& addProjection(const PROJ& proj, const std::string& name) { return declareProjection(proj, name); }
 
 
     /// Untemplated function to do the work...
--- a/src/Analyses/EXAMPLE.cc	Wed Jun 15 00:17:39 2016 +0100
+++ b/src/Analyses/EXAMPLE.cc	Wed Jun 15 12:15:33 2016 +0100
@@ -14,12 +14,7 @@
   public:
 
     /// Constructor
-    EXAMPLE()
-      : Analysis("EXAMPLE")
-    {
-      // No counters etc. to initialise, hence nothing to do here!
-    }
-
+    DEFAULT_RIVET_ANALYSIS_CTOR(EXAMPLE);
 
     /// @name Analysis methods
     //@{
@@ -27,9 +22,13 @@
     /// Set up projections and book histograms
     void init() {
       // Projections
+      MSG_TRACE(0);
       const FinalState cnfs(Cuts::abseta < 4 && Cuts::pT > 500*MeV);
+      MSG_TRACE(1);
       const ChargedFinalState cfs(cnfs);
+      MSG_TRACE(2);


More information about the Rivet-svn mailing list