1 // -*- C++ -*-
2 //
3 // This file is part of YODA -- Yet more Objects for Data Analysis
4 // Copyright (C) 2008-2021 The YODA collaboration (see AUTHORS for details)
5 //
6 #ifndef YODA_READERAIDA_H
7 #define YODA_READERAIDA_H
8 
9 #include "YODA/AnalysisObject.h"
10 #include "YODA/Reader.h"
11 #include "YODA/Index.h"
12 
13 namespace YODA {
14 
15 
16   /// Persistency reader for AIDA XML format.
17   class ReaderAIDA : public Reader {
18   public:
19 
20     /// Singleton creation function
21     static Reader& create();
22 
read(std::istream & stream,std::vector<AnalysisObject * > & aos)23     void read(std::istream& stream, std::vector<AnalysisObject*>& aos) {
24       _readDoc(stream, aos);
25     }
26 
27     /// @brief Not implemented.
mkIndex(std::istream & stream)28     Index mkIndex(std::istream& stream) {
29       // Not supported
30       return Index();
31     }
32 
33   protected:
34 
35     void _readDoc(std::istream& stream, std::vector<AnalysisObject*>& aos);
36 
37   private:
38 
39     /// Private constructor, since it's a singleton.
ReaderAIDA()40     ReaderAIDA() { }
41 
42   };
43 
44 
45 }
46 
47 #endif
48