Classes | Public Member Functions | Private Attributes | List of all members
art::GroupSelectorRules Class Reference

#include <GroupSelectorRules.h>

Classes

struct  BranchSelectState
 
class  Rule
 

Public Member Functions

 GroupSelectorRules (std::vector< std::string > const &commands, std::string const &parameterName, std::string const &parameterOwnerName)
 
void applyToAll (std::vector< BranchSelectState > &branchstates) const
 
bool keepAll () const
 

Private Attributes

std::vector< Rulerules_ {}
 
bool keepAll_
 

Detailed Description

Definition at line 22 of file GroupSelectorRules.h.

Constructor & Destructor Documentation

GroupSelectorRules::GroupSelectorRules ( std::vector< std::string > const &  commands,
std::string const &  parameterName,
std::string const &  parameterOwnerName 
)

Definition at line 184 of file GroupSelectorRules.cc.

187 {
188  rules_.reserve(commands.size());
189  for (auto const& cmd : commands) {
190  rules_.emplace_back(cmd, parameterName, parameterOwnerName);
191  }
192  keepAll_ = commands.size() == 1 && commands[0] == "keep *";
193 }
std::vector< Rule > rules_
list cmd
Definition: getreco.py:22

Member Function Documentation

void GroupSelectorRules::applyToAll ( std::vector< BranchSelectState > &  branchstates) const

Definition at line 157 of file GroupSelectorRules.cc.

158 {
159  for (auto const& rule : rules_)
160  rule.applyToAll(branchstates);
161 }
std::vector< Rule > rules_
bool art::GroupSelectorRules::keepAll ( ) const
inline

Definition at line 43 of file GroupSelectorRules.h.

44  {
45  return keepAll_;
46  }

Member Data Documentation

bool art::GroupSelectorRules::keepAll_
private

Definition at line 77 of file GroupSelectorRules.h.

std::vector<Rule> art::GroupSelectorRules::rules_ {}
private

Definition at line 76 of file GroupSelectorRules.h.


The documentation for this class was generated from the following files: