5 #include "cetlib/container_algorithms.h" 11 std::vector<std::vector<std::string>>
14 std::vector<std::vector<std::string>> result;
16 std::vector<ProcessHistory const*> collapsed_histories;
32 for (
auto const& hist_i : histories) {
33 bool found_descendent{
false};
34 for (
auto const& hist_j : histories) {
35 if (
isAncestor(hist_i.second, hist_j.second)) {
36 found_descendent =
true;
40 if (!found_descendent) {
41 collapsed_histories.push_back(&hist_i.second);
45 for (
auto const history : collapsed_histories) {
46 std::vector<std::string> process_names;
47 cet::transform_all(*history,
48 std::back_inserter(process_names),
49 [](
auto const& config) {
return config.processName(); });
50 result.push_back(std::move(process_names));
std::vector< std::vector< std::string > > orderedProcessNamesCollection(ProcessHistoryMap const &pHistMap)
std::map< ProcessHistoryID const, ProcessHistory > ProcessHistoryMap
bool isAncestor(ProcessHistory const &a, ProcessHistory const &b)