[yoda-svn] r570 - in trunk: . include/YODA pyext/yoda src

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Mar 5 16:46:55 GMT 2013


Author: buckley
Date: Tue Mar  5 16:46:55 2013
New Revision: 570

Log:
Removing Plot entirely from YODA: it was an anomaly only added to make plot file generation easy, but this is now done better via StringIO (in new compare-histos/rivet-cmphistos).

Deleted:
   trunk/include/YODA/Plot.h
Modified:
   trunk/ChangeLog
   trunk/TODO
   trunk/include/YODA/Makefile.am
   trunk/include/YODA/Writer.h
   trunk/include/YODA/WriterAIDA.h
   trunk/include/YODA/WriterFLAT.h
   trunk/include/YODA/WriterYODA.h
   trunk/pyext/yoda/core.pyx
   trunk/pyext/yoda/declarations.pxd
   trunk/src/Writer.cc
   trunk/src/WriterAIDA.cc
   trunk/src/WriterFLAT.cc
   trunk/src/WriterYODA.cc

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/ChangeLog	Tue Mar  5 16:46:55 2013	(r570)
@@ -1,5 +1,9 @@
 2013-03-05  Andy Buckley  <andy.buckley at cern.ch>
 
+	* Removing Plot entirely from YODA: it was an anomaly only added
+	to make plot file generation easy, but this is now done better via
+	StringIO (in new compare-histos/rivet-cmphistos).
+
 	* Removing the Plot from Cython... and soon from YODA itself:
 	we'll do this stuff manually and less hackily.
 

Modified: trunk/TODO
==============================================================================
--- trunk/TODO	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/TODO	Tue Mar  5 16:46:55 2013	(r570)
@@ -2,13 +2,18 @@
 ==============
 
 NOW
+---
+
+* Python docstrings for Points, Dbns and Bins (AB)
 
 * Make Python interface test scripts (DM, AB)
    Test Histo2D and Scatter2D from Python
 
-* Add copy assignment to both C++ and Cython (AB)
+* Simplify Cython extension building
+   Can remove the template hack now? Package -> module since Cython is more
+   flexible than SWIG w.r.t. adding Python-only extensions.
 
-* Docstrings for Points, Dbns and Bins (AB)
+* Add copy assignment to both C++ and Cython (AB)
 
 * Add stdErr to HistoBinXD (AB)
 
@@ -18,6 +23,7 @@
 
 
 NEXT
+----
 
 * Add a Counter type (mostly a UI/persistency wrapper on Dbn1D) (AB)
    "Binning"/"axis" option on arbitrary types, particularly strings? ->
@@ -25,13 +31,14 @@
    implementation of Dbn1D/2D.
 
 * Generalise/expose Axis*D for binning of general objects, e.g. "binned histos"
-
-* "BinnedValues" type: use Axis behaviour to look up fixed values without Dbn "history".
+   "BinnedValues" type: use Axis behaviour to look up fixed values without Dbn
+   "history". Separate "bin-lookup" types with and without overflow capability.
 
 * Test negative- and mixed-weighted stat calculations, and scaling.
 
 
 AND THEN...
+-----------
 
 * Remove non-const bin access from Histos and Profiles?
    cf. David D's point re. consistency via email on 7/8/2012
@@ -57,9 +64,6 @@
 
 * Integer axis
 
-* Read Plot sections in YODA format (HH)
-   Use this in implementing the make-plots replacement.
-
 * ReaderFlat -> Scatter2D
 
 * Allow comments on ends of YODA format data lines in ReaderYODA (HH)

Modified: trunk/include/YODA/Makefile.am
==============================================================================
--- trunk/include/YODA/Makefile.am	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/include/YODA/Makefile.am	Tue Mar  5 16:46:55 2013	(r570)
@@ -5,7 +5,6 @@
     Dbn1D.h Dbn2D.h Dbn3D.h \
     Axis1D.h Bin1D.h \
     Axis2D.h Bin2D.h \
-    Plot.h \
     Histo1D.h HistoBin1D.h  \
     Histo2D.h HistoBin2D.h  \
     Profile1D.h ProfileBin1D.h \

