EnvExpand.cxx
Go to the documentation of this file.
2 
3 #include <wordexp.h>
4 
5 namespace util
6 {
7  //......................................................................
9  {
10  std::string outString = inString;
11 
12  wordexp_t out;
13  int status = wordexp(inString.c_str(), &out, WRDE_SHOWERR);
14  if(status == 0){
15  outString = "";
16  for (unsigned int idx = 0; idx < out.we_wordc; ++idx){
17  std::string tmp(out.we_wordv[idx]);
18  outString.append(tmp);
19  }
20  }
21  wordfree(&out);
22  return outString;
23  }
24 
25 } // namespace
Filter events based on their run/event numbers.
int status
Definition: fabricate.py:1613
std::string EnvExpansion(const std::string &inString)
Function to expand environment variables.
Definition: EnvExpand.cxx:8
Float_t tmp
Definition: plot.C:36
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154