CMS 3D CMS Logo

HttpStorageMaker.cc
Go to the documentation of this file.
5 
7 {
8 public:
9  virtual std::unique_ptr<Storage> open (const std::string &proto,
10  const std::string &path,
11  int mode,
12  const AuxSettings&) const override
13  {
16  int localfd = RemoteFile::local (f->tempDir(), temp);
17  std::string newurl ((proto == "web" ? "http" : proto) + ":" + path);
18  const char *curlopts [] = {
19  "curl", "-L", "-f", "-o", temp.c_str(), "-q", "-s", "--url",
20  newurl.c_str (), 0
21  };
22 
23  return RemoteFile::get (localfd, temp, (char **) curlopts, mode);
24  }
25 };
26 
static std::unique_ptr< Storage > get(int localfd, const std::string &name, char **cmd, int mode)
Definition: RemoteFile.cc:90
static int local(const std::string &tmpdir, std::string &temp)
Definition: RemoteFile.cc:55
static const StorageFactory * get(void)
std::string tempDir(void) const
double f[11][100]
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
#define DEFINE_EDM_PLUGIN(factory, type, name)