Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:18:31

0001 #ifndef PODIO_UTILITIES_BACKENDLIBRARYLOADER_H
0002 #define PODIO_UTILITIES_BACKENDLIBRARYLOADER_H
0003 
0004 #include <map>
0005 #include <string>
0006 #include <tuple>
0007 #include <vector>
0008 
0009 namespace podio {
0010 namespace utilities {
0011 
0012   class BackendLibraryLoader {
0013   public:
0014     enum class LoadStatus : short { Success = 0, AlreadyLoaded = 1, Error = 2 };
0015 
0016     BackendLibraryLoader(std::string envVarName, std::string libraryPattern, std::string logDesignator);
0017     ~BackendLibraryLoader() = default;
0018 
0019   private:
0020     LoadStatus loadLib(const std::string& libname, const std::string& directory);
0021     std::vector<std::tuple<std::string, std::string>> getLibNames() const;
0022 
0023     std::string m_envVarName;
0024     std::string m_libraryPattern;
0025     std::string m_logDesignator;
0026     std::map<std::string, void*> m_loadedLibs{};
0027   };
0028 
0029 } // namespace utilities
0030 } // namespace podio
0031 
0032 #endif // PODIO_UTILITIES_BACKENDLIBRARYLOADER_H