18 if (
char *
p = getenv(
"CMS_STORM_PTG_CLIENT"))
22 <<
"$CMS_STORM_PTG_CLIENT has no value";
25 std::string comm(client +
" srm:" + surl +
" 2>&1");
26 LogDebug(
"StormStorageMaker") <<
"command: " << comm << std::endl;
28 FILE *
pipe = popen(comm.c_str(),
"r");
31 <<
"failed to execute PtG command: "
37 while ((ch = getc(pipe)) != EOF)
41 LogDebug(
"StormStorageMaker") <<
"output: " << output << std::endl;
44 size_t start = output.find(
"FilePath:", 0);
45 if (start == std::string::npos)
47 <<
"no turl found in command '" << comm <<
"' output:\n" <<
output;
51 LogDebug(
"StormStorageMaker") <<
"file to open: " << turl << std::endl;
81 if (stat (
getTURL(path).c_str(), &st) != 0)
CacheHint cacheHint(void) const
virtual Storage * open(const std::string &proto, const std::string &surl, int mode) override
tuple start
Check for commandline option errors.
Storage * wrapNonLocalFile(Storage *s, const std::string &proto, const std::string &path, int mode)
static StorageFactory * get(void)
tuple path
else: Piece not in the list, fine.
std::string getTURL(const std::string &surl)
ReadHint readHint(void) const
virtual bool check(const std::string &, const std::string &path, IOOffset *size=0) override
#define DEFINE_EDM_PLUGIN(factory, type, name)
tuple size
Write out results.