Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:33:44

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_READERFLAT_H
0007 #define YODA_READERFLAT_H
0008 
0009 #include "YODA/Reader.h"
0010 
0011 namespace YODA {
0012 
0013 
0014   /// Persistency reader from YODA flat text data format.
0015   class ReaderFLAT : public Reader {
0016   public:
0017 
0018     /// Singleton creation function
0019     static Reader& create();
0020 
0021     /// Disable copy and move constructors
0022     ReaderFLAT(const ReaderFLAT&) = delete;
0023     ReaderFLAT(ReaderFLAT&&) = delete;
0024 
0025     /// Disable copy and move assignments
0026     void operator=(const ReaderFLAT&) = delete;
0027     void operator=(ReaderFLAT&&) = delete;
0028 
0029     void read(std::istream& stream, std::vector<AnalysisObject*>& aos,
0030                                     const std::string& match = "",
0031                                     const std::string& unmatch = "");
0032 
0033   private:
0034 
0035     // Suppress H5 read method
0036     #ifdef HAVE_HDF5
0037     void read(const YODA_H5::File&, std::vector<AnalysisObject*>&,
0038               const std::string& = "", const std::string& = "") { };
0039     #endif
0040 
0041     /// Private constructor, since it's a singleton.
0042     ReaderFLAT() { }
0043 
0044     /// Helper function to load most common types
0045     void registerDefaultTypes();
0046 
0047   };
0048 
0049 }
0050 
0051 #endif