test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cond::PfnEditor Class Reference

#include <PfnEditor.h>

Public Member Functions

std::string operator() (std::string const &pfn) const
 
 PfnEditor ()
 
 PfnEditor (std::string const &ipre, std::string const &ipos)
 

Private Attributes

bool off
 
std::string postfix
 
std::string prefix
 

Detailed Description

Definition at line 10 of file PfnEditor.h.

Constructor & Destructor Documentation

cond::PfnEditor::PfnEditor ( )

Definition at line 5 of file PfnEditor.cc.

5 : off(true){}
cond::PfnEditor::PfnEditor ( std::string const &  ipre,
std::string const &  ipos 
)

Definition at line 7 of file PfnEditor.cc.

8  :
9  prefix(ipre),
10  postfix(ipos),
11  off(prefix.empty() && postfix.empty())
12  {}
std::string prefix
Definition: PfnEditor.h:19
std::string postfix
Definition: PfnEditor.h:20

Member Function Documentation

std::string cond::PfnEditor::operator() ( std::string const &  pfn) const

Definition at line 15 of file PfnEditor.cc.

References off, dbtoconf::pfn, postfix, and prefix.

15  {
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  }
list pfn
Definition: dbtoconf.py:76
std::string prefix
Definition: PfnEditor.h:19
std::string postfix
Definition: PfnEditor.h:20

Member Data Documentation

bool cond::PfnEditor::off
private

Definition at line 21 of file PfnEditor.h.

Referenced by operator()().

std::string cond::PfnEditor::postfix
private

Definition at line 20 of file PfnEditor.h.

Referenced by operator()().

std::string cond::PfnEditor::prefix
private

Definition at line 19 of file PfnEditor.h.

Referenced by operator()().