LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 27 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 48 of file GroupSelectorRules.h.

References keepAll_.

49  {
50  return keepAll_;
51  }

Member Data Documentation

bool art::GroupSelectorRules::keepAll_
private

Definition at line 82 of file GroupSelectorRules.h.

Referenced by GroupSelectorRules(), and keepAll().

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

Definition at line 81 of file GroupSelectorRules.h.

Referenced by applyToAll(), and GroupSelectorRules().


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