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;
82 if (stat (
getTURL(path).c_str(), &st) != 0)
CacheHint cacheHint(void) const
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)
virtual bool check(const std::string &, const std::string &path, IOOffset *size=0) override
tuple path
else: Piece not in the list, fine.
virtual Storage * open(const std::string &proto, const std::string &surl, int mode) override
std::string getTURL(const std::string &surl)
ReadHint readHint(void) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
tuple size
Write out results.