FileServiceProxy.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Sources_detail_FileServiceProxy_h
2 #define art_Framework_IO_Sources_detail_FileServiceProxy_h
3 
9 
10 #include <string>
11 #include <vector>
12 
13 namespace art::detail {
14  class FileServiceProxy;
15 }
16 
18 public:
19  explicit FileServiceProxy(std::vector<std::string>&& fileNames,
20  size_t attempts = 5,
21  double waitBetweenAttempts = 5.0);
23 
24  std::string next();
25  void finish();
26 
27 private:
30 
33  struct FileEntity {
34  explicit FileEntity(size_t const attempts) noexcept
35  : attemptsRemaining{attempts}
36  {}
42  } currentItem_;
43  size_t const attemptsPerPhase_;
44  double const waitBetweenAttempts_;
45 };
46 
47 inline std::string
49 {
50  finish();
51  return obtainURI_();
52 }
53 
54 #endif /* art_Framework_IO_Sources_detail_FileServiceProxy_h */
55 
56 // Local Variables:
57 // mode: c++
58 // End:
FileEntity(size_t const attempts) noexcept
std::string string
Definition: nybbler.cc:12
FileServiceProxy(std::vector< std::string > &&fileNames, size_t attempts=5, double waitBetweenAttempts=5.0)
ServiceHandle< FileTransfer > ft_
struct art::detail::FileServiceProxy::FileEntity currentItem_
ServiceHandle< CatalogInterface > ci_