17 if (
char *
p = std::getenv(
"CMS_STORM_PTG_CLIENT"))
20 throw cms::Exception(
"StormStorageMaker") <<
"$CMS_STORM_PTG_CLIENT has no value";
24 LogDebug(
"StormStorageMaker") <<
"command: " << comm << std::endl;
26 FILE *
pipe = popen(comm.c_str(),
"r");
28 throw cms::Exception(
"StormStorageMaker") <<
"failed to execute PtG command: " << comm;
33 while ((ch = getc(
pipe)) != EOF)
37 LogDebug(
"StormStorageMaker") <<
"output: " <<
output << std::endl;
41 if (
start == std::string::npos)
42 throw cms::Exception(
"StormStorageMaker") <<
"no turl found in command '" << comm <<
"' output:\n" <<
output;
46 LogDebug(
"StormStorageMaker") <<
"file to open: " << turl << std::endl;
72 IOOffset *size =
nullptr)
const override {
std::unique_ptr< Storage > open(const std::string &proto, const std::string &surl, int mode, const AuxSettings &) const override
bool check(const std::string &, const std::string &path, const AuxSettings &, IOOffset *size=nullptr) const override
#define DEFINE_EDM_PLUGIN(factory, type, name)
static const StorageFactory * get(void)
std::string getTURL(const std::string &surl) const