12 namespace edm::storage {
18 if (
char *
p = std::getenv(
"CMS_STORM_LCG_GT_TIMEOUT"))
25 std::string comm(
"lcg-gt -b -T srmv2 -t " + timeout +
" srm:" + surl +
" file 2>&1");
26 LogDebug(
"StormLCGStorageMaker") <<
"command: " << comm << std::endl;
28 FILE *
pipe = popen(comm.c_str(),
"r");
30 throw cms::Exception(
"StormLCGStorageMaker") <<
"failed to execute lcg-gt command: " << comm;
35 while ((ch = getc(pipe)) != EOF)
39 LogDebug(
"StormLCGStorageMaker") <<
"output: " << output << std::endl;
42 size_t start = output.find(
"file:", 0);
43 if (start == std::string::npos)
44 throw cms::Exception(
"StormLCGStorageMaker") <<
"no turl found in command '" << comm <<
"' output:\n" <<
output;
48 LogDebug(
"StormLCGStorageMaker") <<
"file to open: " << turl << std::endl;
87 using namespace edm::storage;
ReadHint readHint(void) const
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
bool check(const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=nullptr) const override
std::string getTURL(const std::string &surl) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< Storage > open(const std::string &proto, const std::string &surl, int mode, const AuxSettings &) const override
static const StorageFactory * get(void)
tuple size
Write out results.