LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::SelectorByFunction Class Reference

#include "Selector.h"

Inheritance diagram for art::SelectorByFunction:
art::SelectorBase

Public Member Functions

template<typename FUNC >
 SelectorByFunction (FUNC func, std::string description)
 
bool match (BranchDescription const &p) const
 
std::string print (std::string const &indent) const
 

Private Member Functions

bool doMatch (art::BranchDescription const &p) const override
 
std::string doPrint (std::string const &indent) const override
 

Private Attributes

std::function< bool(art::BranchDescription const &)> func_
 
std::string description_
 

Detailed Description

Definition at line 162 of file Selector.h.

Constructor & Destructor Documentation

template<typename FUNC >
art::SelectorByFunction::SelectorByFunction ( FUNC  func,
std::string  description 
)
inlineexplicit

Definition at line 165 of file Selector.h.

166  : func_(func), description_(description)
167  {}
std::function< bool(art::BranchDescription const &)> func_
Definition: Selector.h:182
std::string description_
Definition: Selector.h:183

Member Function Documentation

bool art::SelectorByFunction::doMatch ( art::BranchDescription const &  p) const
inlineoverrideprivatevirtual

Implements art::SelectorBase.

Definition at line 171 of file Selector.h.

172  {
173  return func_(p);
174  }
std::function< bool(art::BranchDescription const &)> func_
Definition: Selector.h:182
std::string art::SelectorByFunction::doPrint ( std::string const &  indent) const
inlineoverrideprivatevirtual

Implements art::SelectorBase.

Definition at line 177 of file Selector.h.

178  {
179  return indent + description_;
180  }
std::string description_
Definition: Selector.h:183
std::string indent(std::size_t const i)
bool art::SelectorBase::match ( BranchDescription const &  p) const
inlineinherited

Definition at line 41 of file SelectorBase.h.

References art::SelectorBase::doMatch().

Referenced by art::Principal::findGroupsForProcess().

42  {
43  return doMatch(p);
44  }
virtual bool doMatch(BranchDescription const &p) const =0
std::string art::SelectorBase::print ( std::string const &  indent) const
inlineinherited

Definition at line 47 of file SelectorBase.h.

References art::SelectorBase::doMatch(), art::SelectorBase::doPrint(), and art::detail::indent().

Referenced by art::Principal::getBySelector().

48  {
49  return doPrint(indent);
50  }
std::string indent(std::size_t const i)
virtual std::string doPrint(std::string const &indent) const =0

Member Data Documentation

std::string art::SelectorByFunction::description_
private

Definition at line 183 of file Selector.h.

std::function<bool(art::BranchDescription const&)> art::SelectorByFunction::func_
private

Definition at line 182 of file Selector.h.


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