File indexing completed on 2025-01-18 09:57:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIFILECATALOG_IFILECATALOG_H
0012 #define GAUDIFILECATALOG_IFILECATALOG_H
0013
0014 #include "GaudiKernel/IInterface.h"
0015 #include <Gaudi/PluginService.h>
0016 #include <string>
0017 #include <utility>
0018 #include <vector>
0019
0020 class IMessageSvc;
0021
0022
0023
0024
0025 namespace Gaudi {
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class GAUDI_API IFileCatalog : virtual public IInterface {
0037
0038 public:
0039
0040 DeclareInterfaceID( IFileCatalog, 2, 0 );
0041
0042 using Factory = Gaudi::PluginService::Factory<IInterface*( const std::string&, IMessageSvc* )>;
0043
0044
0045 typedef std::pair<std::string, std::string> NamedItem;
0046 typedef std::vector<NamedItem> Attributes;
0047 typedef std::vector<NamedItem> Files;
0048 typedef std::vector<std::string> Strings;
0049
0050
0051
0052 virtual std::string createFID() const = 0;
0053
0054 virtual const std::string& connectInfo() const = 0;
0055
0056 virtual void init() = 0;
0057
0058 virtual void commit() = 0;
0059
0060 virtual void rollback() = 0;
0061
0062 virtual bool readOnly() const = 0;
0063
0064 virtual bool dirty() const = 0;
0065
0066 virtual void getPFN( const std::string& fid, Files& files ) const = 0;
0067
0068 virtual void getLFN( const std::string& fid, Files& files ) const = 0;
0069
0070 virtual void getFID( Strings& fids ) const = 0;
0071
0072 virtual bool existsPFN( const std::string& pfn ) const = 0;
0073
0074 virtual std::string lookupPFN( const std::string& lfn ) const = 0;
0075
0076 virtual bool existsLFN( const std::string& lfn ) const = 0;
0077
0078 virtual std::string lookupLFN( const std::string& lfn ) const = 0;
0079
0080 virtual bool existsFID( const std::string& fid ) const = 0;
0081
0082 virtual void deleteFID( const std::string& FileID ) const = 0;
0083
0084 virtual void registerPFN( const std::string& fid, const std::string& pfn, const std::string& ftype ) const = 0;
0085
0086 virtual void registerLFN( const std::string& fid, const std::string& lfn ) const = 0;
0087
0088 virtual void registerFID( const std::string& fid ) const = 0;
0089
0090 virtual void renamePFN( const std::string& pfn, const std::string& new_pfn ) const = 0;
0091
0092 virtual void deletePFN( const std::string& pfn ) const = 0;
0093
0094 virtual void getMetaData( const std::string& fid, Attributes& attr ) const = 0;
0095
0096 virtual std::string getMetaDataItem( const std::string& fid, const std::string& name ) const = 0;
0097
0098 virtual void setMetaData( const std::string& fid, const std::string& name, const std::string& value ) const = 0;
0099
0100 virtual void dropMetaData( const std::string& fid ) const = 0;
0101
0102 virtual void dropMetaData( const std::string& fid, const std::string& attr ) const = 0;
0103 };
0104 }
0105 #endif