#include <StorageFactory.h>
Public Types | |
enum | CacheHint { CACHE_HINT_APPLICATION, CACHE_HINT_STORAGE, CACHE_HINT_LAZY_DOWNLOAD, CACHE_HINT_AUTO_DETECT } |
enum | ReadHint { READ_HINT_UNBUFFERED, READ_HINT_READAHEAD, READ_HINT_AUTO } |
Public Member Functions | |
bool | accounting (void) const |
void | activateTimeout (const std::string &url) |
CacheHint | cacheHint (void) const |
bool | check (const std::string &url, IOOffset *size=0) |
unsigned int | debugLevel (void) const |
bool | enableAccounting (bool enabled) |
Storage * | open (const std::string &url, int mode=IOFlags::OpenRead) |
ReadHint | readHint (void) const |
void | setCacheHint (CacheHint value) |
void | setDebugLevel (unsigned int level) |
void | setReadHint (ReadHint value) |
void | setTempDir (const std::string &s, double minFreeSpace) |
void | setTimeout (unsigned int timeout) |
void | stagein (const std::string &url) |
std::string | tempDir (void) const |
double | tempMinFree (void) const |
std::string | tempPath (void) const |
unsigned int | timeout (void) const |
Storage * | wrapNonLocalFile (Storage *s, const std::string &proto, const std::string &path, int mode) |
~StorageFactory (void) | |
Static Public Member Functions | |
static StorageFactory * | get (void) |
Private Types | |
typedef tbb::concurrent_unordered_map < std::string, std::shared_ptr < StorageMaker > > | MakerTable |
Private Member Functions | |
StorageMaker * | getMaker (const std::string &proto) |
StorageMaker * | getMaker (const std::string &url, std::string &protocol, std::string &rest) |
StorageFactory (void) | |
Private Attributes | |
bool | m_accounting |
CacheHint | m_cacheHint |
unsigned int | m_debugLevel |
LocalFileSystem | m_lfs |
MakerTable | m_makers |
ReadHint | m_readHint |
std::string | m_tempdir |
double | m_tempfree |
std::string | m_temppath |
unsigned int | m_timeout |
Static Private Attributes | |
static StorageFactory | s_instance |
Definition at line 13 of file StorageFactory.h.
|
private |
Definition at line 70 of file StorageFactory.h.
Enumerator | |
---|---|
CACHE_HINT_APPLICATION | |
CACHE_HINT_STORAGE | |
CACHE_HINT_LAZY_DOWNLOAD | |
CACHE_HINT_AUTO_DETECT |
Definition at line 16 of file StorageFactory.h.
Enumerator | |
---|---|
READ_HINT_UNBUFFERED | |
READ_HINT_READAHEAD | |
READ_HINT_AUTO |
Definition at line 24 of file StorageFactory.h.
StorageFactory::~StorageFactory | ( | void | ) |
Definition at line 26 of file StorageFactory.cc.
|
private |
Definition at line 14 of file StorageFactory.cc.
References m_tempfree, m_temppath, and setTempDir().
bool StorageFactory::accounting | ( | void | ) | const |
Definition at line 43 of file StorageFactory.cc.
References m_accounting.
Referenced by wrapNonLocalFile().
void StorageFactory::activateTimeout | ( | const std::string & | url | ) |
Definition at line 292 of file StorageFactory.cc.
References getMaker(), m_timeout, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by edm::RootInputFileSequence::initFile(), and edm::RootInputFileSequence::RootInputFileSequence().
StorageFactory::CacheHint StorageFactory::cacheHint | ( | void | ) | const |
Definition at line 51 of file StorageFactory.cc.
References m_cacheHint.
Referenced by LocalStorageMaker::open(), DCacheStorageMaker::open(), XrdStorageMaker::open(), StormStorageMaker::open(), StormLcgGtStorageMaker::open(), RFIOStorageMaker::open(), TStorageFactoryFile::ReadBufferAsync(), and wrapNonLocalFile().
bool StorageFactory::check | ( | const std::string & | url, |
IOOffset * | size = 0 |
||
) |
Definition at line 233 of file StorageFactory.cc.
References StorageAccount::counter(), cms::Exception::explainSelf(), getMaker(), m_accounting, run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by TStorageFactorySystem::AccessPathName().
unsigned int StorageFactory::debugLevel | ( | void | ) | const |
bool StorageFactory::enableAccounting | ( | bool | enabled | ) |
Definition at line 35 of file StorageFactory.cc.
References m_accounting.
Referenced by PixelSLinkDataInputSource::PixelSLinkDataInputSource(), and TFileAdaptor::TFileAdaptor().
|
static |
Definition at line 31 of file StorageFactory.cc.
References s_instance.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), TStorageFactorySystem::AccessPathName(), lhef::LHEReader::FileSource::FileSource(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), TStorageFactorySystem::GetPathInfo(), betterConfigParser.BetterConfigParser::getResultingSection(), edm::RootInputFileSequence::initFile(), TStorageFactoryFile::Initialize(), GsiFTPStorageMaker::open(), HttpStorageMaker::open(), LocalStorageMaker::open(), DCacheStorageMaker::open(), XrdStorageMaker::open(), StormStorageMaker::open(), StormLcgGtStorageMaker::open(), RFIOStorageMaker::open(), edm::StreamerInputFile::openStreamerFile(), PixelSLinkDataInputSource::PixelSLinkDataInputSource(), TStorageFactoryFile::ReadBufferAsync(), edm::RootInputFileSequence::RootInputFileSequence(), TStorageFactoryFile::SysOpen(), and TFileAdaptor::TFileAdaptor().
|
private |
Definition at line 131 of file StorageFactory.cc.
References edmplugin::standard::config(), edmplugin::PluginManager::configure(), reco::get(), instance, edmplugin::PluginManager::isAvailable(), and m_makers.
Referenced by activateTimeout(), check(), getMaker(), open(), and stagein().
|
private |
Definition at line 148 of file StorageFactory.cc.
References getMaker(), AlCaHLTBitMon_ParallelJobs::p, and relmon_authenticated_wget::url.
Storage * StorageFactory::open | ( | const std::string & | url, |
int | mode = IOFlags::OpenRead |
||
) |
Definition at line 168 of file StorageFactory.cc.
References cms::Exception::addAdditionalInfo(), cms::Exception::addContext(), cms::Exception::clearMessage(), StorageAccount::counter(), getMaker(), m_accounting, m_debugLevel, cms::Exception::message(), run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by lhef::LHEReader::FileSource::FileSource().
StorageFactory::ReadHint StorageFactory::readHint | ( | void | ) | const |
Definition at line 59 of file StorageFactory.cc.
References m_readHint.
Referenced by LocalStorageMaker::open(), DCacheStorageMaker::open(), XrdStorageMaker::open(), StormStorageMaker::open(), StormLcgGtStorageMaker::open(), and RFIOStorageMaker::open().
void StorageFactory::setCacheHint | ( | CacheHint | value | ) |
Definition at line 47 of file StorageFactory.cc.
References m_cacheHint, and relativeConstraints::value.
Referenced by TFileAdaptor::TFileAdaptor().
void StorageFactory::setDebugLevel | ( | unsigned int | level | ) |
Definition at line 71 of file StorageFactory.cc.
References testEve_cfg::level, and m_debugLevel.
Referenced by TFileAdaptor::TFileAdaptor().
void StorageFactory::setReadHint | ( | ReadHint | value | ) |
Definition at line 55 of file StorageFactory.cc.
References m_readHint, and relativeConstraints::value.
Referenced by TFileAdaptor::TFileAdaptor().
void StorageFactory::setTempDir | ( | const std::string & | s, |
double | minFreeSpace | ||
) |
Definition at line 79 of file StorageFactory.cc.
References begin, ecal_dqm_sourceclient-live_cfg::cerr, prof2calltree::count, heppy_check::dirs, end, LocalFileSystem::findCachePath(), m_lfs, m_tempdir, m_tempfree, m_temppath, and alignCSCRings::s.
Referenced by StorageFactory(), and TFileAdaptor::TFileAdaptor().
void StorageFactory::setTimeout | ( | unsigned int | timeout | ) |
Definition at line 63 of file StorageFactory.cc.
References m_timeout, and timeout().
Referenced by TFileAdaptor::TFileAdaptor().
void StorageFactory::stagein | ( | const std::string & | url | ) |
Definition at line 208 of file StorageFactory.cc.
References StorageAccount::counter(), cms::Exception::explainSelf(), getMaker(), m_accounting, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by edm::RootInputFileSequence::RootInputFileSequence().
std::string StorageFactory::tempDir | ( | void | ) | const |
Definition at line 119 of file StorageFactory.cc.
References m_tempdir.
Referenced by GsiFTPStorageMaker::open(), and HttpStorageMaker::open().
double StorageFactory::tempMinFree | ( | void | ) | const |
Definition at line 127 of file StorageFactory.cc.
References m_tempfree.
Referenced by TFileAdaptor::TFileAdaptor().
std::string StorageFactory::tempPath | ( | void | ) | const |
Definition at line 123 of file StorageFactory.cc.
References m_temppath.
Referenced by TFileAdaptor::TFileAdaptor().
unsigned int StorageFactory::timeout | ( | void | ) | const |
Storage * StorageFactory::wrapNonLocalFile | ( | Storage * | s, |
const std::string & | proto, | ||
const std::string & | path, | ||
int | mode | ||
) |
Definition at line 261 of file StorageFactory.cc.
References accounting(), CACHE_HINT_LAZY_DOWNLOAD, cacheHint(), LocalFileSystem::isLocalPath(), LocalFileSystem::issueWarning(), m_lfs, m_tempdir, IOFlags::OpenWrap, IOFlags::OpenWrite, and alignCSCRings::s.
Referenced by LocalStorageMaker::open(), DCacheStorageMaker::open(), XrdStorageMaker::open(), StormStorageMaker::open(), StormLcgGtStorageMaker::open(), and RFIOStorageMaker::open().
|
private |
Definition at line 81 of file StorageFactory.h.
Referenced by accounting(), check(), enableAccounting(), open(), and stagein().
|
private |
Definition at line 79 of file StorageFactory.h.
Referenced by cacheHint(), and setCacheHint().
|
private |
Definition at line 86 of file StorageFactory.h.
Referenced by debugLevel(), open(), and setDebugLevel().
|
private |
Definition at line 87 of file StorageFactory.h.
Referenced by setTempDir(), and wrapNonLocalFile().
|
private |
Definition at line 78 of file StorageFactory.h.
Referenced by getMaker().
|
private |
Definition at line 80 of file StorageFactory.h.
Referenced by readHint(), and setReadHint().
|
private |
Definition at line 84 of file StorageFactory.h.
Referenced by setTempDir(), tempDir(), and wrapNonLocalFile().
|
private |
Definition at line 82 of file StorageFactory.h.
Referenced by setTempDir(), StorageFactory(), and tempMinFree().
|
private |
Definition at line 83 of file StorageFactory.h.
Referenced by setTempDir(), StorageFactory(), and tempPath().
|
private |
Definition at line 85 of file StorageFactory.h.
Referenced by activateTimeout(), setTimeout(), and timeout().
|
staticprivate |
Definition at line 88 of file StorageFactory.h.
Referenced by get().