Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/YODA/WriterYODA1.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // -*- C++ -*-
0002 //
0003 // This file is part of YODA -- Yet more Objects for Data Analysis
0004 // Copyright (C) 2008-2025 The YODA collaboration (see AUTHORS for details)
0005 //
0006 #ifndef YODA_WRITERYODA1_H
0007 #define YODA_WRITERYODA1_H
0008 
0009 #include "YODA/AnalysisObject.h"
0010 #include "YODA/Counter.h"
0011 #include "YODA/Histo.h"
0012 #include "YODA/Profile.h"
0013 #include "YODA/Scatter.h"
0014 #include "YODA/Writer.h"
0015 
0016 namespace YODA {
0017 
0018 
0019   /// Legacy persistency writer for YODA1-style flat text format.
0020   class [[deprecated]] WriterYODA1 : public Writer {
0021   public:
0022 
0023     /// Singleton creation function
0024     static Writer& create();
0025 
0026     // Include definitions of all write methods (all fulfilled by Writer::write(...))
0027     #include "YODA/WriterMethods.icc"
0028 
0029 
0030   protected:
0031 
0032     void writeAO(std::ostream& stream, const AnalysisObject& ao);
0033 
0034     void writeCounter(std::ostream& stream, const Counter& c);
0035     void writeHisto1D(std::ostream& stream, const Histo1D& h);
0036     void writeHisto2D(std::ostream& stream, const Histo2D& h);
0037     void writeProfile1D(std::ostream& stream, const Profile1D& p);
0038     void writeProfile2D(std::ostream& stream, const Profile2D& p);
0039     void writeScatter1D(std::ostream& stream, const Scatter1D& s);
0040     void writeScatter2D(std::ostream& stream, const Scatter2D& s);
0041     void writeScatter3D(std::ostream& stream, const Scatter3D& s);
0042 
0043 
0044   private:
0045 
0046     #ifdef HAVE_HDF5
0047     void writeAOS(YODA_H5::File&, const vector<const AnalysisObject*>&) { };
0048     #endif
0049 
0050     void _writeAnnotations(std::ostream& os, const AnalysisObject& ao);
0051 
0052     /// Private since it's a singleton.
0053     WriterYODA1() { }
0054 
0055   };
0056 
0057 
0058 }
0059 
0060 #endif