#include <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)=0 |
virtual void | setDebugLevel (unsigned int debugLevel) |
virtual void | setTimeout (unsigned int timeout) |
virtual void | stagein (const std::string &proto, const std::string &path) |
StorageMaker (void) | |
virtual | ~StorageMaker (void) |
Definition at line 8 of file StorageMaker.h.
StorageMaker::StorageMaker | ( | void | ) |
Definition at line 6 of file StorageMaker.cc.
{}
StorageMaker::~StorageMaker | ( | void | ) | [virtual] |
Definition at line 9 of file StorageMaker.cc.
{}
bool StorageMaker::check | ( | const std::string & | proto, |
const std::string & | path, | ||
IOOffset * | size = 0 |
||
) | [virtual] |
Reimplemented in DCacheStorageMaker, LStoreStorageMaker, RFIOStorageMaker, LocalStorageMaker, StormLcgGtStorageMaker, StormStorageMaker, and XrdStorageMaker.
Definition at line 26 of file StorageMaker.cc.
References newFWLiteAna::found, mode, open(), IOFlags::OpenRead, IOFlags::OpenUnbuffered, and alignCSCRings::s.
{ // Fallback method is to open the file and check its // size. Because grid jobs run in a directory where // there is usually more space than in /tmp, and that // directory is automatically cleaned up, open up the // temporary files in the current directory. If the // file is downloaded, it will delete itself in the // destructor or close method. bool found = false; int mode = IOFlags::OpenRead | IOFlags::OpenUnbuffered; if (Storage *s = open (proto, path, mode)) { if (size) *size = s->size (); s->close (); delete s; found = true; } return found; }
virtual Storage* StorageMaker::open | ( | const std::string & | proto, |
const std::string & | path, | ||
int | mode | ||
) | [pure virtual] |
Implemented in DCacheStorageMaker, LStoreStorageMaker, RFIOStorageMaker, GsiFTPStorageMaker, HttpStorageMaker, LocalStorageMaker, StormLcgGtStorageMaker, StormStorageMaker, and XrdStorageMaker.
Referenced by check().
void StorageMaker::setDebugLevel | ( | unsigned int | debugLevel | ) | [virtual] |
void StorageMaker::setTimeout | ( | unsigned int | timeout | ) | [virtual] |
void StorageMaker::stagein | ( | const std::string & | proto, |
const std::string & | path | ||
) | [virtual] |
Reimplemented in DCacheStorageMaker, RFIOStorageMaker, and XrdStorageMaker.
Definition at line 13 of file StorageMaker.cc.
{}