The Gaudi Framework  v33r1 (b1225454)
IFileCatalog.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIFILECATALOG_IFILECATALOG_H
12 #define GAUDIFILECATALOG_IFILECATALOG_H
13 
14 #include "GaudiKernel/IInterface.h"
15 #include <Gaudi/PluginService.h>
16 #include <string>
17 #include <utility>
18 #include <vector>
19 
20 class IMessageSvc;
21 
22 /*
23  * Gaudi namespace declaration
24  */
25 namespace Gaudi {
26 
36  class GAUDI_API IFileCatalog : virtual public IInterface {
37 
38  public:
41 
42  using Factory = Gaudi::PluginService::Factory<IInterface*( const std::string&, IMessageSvc* )>;
43 
49 
51  virtual std::string createFID() const = 0;
54  virtual const std::string& connectInfo() const = 0;
56  virtual void init() = 0;
58  virtual void commit() = 0;
60  virtual void rollback() = 0;
62  virtual bool readOnly() const = 0;
64  virtual bool dirty() const = 0;
66  virtual void getPFN( const std::string& fid, Files& files ) const = 0;
68  virtual void getLFN( const std::string& fid, Files& files ) const = 0;
70  virtual void getFID( Strings& fids ) const = 0;
72  virtual bool existsPFN( const std::string& pfn ) const = 0;
74  virtual std::string lookupPFN( const std::string& lfn ) const = 0;
76  virtual bool existsLFN( const std::string& lfn ) const = 0;
78  virtual std::string lookupLFN( const std::string& lfn ) const = 0;
80  virtual bool existsFID( const std::string& fid ) const = 0;
82  virtual void deleteFID( const std::string& FileID ) const = 0;
84  virtual void registerPFN( const std::string& fid, const std::string& pfn, const std::string& ftype ) const = 0;
86  virtual void registerLFN( const std::string& fid, const std::string& lfn ) const = 0;
88  virtual void registerFID( const std::string& fid ) const = 0;
90  virtual void renamePFN( const std::string& pfn, const std::string& new_pfn ) const = 0;
92  virtual void deletePFN( const std::string& pfn ) const = 0;
94  virtual void getMetaData( const std::string& fid, Attributes& attr ) const = 0;
96  virtual std::string getMetaDataItem( const std::string& fid, const std::string& name ) const = 0;
98  virtual void setMetaData( const std::string& fid, const std::string& name, const std::string& value ) const = 0;
100  virtual void dropMetaData( const std::string& fid ) const = 0;
102  virtual void dropMetaData( const std::string& fid, const std::string& attr ) const = 0;
103  };
104 } /* End namespace Gaudi */
105 #endif /* GAUDIFILECATALOG_IFILECATALOG_H */
std::pair< std::string, std::string > NamedItem
Public type definitions.
Definition: IFileCatalog.h:45
std::vector< NamedItem > Files
Definition: IFileCatalog.h:47
std::vector< std::string > Strings
Definition: IFileCatalog.h:48
STL class.
std::vector< NamedItem > Attributes
Definition: IFileCatalog.h:46
Definition of the basic interface.
Definition: IInterface.h:254
The IMessage is the interface implemented by the message service.
Definition: IMessageSvc.h:47
File catalog interface.
Definition: IFileCatalog.h:36
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition: IInterface.h:23
Gaudi::PluginService::Factory< IInterface *(const std::string &, IMessageSvc *)> Factory
Definition: IFileCatalog.h:42
def getMetaData(path)
(c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # # This software i...
Definition: __init__.py:11
STL class.
#define GAUDI_API
Definition: Kernel.h:81
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1