|
|
Go to the documentation of this file.
14 : m_cacheHint(CACHE_HINT_AUTO_DETECT),
15 m_readHint(READ_HINT_AUTO),
18 m_temppath(
".:$TMPDIR"),
57 <<
"Considering path '" <<
s
58 <<
"', min free space " << minFreeSpace
59 <<
"GB for temp dir" << std::endl;
63 std::vector<std::string>
dirs;
68 if (
end == std::string::npos) {
83 <<
"Using '" <<
m_tempdir <<
"' for temp dir"
97 return itFound->second.get();
106 return insertResult.first->second.get();
110 size_t p =
url.find(
':');
111 if (
p != std::string::npos) {
112 protocol =
url.substr(0,
p);
125 std::unique_ptr<Storage>
ret;
126 std::unique_ptr<StorageAccount::Stamp>
stats;
133 if (
auto storage = maker->open(
135 if (dynamic_cast<LocalCacheFile *>(storage.get()))
136 protocol =
"local-cache";
139 ret = std::make_unique<StorageAccountProxy>(protocol,
std::move(storage));
147 err.addContext(
"Calling StorageFactory::open()");
148 err.addAdditionalInfo(
err.message());
150 err <<
"Failed to open the file '" <<
url <<
"'";
161 std::unique_ptr<StorageAccount::Stamp>
stats;
172 edm::LogWarning(
"StorageFactory::stagein()") <<
"Failed to stage in file '" <<
url <<
"' because:\n"
173 <<
err.explainSelf();
183 std::unique_ptr<StorageAccount::Stamp>
stats;
196 <<
"Existence or size check for the file '" <<
url <<
"' failed because:\n"
197 <<
err.explainSelf();
218 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)
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