37 namespace SColdQcdCorrelatorAnalysis {
38 namespace SCorrelatorUtilities {
51 for (
const auto& [bad, good] : MapBadOntoGoodStrings) {
53 while ((position = nameToClean.find(bad)) != string::npos) {
54 nameToClean.replace(position, 1, good);
74 dstNode -> addNode(newNode);
111 number = tree -> GetTreeNumber();
116 const bool isStatusGood = (status >= 0);
117 const bool isNotCurrent = (number != current);
118 if (isStatusGood && isNotCurrent) {
119 current = tree -> GetTreeNumber();
136 for (
string& leaf : leaves) {
148 string flattened(
"");
149 for (
size_t iLeaf = 0; iLeaf < leaves.size(); iLeaf++) {
150 flattened.append(leaves[iLeaf]);
151 if ((iLeaf + 1) != leaves.size()) {
152 flattened.append(
":");
162 template <
typename T> vector<string>
MakeLeafVector(optional<string> tag = nullopt) {
164 vector<string> leaves = T::GetListOfMembers();
165 if (tag.has_value()) {
175 template <
typename T>
void AddLeavesToVector(vector<string>& vecToAddTo, optional<string> tag = nullopt) {
177 vector<string> addends = MakeLeafVector<T>(tag);
178 for (
auto addend : addends) {
179 vecToAddTo.push_back(addend);