test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
popenCPP.h
Go to the documentation of this file.
1 #ifndef CommonToolsUtils_popenCPP_H
2 #define CommonToolsUtils_popenCPP_H
3 #include<memory>
4 #include<string>
5 #include <sstream>
6 
7 
8 namespace reco {
9  namespace exprEvalDetails {
10 
11  std::unique_ptr<std::istream> popenCPP(const std::string &cmdline);
12 
13  inline
15  std::ostringstream n1;
16  {
17  auto s1 = popenCPP(cmdline+" 2>&1");
18  n1 << s1->rdbuf();
19  }
20  return n1.str();
21  }
22 
23  }
24 }
25 
26 
27 #endif // CommonToolsUtils__popenCPP_H
28 
std::string execSysCommand(const std::string &cmdline)
Definition: popenCPP.h:14
std::unique_ptr< std::istream > popenCPP(const std::string &cmdline)
Definition: popenCPP.cc:31