CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PfnEditor.cc
Go to the documentation of this file.
2 
3 namespace cond{
4 
6 
8  std::string const & ipos) :
9  prefix(ipre),
10  postfix(ipos),
11  off(prefix.empty() && postfix.empty())
12  {}
13 
14 
16  if (off) return pfn;
17  // FIXME ad-hoc
18  if (pfn.find("FrontierInt")!=std::string::npos) return pfn;
19  if (pfn.find("FrontierPrep")!=std::string::npos) return pfn;
20  if (pfn.find("sqlite")!=std::string::npos) return pfn;
21 
22  size_t pos=std::string::npos;
23  if (!prefix.empty()) pos = pfn.rfind('/');
24  return prefix + ( (pos == std::string::npos) ? pfn :
25  pfn.substr(pos+1)
26  ) + postfix;
27  }
28 
29 }
list pfn
Definition: dbtoconf.py:76
std::string prefix
Definition: PfnEditor.h:19
std::string postfix
Definition: PfnEditor.h:20
std::string operator()(std::string const &pfn) const
Definition: PfnEditor.cc:15