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;
CacheHint cacheHint(void) const
std::unique_ptr< Storage > wrapNonLocalFile(std::unique_ptr< Storage > s, const std::string &proto, const std::string &path, int mode) const
std::string getTURL(const std::string &surl) const
bool check(const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=0) const override
static const StorageFactory * get(void)
std::unique_ptr< Storage > open(const std::string &proto, const std::string &surl, int mode, const AuxSettings &) const override
ReadHint readHint(void) const
#define DEFINE_EDM_PLUGIN(factory, type, name)