|
|
Go to the documentation of this file.
16 : m_cacheHint(CACHE_HINT_AUTO_DETECT),
17 m_readHint(READ_HINT_AUTO),
20 m_temppath(
".:$TMPDIR"),
59 <<
"Considering path '" <<
s
60 <<
"', min free space " << minFreeSpace
61 <<
"GB for temp dir" << std::endl;
65 std::vector<std::string>
dirs;
69 size_t end =
s.find(
':', begin);
70 if (
end == std::string::npos) {
71 dirs.push_back(
s.substr(begin,
end));
74 dirs.push_back(
s.substr(begin,
end - begin));
85 <<
"Using '" <<
m_tempdir <<
"' for temp dir"
99 return itFound->second.get();
108 return insertResult.first->second.get();
112 size_t p =
url.find(
':');
113 if (
p != std::string::npos) {
114 protocol =
url.substr(0,
p);
127 std::unique_ptr<Storage>
ret;
128 std::unique_ptr<StorageAccount::Stamp>
stats;
135 if (
auto storage = maker->open(
137 if (dynamic_cast<LocalCacheFile *>(storage.get()))
138 protocol =
"local-cache";
141 ret = std::make_unique<StorageAccountProxy>(protocol,
std::move(storage));
149 err.addContext(
"Calling StorageFactory::open()");
150 err.addAdditionalInfo(
err.message());
152 err <<
"Failed to open the file '" <<
url <<
"'";
163 std::unique_ptr<StorageAccount::Stamp>
stats;
175 edm::LogWarning(
"StorageFactory::stagein()") <<
"Failed to stage in file '" <<
url <<
"' because:\n"
176 <<
err.explainSelf();
186 std::unique_ptr<StorageAccount::Stamp>
stats;
199 <<
"Existence or size check for the file '" <<
url <<
"' failed because:\n"
200 <<
err.explainSelf();
221 s = std::make_unique<StorageAccountProxy>(proto,
std::move(
s));
ret
prodAgent to be discontinued
void setCacheHint(CacheHint value)
std::string tempDir(void) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
std::unique_ptr< Storage > open(const std::string &url, int mode=IOFlags::OpenRead) const
AuxSettings & setTimeout(unsigned int iTime)
Log< level::Warning, false > LogWarning
static StorageFactory * getToModify(void)
std::string tempPath(void) const
void setReadHint(ReadHint value)
bool accounting(void) const
std::pair< std::string, std::string > findCachePath(const std::vector< std::string > &paths, double minFreeSpace) const
void setDebugLevel(unsigned int level)
static const StorageFactory * get(void)
void stagein(const std::string &url) const
unsigned int m_debugLevel
ReadHint readHint(void) const
static StorageFactory s_instance
static PluginManager & configure(const Config &)
bool check(const std::string &url, IOOffset *size=nullptr) const
unsigned int debugLevel(void) const
static StorageClassToken tokenForStorageClassName(std::string const &iName)
AuxSettings & setDebugLevel(unsigned int iLevel)
PluginManager::Config config()
Container::value_type value_type
static PFTauRenderPlugin instance
StorageMaker * getMaker(const std::string &proto) const
CacheHint cacheHint(void) const
void setTimeout(unsigned int timeout)
double tempMinFree(void) const
static Counter & counter(StorageClassToken token, Operation operation)
bool enableAccounting(bool enabled)
bool isLocalPath(const std::string &path) const
unsigned int timeout(void) const
static bool isAvailable()
void setTempDir(const std::string &s, double minFreeSpace)
std::string m_unusableDirWarnings