Modified: trunk/include/YODA/Writer.h
==============================================================================
--- trunk/include/YODA/Writer.h	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/include/YODA/Writer.h	Tue Mar  5 16:46:55 2013	(r570)
@@ -7,7 +7,6 @@
 #define YODA_Writer_h
 
 #include "YODA/AnalysisObject.h"
-#include "YODA/Plot.h"
 #include "YODA/Histo1D.h"
 #include "YODA/Histo2D.h"
 #include "YODA/Profile1D.h"
@@ -134,7 +133,6 @@
     virtual void writeFooter(std::ostream& stream) = 0;
 
     /// Specific AO type writer implementations
-    virtual void writePlot(std::ostream& os, const Plot& h) = 0;
     virtual void writeHisto1D(std::ostream& os, const Histo1D& h) = 0;
     virtual void writeHisto2D(std::ostream& os, const Histo2D& h) = 0;
     virtual void writeProfile1D(std::ostream& os, const Profile1D& p) = 0;

Modified: trunk/include/YODA/WriterAIDA.h
==============================================================================
--- trunk/include/YODA/WriterAIDA.h	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/include/YODA/WriterAIDA.h	Tue Mar  5 16:46:55 2013	(r570)
@@ -38,7 +38,6 @@
     void writeHeader(std::ostream& stream);
     void writeFooter(std::ostream& stream);
 
-    void writePlot(std::ostream& stream, const Plot& p);
     void writeHisto1D(std::ostream& stream, const Histo1D& h);
     void writeHisto2D(std::ostream& stream, const Histo2D& h);
     void writeProfile1D(std::ostream& stream, const Profile1D& p);

Modified: trunk/include/YODA/WriterFLAT.h
==============================================================================
--- trunk/include/YODA/WriterFLAT.h	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/include/YODA/WriterFLAT.h	Tue Mar  5 16:46:55 2013	(r570)
@@ -38,7 +38,6 @@
     void writeHeader(std::ostream& stream);
     void writeFooter(std::ostream& stream);
 
-    void writePlot(std::ostream& stream, const Plot& p);
     void writeHisto1D(std::ostream& stream, const Histo1D& h);
     void writeHisto2D(std::ostream& stream, const Histo2D& h);
     void writeProfile1D(std::ostream& stream, const Profile1D& p);

Modified: trunk/include/YODA/WriterYODA.h
==============================================================================
--- trunk/include/YODA/WriterYODA.h	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/include/YODA/WriterYODA.h	Tue Mar  5 16:46:55 2013	(r570)
@@ -38,7 +38,6 @@
     void writeHeader(std::ostream& stream);
     void writeFooter(std::ostream& stream);
 
-    void writePlot(std::ostream& stream, const Plot& p);
     void writeHisto1D(std::ostream& stream, const Histo1D& h);
     void writeHisto2D(std::ostream& stream, const Histo2D& h);
     void writeProfile1D(std::ostream& stream, const Profile1D& p);

Modified: trunk/pyext/yoda/core.pyx
==============================================================================
--- trunk/pyext/yoda/core.pyx	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/pyext/yoda/core.pyx	Tue Mar  5 16:46:55 2013	(r570)
@@ -33,10 +33,3 @@
 include "include/HistoBin2D.pyx"
 include "include/Histo2D.pyx"
 include "include/Profile2D.pyx"
-
-# cdef class Plot(AnalysisObject):
-#     cdef inline c.Plot *_Plot(self) except NULL:
-#         return <c.Plot*> self.ptr()
-
-#     def __init__(self):
-#         util.set_owned_ptr(self, new c.Plot())

Modified: trunk/pyext/yoda/declarations.pxd
==============================================================================
--- trunk/pyext/yoda/declarations.pxd	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/pyext/yoda/declarations.pxd	Tue Mar  5 16:46:55 2013	(r570)
@@ -857,11 +857,3 @@
         void eraseBin(size_t index) except+ err
         void mergeBins(size_t, size_t) except+ err
 # Axis2D }}}
