LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
TrivialFileTransfer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Services_Optional_TrivialFileTransfer_h
2 #define art_Framework_Services_Optional_TrivialFileTransfer_h
3 
4 // ==========================================================================
5 // TrivialFileTransfer
6 //
7 // Class for service that return a fully qualified name of a file that
8 // has been copied into local scratch, when given a URI specifying a
9 // desired file. This inherits from the art::FileTransfer base class.
10 // Eventually, GeneralFileTransfer will replace this class; this ad-hoc
11 // concrete class is meant as an early-testing scaffold.
12 // ==========================================================================
13 
18 #include "fhiclcpp/ParameterSet.h"
19 #include <string>
20 
21 namespace art {
22  class TrivialFileTransfer;
23 }
24 
25 namespace art {
27  public:
28  // configuration
29  struct Config {
30  };
32 
33  TrivialFileTransfer(Parameters const& pset);
34 
35  private:
36  int doTranslateToLocalFilename(std::string const& uri,
37  std::string& fileFQname) override;
38 
39  int stripURI(std::string const& uri, std::string& inFileName) const;
40  int copyFile(std::ifstream& in, std::ofstream& out) const;
41  };
42 } // end of art namespace
43 
46  LEGACY)
47 #endif /* art_Framework_Services_Optional_TrivialFileTransfer_h */
48 
49 // Local Variables:
50 // mode: c++
51 // End:
int doTranslateToLocalFilename(std::string const &uri, std::string &fileFQname) override
int copyFile(std::ifstream &in, std::ofstream &out) const
ifstream in
Definition: comparison.C:7
int stripURI(std::string const &uri, std::string &inFileName) const
HLT enums.
TrivialFileTransfer(Parameters const &pset)
#define DECLARE_ART_SERVICE_INTERFACE_IMPL(svc, iface, scope)