LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 
4 // ====================================================================
5 // FileTransfer
6 //
7 // Abstract base class for services that return a fully qualified name
8 // of a file that has been copied into local scratch, when given a URI
9 // specifying a desired file. We have in mind that
10 // GeneralFileTransfer will inherit from this interface class.
11 // ====================================================================
12 
14 #include "cetlib/assert_only_one_thread.h"
15 
16 #include <string>
17 
18 namespace art {
19  class FileTransfer;
20 }
21 
23 public:
24  virtual ~FileTransfer() noexcept = default;
25 
26  int translateToLocalFilename(std::string const& uri, std::string& fileFQname);
27 
28 private:
29  virtual int doTranslateToLocalFilename(std::string const& uri,
30  std::string& fileFQname) = 0;
31 };
32 
33 inline int
35  std::string& fileFQname)
36 {
37  CET_ASSERT_ONLY_ONE_THREAD();
38  return doTranslateToLocalFilename(uri, fileFQname);
39 }
40 
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:34
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)
Definition: ServiceMacros.h:99
HLT enums.