Public Member Functions | |
virtual Storage * | open (const std::string &proto, const std::string &path, int mode) |
Definition at line 6 of file HttpStorageMaker.cc.
virtual Storage* HttpStorageMaker::open | ( | const std::string & | proto, |
const std::string & | path, | ||
int | mode | ||
) | [inline, virtual] |
Implements StorageMaker.
Definition at line 9 of file HttpStorageMaker.cc.
References f, reco::get(), RemoteFile::local(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, and StorageFactory::tempDir().
{ std::string temp; StorageFactory *f = StorageFactory::get(); int localfd = RemoteFile::local (f->tempDir(), temp); std::string newurl ((proto == "web" ? "https" : proto) + ":" + path); const char *curlopts [] = { "curl", "-L", "-f", "-o", temp.c_str(), "-q", "-s", "--url", newurl.c_str (), 0 }; return RemoteFile::get (localfd, temp, (char **) curlopts, mode); }