18 : m_cacheHint(CACHE_HINT_AUTO_DETECT),
19 m_readHint(READ_HINT_AUTO),
22 m_temppath(
".:$TMPDIR"),
61 <<
"Considering path '" <<
s 62 <<
"', min free space " << minFreeSpace
63 <<
"GB for temp dir" << std::endl;
67 std::vector<std::string>
dirs;
71 size_t end =
s.find(
':', begin);
72 if (end == std::string::npos) {
73 dirs.push_back(
s.substr(begin, end));
76 dirs.push_back(
s.substr(begin, end - begin));
87 <<
"Using '" <<
m_tempdir <<
"' for temp dir" 101 return itFound->second.get();
110 return insertResult.first->second.get();
114 size_t p =
url.find(
':');
115 if (
p != std::string::npos) {
129 std::unique_ptr<Storage>
ret;
130 std::unique_ptr<StorageAccount::Stamp>
stats;
137 if (
auto storage = maker->open(
139 if (dynamic_cast<LocalCacheFile *>(storage.get()))
151 err.addContext(
"Calling StorageFactory::open()");
152 err.addAdditionalInfo(
err.message());
154 err <<
"Failed to open the file '" <<
url <<
"'";
165 std::unique_ptr<StorageAccount::Stamp>
stats;
177 edm::LogWarning(
"StorageFactory::stagein()") <<
"Failed to stage in file '" <<
url <<
"' because:\n" 178 <<
err.explainSelf();
188 std::unique_ptr<StorageAccount::Stamp>
stats;
201 <<
"Existence or size check for the file '" <<
url <<
"' failed because:\n" 202 <<
err.explainSelf();
223 s = std::make_unique<StorageAccountProxy>(proto,
std::move(
s));
StorageMaker * getMaker(const std::string &proto) const
bool isLocalPath(const std::string &path) const
static StorageClassToken tokenForStorageClassName(std::string const &iName)
unsigned int timeout(void) const
static PluginManager & configure(const Config &)
void setReadHint(ReadHint value)
bool check(const std::string &url, IOOffset *size=nullptr) const
static PFTauRenderPlugin instance
ret
prodAgent to be discontinued
double tempMinFree(void) const
AuxSettings & setTimeout(unsigned int iTime)
static Counter & counter(StorageClassToken token, Operation operation)
unsigned int m_debugLevel
void setTimeout(unsigned int timeout)
ReadHint readHint(void) const
static bool isAvailable()
void setTempDir(const std::string &s, double minFreeSpace)
bool accounting(void) const
CacheHint cacheHint(void) const
Container::value_type value_type
std::unique_ptr< Storage > open(const std::string &url, int mode=IOFlags::OpenRead) const
bool enableAccounting(bool enabled)
PluginManager::Config config()
static StorageFactory s_instance
std::string m_unusableDirWarnings
std::string tempDir(void) const
void setCacheHint(CacheHint value)
void stagein(const std::string &url) const
static StorageFactory * getToModify(void)
void setDebugLevel(unsigned int level)
AuxSettings & setDebugLevel(unsigned int iLevel)
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
Log< level::Warning, false > LogWarning
std::string tempPath(void) const
std::pair< std::string, std::string > findCachePath(const std::vector< std::string > &paths, double minFreeSpace) const
static const StorageFactory * get(void)
unsigned int debugLevel(void) const