LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::ProcessNameSelector Class Reference

#include "Selector.h"

Inheritance diagram for art::ProcessNameSelector:
art::SelectorBase

Public Member Functions

 ProcessNameSelector (const std::string &pn)
 
virtual ProcessNameSelectorclone () const override
 
std::string const & name () const
 
bool match (BranchDescription const &p) const
 

Private Member Functions

virtual bool doMatch (BranchDescription const &p) const override
 

Private Attributes

std::string pn_
 

Detailed Description

Class ProcessNameSelector. Selects EDProducts based upon process name.

As a special case, a ProcessNameSelector created with the string "*" matches any process (and so is rather like having no ProcessNameSelector at all).

Definition at line 73 of file Selector.h.

Constructor & Destructor Documentation

art::ProcessNameSelector::ProcessNameSelector ( const std::string &  pn)
inline

Definition at line 75 of file Selector.h.

Referenced by clone().

76  : pn_(pn.empty() ? std::string("*") : pn)
77  {}

Member Function Documentation

virtual ProcessNameSelector* art::ProcessNameSelector::clone ( ) const
inlineoverridevirtual

Implements art::SelectorBase.

Definition at line 80 of file Selector.h.

References ProcessNameSelector().

81  {
82  return new ProcessNameSelector(*this);
83  }
ProcessNameSelector(const std::string &pn)
Definition: Selector.h:75
virtual bool art::ProcessNameSelector::doMatch ( BranchDescription const &  p) const
inlineoverrideprivatevirtual

Implements art::SelectorBase.

Definition at line 93 of file Selector.h.

References pn_, and art::BranchDescription::processName().

94  {
95  return (pn_ == "*") || (p.processName() == pn_);
96  }
bool art::SelectorBase::match ( BranchDescription const &  p) const
inlineinherited

Definition at line 23 of file SelectorBase.h.

References art::SelectorBase::clone(), and art::SelectorBase::doMatch().

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

24  {
25  return doMatch(p);
26  }
virtual bool doMatch(BranchDescription const &p) const =0
std::string const& art::ProcessNameSelector::name ( ) const
inline

Definition at line 86 of file Selector.h.

References pn_.

87  {
88  return pn_;
89  }

Member Data Documentation

std::string art::ProcessNameSelector::pn_
private

Definition at line 98 of file Selector.h.

Referenced by doMatch(), and name().


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