#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 |
CacheHint | cacheHint (void) const |
bool | check (const std::string &url, IOOffset *size=nullptr) const |
unsigned int | debugLevel (void) const |
bool | enableAccounting (bool enabled) |
std::unique_ptr< Storage > | open (const std::string &url, int mode=IOFlags::OpenRead) const |
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) const |
std::string | tempDir (void) const |
double | tempMinFree (void) const |
std::string | tempPath (void) const |
unsigned int | timeout (void) const |
std::unique_ptr< Storage > | wrapNonLocalFile (std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const |
~StorageFactory (void) | |
Static Public Member Functions | |
static const StorageFactory * | get (void) |
static StorageFactory * | getToModify (void) |
Private Types | |
typedef tbb::concurrent_unordered_map< std::string, std::shared_ptr< StorageMaker > > | MakerTable |
Private Member Functions | |
StorageMaker * | getMaker (const std::string &proto) const |
StorageMaker * | getMaker (const std::string &url, std::string &protocol, std::string &rest) const |
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 |
std::string | m_unusableDirWarnings |
Static Private Attributes | |
static StorageFactory | s_instance |
Definition at line 13 of file StorageFactory.h.
|
private |
Definition at line 57 of file StorageFactory.h.
Enumerator | |
---|---|
CACHE_HINT_APPLICATION | |
CACHE_HINT_STORAGE | |
CACHE_HINT_LAZY_DOWNLOAD | |
CACHE_HINT_AUTO_DETECT |
Definition at line 15 of file StorageFactory.h.
Enumerator | |
---|---|
READ_HINT_UNBUFFERED | |
READ_HINT_READAHEAD | |
READ_HINT_AUTO |
Definition at line 17 of file StorageFactory.h.
StorageFactory::~StorageFactory | ( | void | ) |
Definition at line 26 of file StorageFactory.cc.
|
private |
Definition at line 15 of file StorageFactory.cc.
References m_tempfree, m_temppath, and setTempDir().
bool StorageFactory::accounting | ( | void | ) | const |
Definition at line 38 of file StorageFactory.cc.
References m_accounting.
Referenced by wrapNonLocalFile().
StorageFactory::CacheHint StorageFactory::cacheHint | ( | void | ) | const |
Definition at line 42 of file StorageFactory.cc.
References m_cacheHint.
Referenced by wrapNonLocalFile().
bool StorageFactory::check | ( | const std::string & | url, |
IOOffset * | size = nullptr |
||
) | const |
Definition at line 181 of file StorageFactory.cc.
References StorageAccount::check, StorageAccount::counter(), submitPVResolutionJobs::err, getMaker(), m_accounting, m_debugLevel, m_timeout, mergeAndRegister::rest, runTheMatrix::ret, StorageMaker::AuxSettings::setDebugLevel(), StorageMaker::AuxSettings::setTimeout(), findQualityFiles::size, dqmMemoryStats::stats, AlCaHLTBitMon_QueryRunRegistry::string, unpackBuffers-CaloStage2::token, StorageAccount::tokenForStorageClassName(), and relmon_authenticated_wget::url.
Referenced by TStorageFactorySystem::AccessPathName(), and PixelSLinkDataInputSource::PixelSLinkDataInputSource().
unsigned int StorageFactory::debugLevel | ( | void | ) | const |
bool StorageFactory::enableAccounting | ( | bool | enabled | ) |
Definition at line 32 of file StorageFactory.cc.
References pixel_dqm_sourceclient-live_cfg::enabled, and m_accounting.
Referenced by PixelSLinkDataInputSource::PixelSLinkDataInputSource().
|
static |
Definition at line 28 of file StorageFactory.cc.
References s_instance.
Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), TStorageFactorySystem::AccessPathName(), lhef::LHEReader::FileSource::FileSource(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), TStorageFactorySystem::GetPathInfo(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), TStorageFactoryFile::Initialize(), GsiFTPStorageMaker::open(), HttpStorageMaker::open(), DavixStorageMaker::open(), LocalStorageMaker::open(), DCacheStorageMaker::open(), StormStorageMaker::open(), XrdStorageMaker::open(), StormLcgGtStorageMaker::open(), edm::StreamerInputFile::openStreamerFile(), PixelSLinkDataInputSource::PixelSLinkDataInputSource(), TStorageFactoryFile::ReadBufferAsync(), edm::RootPrimaryFileSequence::RootPrimaryFileSequence(), edm::RootSecondaryFileSequence::RootSecondaryFileSequence(), and TStorageFactoryFile::SysOpen().
|
private |
Definition at line 96 of file StorageFactory.cc.
References edmplugin::standard::config(), edmplugin::PluginManager::configure(), get, instance, edmplugin::PluginManager::isAvailable(), and m_makers.
Referenced by check(), getMaker(), open(), and stagein().
|
private |
Definition at line 111 of file StorageFactory.cc.
References getMaker(), AlCaHLTBitMon_ParallelJobs::p, mergeAndRegister::rest, and relmon_authenticated_wget::url.
|
static |
Definition at line 30 of file StorageFactory.cc.
References s_instance.
Referenced by PixelSLinkDataInputSource::PixelSLinkDataInputSource(), and TFileAdaptor::TFileAdaptor().
std::unique_ptr< Storage > StorageFactory::open | ( | const std::string & | url, |
int | mode = IOFlags::OpenRead |
||
) | const |
Definition at line 124 of file StorageFactory.cc.
References StorageAccount::counter(), submitPVResolutionJobs::err, getMaker(), m_accounting, m_debugLevel, m_timeout, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, eostools::move(), StorageAccount::open, mergeAndRegister::rest, runTheMatrix::ret, StorageMaker::AuxSettings::setDebugLevel(), StorageMaker::AuxSettings::setTimeout(), dqmMemoryStats::stats, AlCaHLTBitMon_QueryRunRegistry::string, unpackBuffers-CaloStage2::token, StorageAccount::tokenForStorageClassName(), and relmon_authenticated_wget::url.
Referenced by lhef::LHEReader::FileSource::FileSource(), edm::StreamerInputFile::openStreamerFile(), and PixelSLinkDataInputSource::PixelSLinkDataInputSource().
StorageFactory::ReadHint StorageFactory::readHint | ( | void | ) | const |
void StorageFactory::setCacheHint | ( | CacheHint | value | ) |
Definition at line 40 of file StorageFactory.cc.
References m_cacheHint, and relativeConstraints::value.
void StorageFactory::setDebugLevel | ( | unsigned int | level | ) |
Definition at line 52 of file StorageFactory.cc.
References personalPlayback::level, and m_debugLevel.
void StorageFactory::setReadHint | ( | ReadHint | value | ) |
Definition at line 44 of file StorageFactory.cc.
References m_readHint, and relativeConstraints::value.
void StorageFactory::setTempDir | ( | const std::string & | s, |
double | minFreeSpace | ||
) |
Definition at line 56 of file StorageFactory.cc.
References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, submitPVResolutionJobs::count, heppy_check::dirs, mps_fire::end, LocalFileSystem::findCachePath(), m_lfs, m_tempdir, m_tempfree, m_temppath, m_unusableDirWarnings, and alignCSCRings::s.
Referenced by StorageFactory().
void StorageFactory::setTimeout | ( | unsigned int | timeout | ) |
void StorageFactory::stagein | ( | const std::string & | url | ) | const |
Definition at line 159 of file StorageFactory.cc.
References StorageAccount::counter(), submitPVResolutionJobs::err, getMaker(), m_accounting, m_debugLevel, m_timeout, mergeAndRegister::rest, StorageMaker::AuxSettings::setDebugLevel(), StorageMaker::AuxSettings::setTimeout(), StorageAccount::stagein, dqmMemoryStats::stats, AlCaHLTBitMon_QueryRunRegistry::string, unpackBuffers-CaloStage2::token, StorageAccount::tokenForStorageClassName(), and relmon_authenticated_wget::url.
Referenced by edm::RootPrimaryFileSequence::RootPrimaryFileSequence(), and edm::RootSecondaryFileSequence::RootSecondaryFileSequence().
std::string StorageFactory::tempDir | ( | void | ) | const |
double StorageFactory::tempMinFree | ( | void | ) | const |
std::string StorageFactory::tempPath | ( | void | ) | const |
unsigned int StorageFactory::timeout | ( | void | ) | const |
std::unique_ptr< Storage > StorageFactory::wrapNonLocalFile | ( | std::unique_ptr< Storage > | s, |
const std::string & | proto, | ||
const std::string & | path, | ||
int | mode | ||
) | const |
Definition at line 207 of file StorageFactory.cc.
References accounting(), CACHE_HINT_LAZY_DOWNLOAD, cacheHint(), LocalFileSystem::isLocalPath(), m_lfs, m_tempdir, m_unusableDirWarnings, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, eostools::move(), IOFlags::OpenWrap, IOFlags::OpenWrite, castor_dqm_sourceclient_file_cfg::path, and alignCSCRings::s.
|
private |
Definition at line 66 of file StorageFactory.h.
Referenced by accounting(), check(), enableAccounting(), open(), and stagein().
|
private |
Definition at line 64 of file StorageFactory.h.
Referenced by cacheHint(), and setCacheHint().
|
private |
Definition at line 72 of file StorageFactory.h.
Referenced by check(), debugLevel(), open(), setDebugLevel(), and stagein().
|
private |
Definition at line 73 of file StorageFactory.h.
Referenced by setTempDir(), and wrapNonLocalFile().
|
mutableprivate |
Definition at line 63 of file StorageFactory.h.
Referenced by getMaker().
|
private |
Definition at line 65 of file StorageFactory.h.
Referenced by readHint(), and setReadHint().
|
private |
Definition at line 69 of file StorageFactory.h.
Referenced by setTempDir(), tempDir(), and wrapNonLocalFile().
|
private |
Definition at line 67 of file StorageFactory.h.
Referenced by setTempDir(), StorageFactory(), and tempMinFree().
|
private |
Definition at line 68 of file StorageFactory.h.
Referenced by setTempDir(), StorageFactory(), and tempPath().
|
private |
Definition at line 71 of file StorageFactory.h.
Referenced by check(), open(), setTimeout(), stagein(), and timeout().
|
private |
Definition at line 70 of file StorageFactory.h.
Referenced by setTempDir(), and wrapNonLocalFile().
|
staticprivate |
Definition at line 74 of file StorageFactory.h.
Referenced by get(), and getToModify().