CMS 3D CMS Logo

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 12 of file popenCPP.h.

References popenCPP().

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

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

Definition at line 33 of file popenCPP.cc.

References HltBtagPostValidation_cff::c, Exception, f, FrontierConditions_GlobalTag_cff::file, dqmiodumpmetadata::n, and alignCSCRings::s.

Referenced by execSysCommand().

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