19 if(
char *
p = getenv(
"CMS_STORM_LCG_GT_TIMEOUT"))
26 std::string comm(
"lcg-gt -b -T srmv2 -t " + timeout +
" srm:" + surl +
" file 2>&1");
27 LogDebug(
"StormLCGStorageMaker") <<
"command: " << comm << std::endl;
29 FILE *
pipe = popen(comm.c_str(),
"r");
32 <<
"failed to execute lcg-gt command: " 38 while ((ch = getc(pipe)) != EOF)
42 LogDebug(
"StormLCGStorageMaker") <<
"output: " << output << std::endl;
45 size_t start = output.find(
"file:", 0);
46 if (start == std::string::npos)
48 <<
"no turl found in command '" << comm <<
"' output:\n" <<
output;
52 LogDebug(
"StormLCGStorageMaker") <<
"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
static const StorageFactory * get(void)
bool check(const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=0) const override
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)
std::string getTURL(const std::string &surl) const