|
[yoda-svn] yoda: 2 new changesetsYODA Mercurial yoda at projects.hepforge.orgFri Sep 15 23:30:02 BST 2017
details: https://yoda.hepforge.org/hg/yoda/rev/6cf85b55346c branches: changeset: 1398:6cf85b55346c user: Andy Buckley <andy at insectnation.org> date: Fri Sep 15 22:41:41 2017 +0100 description: Various tweaks; still not working properly from Python; debug printouts left in place details: https://yoda.hepforge.org/hg/yoda/rev/cfe072b08f6d branches: changeset: 1399:cfe072b08f6d user: Andy Buckley <andy at insectnation.org> date: Fri Sep 15 23:19:22 2017 +0100 description: Yay, fixed zstr hell diffs (truncated from 649 to 50 lines): --- a/ChangeLog Wed Sep 13 23:56:06 2017 +0100 +++ b/ChangeLog Fri Sep 15 23:19:22 2017 +0100 @@ -1,3 +1,7 @@ +2017-09-14 Andy Buckley <andy.buckley at cern.ch> + + * Enable compressed writing from Python. + 2017-09-13 Andy Buckley <andy.buckley at cern.ch> * Remove UNUSED macro in favour of anonymous args. --- a/include/YODA/IO.h Wed Sep 13 23:56:06 2017 +0100 +++ b/include/YODA/IO.h Fri Sep 15 23:19:22 2017 +0100 @@ -12,7 +12,7 @@ namespace YODA { - /// @name Writer functions with automatic format detection + /// @name Writer functions to files (with automatic format detection) //@{ /// Write out object @a ao to file @a filename @@ -39,7 +39,34 @@ //@} - /// @name Reader functions with automatic format detection + /// @name Writer functions to streams (with explicit format specification) + //@{ + + /// Write out object @a ao to stream @a os with format @a fmt + void write(std::ostream& os, const AnalysisObject& ao, const std::string& fmt) { + Writer& w = mkWriter(fmt); + w.write(os, ao); + } + + /// Write out a collection of objects @a objs to file @a filename. + template <typename RANGE> + void write(std::ostream& os, const RANGE& aos, const std::string& fmt) { + Writer& w = mkWriter(fmt); + w.write(os, aos); + } + + /// Write out the objects specified by start iterator @a begin and end + /// iterator @a end to file @a filename. + template <typename AOITER> + void write(std::ostream& os, const AOITER& begin, const AOITER& end, const std::string& fmt) { + Writer& w = mkWriter(fmt); + w.write(os, begin, end); + } +
More information about the yoda-svn mailing list |