[yoda-svn] yoda: 4 new changesets

YODA Mercurial yoda at projects.hepforge.org
Thu Dec 10 23:15:01 GMT 2015


details:   https://yoda.hepforge.org/hg/yoda/rev/268f0bdbd2b0
branches:  
changeset: 1184:268f0bdbd2b0
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Dec 10 22:00:38 2015 +0000
description:
Improve sortedvector to insert new elements into the sorted position, rather than resorting the whole vector. This should be a bit more efficient, but I think the asymptotic complexity is the same. Might help a bit with reading big data files. Also improve sortedvector unit test

details:   https://yoda.hepforge.org/hg/yoda/rev/608da219379e
branches:  
changeset: 1185:608da219379e
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Dec 10 23:05:08 2015 +0000
description:
Fix Counter::numEntries to return an unsigned long rather than double.

details:   https://yoda.hepforge.org/hg/yoda/rev/bd8001829663
branches:  
changeset: 1186:bd8001829663
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Dec 10 23:07:59 2015 +0000
description:
Add missing addBins() operators (only in C++ so far) to Histo and Profile classes.

details:   https://yoda.hepforge.org/hg/yoda/rev/2476e129fa64
branches:  
changeset: 1187:2476e129fa64
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Dec 10 23:08:24 2015 +0000
description:
Improve ReaderYODA to use temporary bin containers, to minimise calling sort when adding bins to histos. A quick test suggests this has sped up big file reading by a factor of 30 or so!!! It was worth the ugliness...

diffs (truncated from 280 to 50 lines):

--- a/ChangeLog	Fri Dec 04 16:54:25 2015 +0000
+++ b/ChangeLog	Thu Dec 10 23:08:24 2015 +0000
@@ -1,3 +1,19 @@
+2015-12-10  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Improve ReaderYODA to use temporary bin containers, to minimise
+	calling sort when adding bins to histos. A quick test suggests
+	this has sped up big file reading by a factor of 30 or so!!!
+
+	* Add missing addBins() operators (only in C++ so far) to Histo
+	and Profile classes.
+
+	* Fix Counter::numEntries to return an unsigned long rather than double.
+
+	* Improve sortedvector to insert new elements into the sorted
+	position, rather than resorting the whole vector. This should be a
+	bit more efficient, but I think the asymptotic complexity is the
+	same. Might help a bit with reading big data files.
+
 2015-12-04  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Add yoda.HAS_ROOT_SUPPORT flag, for API user convenience.
--- a/include/YODA/Counter.h	Fri Dec 04 16:54:25 2015 +0000
+++ b/include/YODA/Counter.h	Thu Dec 10 23:08:24 2015 +0000
@@ -111,7 +111,7 @@
     //@{
 
     /// Get the number of fills
-    double numEntries() const { return _dbn.numEntries(); }
+    unsigned long numEntries() const { return _dbn.numEntries(); }
 
     /// Get the effective number of fills
     double effNumEntries() const { return _dbn.effNumEntries(); }
--- a/include/YODA/Histo1D.h	Fri Dec 04 16:54:25 2015 +0000
+++ b/include/YODA/Histo1D.h	Thu Dec 10 23:08:24 2015 +0000
@@ -246,6 +246,13 @@
     /// Add a new bin, perhaps already populated: CAREFUL!
     void addBin(const HistoBin1D& b) { _axis.addBin(b); }
 
+    /// @brief Bins addition operator
+    ///
+    /// Add multiple bins without resetting
+    void addBins(const Bins& bins) {
+      _axis.addBins(bins);
+    }
+
     /// Remove a bin
     void eraseBin(size_t index) { _axis.eraseBin(index); }
 
--- a/include/YODA/Profile1D.h	Fri Dec 04 16:54:25 2015 +0000


More information about the yoda-svn mailing list