LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::GroupSelectorRules::Rule Class Reference

Public Member Functions

 Rule (std::string const &s, std::string const &parameterName, std::string const &owner)
 
void applyToAll (std::vector< BranchSelectState > &branchstates) const
 
void applyToOne (BranchDescription const *branch, bool &result) const
 
bool appliesTo (BranchDescription const *branch) const
 

Private Attributes

bool selectflag_ {false}
 
BranchKey components_
 

Detailed Description

Definition at line 54 of file GroupSelectorRules.h.

Constructor & Destructor Documentation

GroupSelectorRules::Rule::Rule ( std::string const &  s,
std::string const &  parameterName,
std::string const &  owner 
)

Definition at line 142 of file GroupSelectorRules.cc.

References selectflag_.

145  : components_{parseComponents(s, parameterName, owner, selectflag_)}
146 {}
Float_t s
Definition: plot.C:23

Member Function Documentation

bool GroupSelectorRules::Rule::appliesTo ( BranchDescription const *  branch) const

Definition at line 172 of file GroupSelectorRules.cc.

References art::BranchDescription::branchType(), art::BranchKey::branchType_, components_, art::BranchDescription::friendlyClassName(), art::BranchKey::friendlyClassName_, art::BranchDescription::moduleLabel(), art::BranchKey::moduleLabel_, art::BranchDescription::processName(), art::BranchKey::processName_, art::BranchDescription::productInstanceName(), and art::BranchKey::productInstanceName_.

Referenced by applyToOne().

173 {
174  return partial_match(components_.friendlyClassName_,
175  branch->friendlyClassName()) &&
176  partial_match(components_.moduleLabel_, branch->moduleLabel()) &&
177  partial_match(components_.productInstanceName_,
178  branch->productInstanceName()) &&
179  partial_match(components_.processName_, branch->processName()) &&
180  partial_match(static_cast<BranchType>(components_.branchType_),
181  branch->branchType());
182 }
std::string productInstanceName_
Definition: BranchKey.h:44
std::string friendlyClassName_
Definition: BranchKey.h:42
std::string processName_
Definition: BranchKey.h:45
std::string moduleLabel_
Definition: BranchKey.h:43
void GroupSelectorRules::Rule::applyToAll ( std::vector< BranchSelectState > &  branchstates) const

Definition at line 149 of file GroupSelectorRules.cc.

References applyToOne().

151 {
152  for (auto& state : branchstates)
153  applyToOne(state.desc, state.selectMe);
154 }
void applyToOne(BranchDescription const *branch, bool &result) const
void GroupSelectorRules::Rule::applyToOne ( BranchDescription const *  branch,
bool &  result 
) const

Definition at line 164 of file GroupSelectorRules.cc.

References appliesTo(), and selectflag_.

Referenced by applyToAll().

166 {
167  if (this->appliesTo(branch))
168  result = selectflag_;
169 }
bool appliesTo(BranchDescription const *branch) const

Member Data Documentation

BranchKey art::GroupSelectorRules::Rule::components_
private

Definition at line 77 of file GroupSelectorRules.h.

Referenced by appliesTo().

bool art::GroupSelectorRules::Rule::selectflag_ {false}
private

Definition at line 76 of file GroupSelectorRules.h.

Referenced by applyToOne(), and Rule().


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