LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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.

References keepAll_, and rules_.

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_

Member Function Documentation

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

Definition at line 157 of file GroupSelectorRules.cc.

References rules_.

Referenced by art::GroupSelectorRules::BranchSelectState::BranchSelectState(), and art::GroupSelector::GroupSelector().

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.

References keepAll_.

44  {
45  return keepAll_;
46  }

Member Data Documentation

bool art::GroupSelectorRules::keepAll_
private

Definition at line 77 of file GroupSelectorRules.h.

Referenced by GroupSelectorRules(), and keepAll().

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

Definition at line 76 of file GroupSelectorRules.h.

Referenced by applyToAll(), and GroupSelectorRules().


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