-
-
-# # Plot {{{
-# cdef extern from "YODA/Plot.h" namespace "YODA":
-#     cdef cppclass Plot(AnalysisObject):
-#         pass
-#     #Histo2D(string path, string title) except+ err
-# # Plot }}}

Modified: trunk/src/Writer.cc
==============================================================================
--- trunk/src/Writer.cc	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/src/Writer.cc	Tue Mar  5 16:46:55 2013	(r570)
@@ -45,9 +45,7 @@
 
   void Writer::writeBody(std::ostream& stream, const AnalysisObject& ao) {
     const string aotype = ao.type();
-    if (aotype == "Plot") {
-      writePlot(stream, dynamic_cast<const Plot&>(ao));
-    } else if (aotype == "Histo1D") {
+    if (aotype == "Histo1D") {
       writeHisto1D(stream, dynamic_cast<const Histo1D&>(ao));
     } else if (aotype == "Histo2D") {
       writeHisto2D(stream, dynamic_cast<const Histo2D&>(ao));

Modified: trunk/src/WriterAIDA.cc
==============================================================================
--- trunk/src/WriterAIDA.cc	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/src/WriterAIDA.cc	Tue Mar  5 16:46:55 2013	(r570)
@@ -6,7 +6,6 @@
 #include "YODA/WriterAIDA.h"
 #include "YODA/Utils/StringUtils.h"
 
-#include "YODA/Plot.h"
 #include "YODA/Histo1D.h"
 #include "YODA/Histo2D.h"
 #include "YODA/Profile1D.h"
@@ -33,11 +32,6 @@
   }
 
 
-  void WriterAIDA::writePlot(std::ostream& os, const Plot&) {
-    os << "\n<!-- PLOT WRITING TO AIDA IS UNSUPPORTED! -->\n" << endl;
-  }
-
-
   void WriterAIDA::writeHisto1D(std::ostream& os, const Histo1D& h) {
     Scatter2D tmp = mkScatter(h);
     tmp.setAnnotation("Type", "Histo1D");

Modified: trunk/src/WriterFLAT.cc
==============================================================================
--- trunk/src/WriterFLAT.cc	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/src/WriterFLAT.cc	Tue Mar  5 16:46:55 2013	(r570)
@@ -5,7 +5,6 @@
 //
 #include "YODA/WriterFLAT.h"
 
-#include "YODA/Plot.h"
 #include "YODA/Histo1D.h"
 #include "YODA/Histo2D.h"
 #include "YODA/Profile1D.h"
@@ -40,13 +39,6 @@
   }
 
 
-  void WriterFLAT::writePlot(std::ostream& os, const Plot& p) {
-    os << "# BEGIN PLOT" << "\n";
-    _writeAnnotations(os, p);
-    os << "# END PLOT" << "\n";
-  }
-
-
   void WriterFLAT::writeHisto1D(std::ostream& os, const Histo1D& h) {
     Scatter2D tmp = mkScatter(h);
     tmp.setAnnotation("Type", "Histo1D");

Modified: trunk/src/WriterYODA.cc
==============================================================================
--- trunk/src/WriterYODA.cc	Tue Mar  5 12:05:30 2013	(r569)
+++ trunk/src/WriterYODA.cc	Tue Mar  5 16:46:55 2013	(r570)
@@ -5,7 +5,6 @@
 //
 #include "YODA/WriterYODA.h"
 
-#include "YODA/Plot.h"
 #include "YODA/Histo1D.h"
 #include "YODA/Histo2D.h"
 #include "YODA/Profile1D.h"
@@ -40,14 +39,6 @@
   }
 
 
-  void WriterYODA::writePlot(std::ostream& os, const Plot& p) {
-    /// @todo Do we really want to write anything here?
-    os << "# BEGIN YODA_PLOT" << "\n";
-    _writeAnnotations(os, p);
-    os << "# END YODA_PLOT\n\n";
-  }
-
-
   void WriterYODA::writeHisto1D(std::ostream& os, const Histo1D& h) {
     ios_base::fmtflags oldflags = os.flags();
     os << scientific << showpoint << setprecision(_precision);


More information about the yoda-svn mailing list