LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
canonicalProductName.cc
Go to the documentation of this file.
2 
3 namespace {
4  constexpr char underscore{'_'};
5  constexpr char period{'.'};
6 }
7 
8 std::string
9 art::canonicalProductName(std::string const& friendlyClassName,
10  std::string const& moduleLabel,
11  std::string const& productInstanceName,
12  std::string const& processName)
13 {
14  std::string result;
15  result.reserve(friendlyClassName.size() + moduleLabel.size() +
16  productInstanceName.size() + processName.size() + 4);
17  result += friendlyClassName;
18  result += underscore;
19  result += moduleLabel;
20  result += underscore;
21  result += productInstanceName;
22  result += underscore;
23  result += processName;
24  result += period;
25  // It is *absolutely* needed to have the trailing period on the branch
26  // name, as this gives instruction to ROOT to split this branch in the
27  // modern (v4+) way vs the old way (v3-).
28 
29  return result;
30 }
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)