#include <GroupSelector.h>
Public Member Functions | |
GroupSelector () | |
void | initialize (GroupSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions) |
bool | initialized () const |
void | print (std::ostream &os) const |
bool | selected (BranchDescription const &desc) const |
Private Attributes | |
std::vector< std::string > | groupsToSelect_ |
bool | initialized_ |
Definition at line 21 of file GroupSelector.h.
edm::GroupSelector::GroupSelector | ( | ) |
Definition at line 18 of file GroupSelector.cc.
: groupsToSelect_(), initialized_(false) {}
void edm::GroupSelector::initialize | ( | GroupSelectorRules const & | rules, |
std::vector< BranchDescription const * > const & | branchDescriptions | ||
) |
Referenced by ShallowTree::beginJob(), and edm::OutputModule::selectProducts().
bool edm::GroupSelector::initialized | ( | ) | const [inline] |
Definition at line 34 of file GroupSelector.h.
References initialized_.
Referenced by edm::OutputModule::selectProducts().
{return initialized_;}
void edm::GroupSelector::print | ( | std::ostream & | os | ) | const |
Definition at line 66 of file GroupSelector.cc.
References compareJSON::const, edm::copy_all(), and groupsToSelect_.
Referenced by edm::operator<<().
{ os << "GroupSelector at: " << static_cast<void const*>(this) << " has " << groupsToSelect_.size() << " groups to select:\n"; copy_all(groupsToSelect_, std::ostream_iterator<std::string>(os, "\n")); }
bool edm::GroupSelector::selected | ( | BranchDescription const & | desc | ) | const |
Definition at line 54 of file GroupSelector.cc.
References edm::binary_search_all(), edm::BranchDescription::branchName(), Exception, groupsToSelect_, initialized_, and edm::errors::LogicError.
Referenced by ShallowTree::beginJob(), and edm::OutputModule::selected().
{ if (!initialized_) { throw edm::Exception(edm::errors::LogicError) << "GroupSelector::selected() called prematurely\n" << "before the product registry has been frozen.\n"; } // We are to select this 'branch' if its name is one of the ones we // have been told to select. return binary_search_all(groupsToSelect_, desc.branchName()); }
std::vector<std::string> edm::GroupSelector::groupsToSelect_ [private] |
Definition at line 47 of file GroupSelector.h.
Referenced by print(), and selected().
bool edm::GroupSelector::initialized_ [private] |
Definition at line 48 of file GroupSelector.h.
Referenced by initialized(), and selected().