#include <Utilities/StorageFactory/interface/StorageMaker.h>
Public Member Functions | |
virtual bool | check (const std::string &proto, const std::string &path, IOOffset *size=0) |
virtual Storage * | open (const std::string &proto, const std::string &path, int mode, const std::string &tmpdir)=0 |
virtual void | stagein (const std::string &proto, const std::string &path) |
virtual | ~StorageMaker (void) |
Definition at line 8 of file StorageMaker.h.
StorageMaker::~StorageMaker | ( | void | ) | [virtual] |
bool StorageMaker::check | ( | const std::string & | proto, | |
const std::string & | path, | |||
IOOffset * | size = 0 | |||
) | [virtual] |
Reimplemented in DCacheStorageMaker, RFIOStorageMaker, LocalStorageMaker, StormLcgGtStorageMaker, StormStorageMaker, and XrdStorageMaker.
Definition at line 16 of file StorageMaker.cc.
References mode, open(), IOFlags::OpenRead, IOFlags::OpenUnbuffered, and s.
00019 { 00020 // Fallback method is to open the file and check its 00021 // size. Because grid jobs run in a directory where 00022 // there is usually more space than in /tmp, and that 00023 // directory is automatically cleaned up, open up the 00024 // temporary files in the current directory. If the 00025 // file is downloaded, it will delete itself in the 00026 // destructor or close method. 00027 bool found = false; 00028 int mode = IOFlags::OpenRead | IOFlags::OpenUnbuffered; 00029 if (Storage *s = open (proto, path, mode, ".")) 00030 { 00031 if (size) 00032 *size = s->size (); 00033 00034 s->close (); 00035 delete s; 00036 00037 found = true; 00038 } 00039 00040 return found; 00041 }
virtual Storage* StorageMaker::open | ( | const std::string & | proto, | |
const std::string & | path, | |||
int | mode, | |||
const std::string & | tmpdir | |||
) | [pure virtual] |
Implemented in DCacheStorageMaker, RFIOStorageMaker, GsiFTPStorageMaker, HttpStorageMaker, LocalStorageMaker, StormLcgGtStorageMaker, StormStorageMaker, and XrdStorageMaker.
Referenced by check().
void StorageMaker::stagein | ( | const std::string & | proto, | |
const std::string & | path | |||
) | [virtual] |
Reimplemented in DCacheStorageMaker, and RFIOStorageMaker.
Definition at line 11 of file StorageMaker.cc.