CMS 3D CMS Logo

HttpStorageMaker Class Reference

Inheritance diagram for HttpStorageMaker:

StorageMaker

List of all members.

Public Member Functions

virtual Storageopen (const std::string &proto, const std::string &path, int mode, const std::string &tmpdir)


Detailed Description

Definition at line 5 of file HttpStorageMaker.cc.


Member Function Documentation

virtual Storage* HttpStorageMaker::open ( const std::string &  proto,
const std::string &  path,
int  mode,
const std::string &  tmpdir 
) [inline, virtual]

Implements StorageMaker.

Definition at line 8 of file HttpStorageMaker.cc.

References RemoteFile::get(), RemoteFile::local(), and pyDBSRunClass::temp.

00012   {
00013     std::string temp;
00014     int         localfd = RemoteFile::local (tmpdir, temp);
00015     std::string newurl ((proto == "web" ? "https" : proto) + ":" + path);
00016     const char  *curlopts [] = {
00017       "curl", "-L", "-f", "-o", temp.c_str(), "-q", "-s", "--url",
00018       newurl.c_str (), 0
00019     };
00020 
00021     return RemoteFile::get (localfd, temp, (char **) curlopts, mode);
00022   }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:24:48 2009 for CMSSW by  doxygen 1.5.4