CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
reco::exprEvalDetails Namespace Reference

Functions

std::string execSysCommand (const std::string &cmdline)
 
std::unique_ptr< std::istream > popenCPP (const std::string &cmdline)
 

Function Documentation

std::string reco::exprEvalDetails::execSysCommand ( const std::string &  cmdline)
inline

Definition at line 14 of file popenCPP.h.

References popenCPP().

Referenced by reco::ExpressionEvaluator::ExpressionEvaluator().

14  {
15  std::ostringstream n1;
16  {
17  auto s1 = popenCPP(cmdline+" 2>&1");
18  n1 << s1->rdbuf();
19  }
20  return n1.str();
21  }
std::unique_ptr< std::istream > popenCPP(const std::string &cmdline)
Definition: popenCPP.cc:31
std::unique_ptr< std::istream > reco::exprEvalDetails::popenCPP ( const std::string &  cmdline)

Definition at line 31 of file popenCPP.cc.

References edm::hlt::Exception, and f.

Referenced by execSysCommand().

31  {
32  FILE *f = popen(cmdline.c_str(), "r");
33  if(!f)
34  throw cms::Exception("PopenCPP","(\""+cmdline+"\") failed");
35  return std::unique_ptr<std::istream>(new cfstream(f));
36 }
double f[11][100]