LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
FileTransfer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Services_FileServiceInterfaces_FileTransfer_h
2 #define art_Framework_Services_FileServiceInterfaces_FileTransfer_h
3 // vim: set sw=2 expandtab :
4 
5 // ====================================================================
6 // FileTransfer
7 //
8 // Abstract base class for services that return a fully qualified name
9 // of a file that has been copied into local scratch, when given a URI
10 // specifying a desired file. We have in mind that
11 // GeneralFileTransfer will inherit from this interface class.
12 // ====================================================================
13 
15 
16 #include <string>
17 
18 namespace art {
19 
20  class FileTransfer {
21  public:
22  virtual ~FileTransfer() noexcept = default;
23  int translateToLocalFilename(std::string const& uri,
24  std::string& fileFQname);
25 
26  private:
27  virtual int doTranslateToLocalFilename(std::string const& uri,
28  std::string& fileFQname) = 0;
29  };
30 
31  inline int
33  std::string& fileFQname)
34  {
35  return doTranslateToLocalFilename(uri, fileFQname);
36  }
37 
38 } // namespace art
39 
41 
42 #endif /* art_Framework_Services_FileServiceInterfaces_FileTransfer_h */
43 
44 // Local Variables:
45 // mode: c++
46 // End:
virtual int doTranslateToLocalFilename(std::string const &uri, std::string &fileFQname)=0
virtual ~FileTransfer() noexcept=default
int translateToLocalFilename(std::string const &uri, std::string &fileFQname)
Definition: FileTransfer.h:32
Definition: MVAAlg.h:12
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)