CMS 3D CMS Logo

Public Member Functions

GsiFTPStorageMaker Class Reference

Inheritance diagram for GsiFTPStorageMaker:
StorageMaker

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 6 of file GsiFTPStorageMaker.cc.


Member Function Documentation

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

Implements StorageMaker.

Definition at line 9 of file GsiFTPStorageMaker.cc.

References f, reco::get(), RemoteFile::local(), groupFilesInBlocks::temp, and StorageFactory::tempDir().

  {
    std::string    temp;
    StorageFactory *f = StorageFactory::get();
    int            localfd = RemoteFile::local (f->tempDir(), temp);
    std::string    lurl = "file://" + temp;
    std::string    newurl ((proto == "sfn" ? "gsiftp" : proto) + ":" + path);
    const char     *ftpopts [] = { "globus-url-copy", newurl.c_str (), lurl.c_str (), 0 };
    return RemoteFile::get (localfd, temp, (char **) ftpopts, mode);
  }