5 #include "cetlib/container_algorithms.h" 6 #include "range/v3/action/sort.hpp" 7 #include "range/v3/view.hpp" 24 ::ranges::views::transform(
25 [](
auto const& pd) {
return BranchSelectState{&pd}; }) |
26 ::ranges::to<std::vector>();
37 ::ranges::views::filter([](
auto const& state) {
return state.selectMe; }) |
38 ::ranges::views::transform([](
auto const& state) {
return state.desc; }) |
39 ::ranges::to<std::vector>();
40 sort_all(groupsToSelect_);
46 return binary_search_all(groupsToSelect_, &desc);
52 os <<
"GroupSelector at: " <<
static_cast<void const*
>(
this) <<
" has " 53 << groupsToSelect_.size() <<
" groups to select:\n";
54 for (
auto const& bd_ptr : groupsToSelect_) {
55 os << bd_ptr->branchName() <<
'\n';
bool selected(BranchDescription const &desc) const
void print(std::ostream &os) const
GroupSelector(GroupSelectorRules const &rules, ProductDescriptionsByID const &descriptions)
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
void applyToAll(std::vector< BranchSelectState > &branchstates) const
decltype(auto) values(Coll &&coll)
Range-for loop helper iterating across the values of the specified collection.
std::map< ProductID, BranchDescription > ProductDescriptionsByID