#include <GroupSelectorRules.h>
Classes | |
struct | BranchSelectState |
class | Rule |
Public Member Functions | |
void | applyToAll (std::vector< BranchSelectState > &branchstates) const |
GroupSelectorRules (ParameterSet const &pset, std::string const ¶meterName, std::string const ¶meterOwnerName) | |
bool | keepAll () const |
Static Public Member Functions | |
static void | fillDescription (ParameterSetDescription &desc, char const *parameterName) |
Private Attributes | |
bool | keepAll_ |
std::string | parameterName_ |
std::string | parameterOwnerName_ |
std::vector< Rule > | rules_ |
Definition at line 24 of file GroupSelectorRules.h.
edm::GroupSelectorRules::GroupSelectorRules | ( | ParameterSet const & | pset, |
std::string const & | parameterName, | ||
std::string const & | parameterOwnerName | ||
) |
Definition at line 232 of file GroupSelectorRules.cc.
References end, edm::ParameterSet::getUntrackedParameter(), keepAll_, and rules_.
: rules_(), parameterName_(parameterName), parameterOwnerName_(parameterOwnerName) { // Fill the rules. // If there is no parameter whose name is parameterName_ in the // ParameterSet we are given, we use the following default. std::vector<std::string> defaultCommands(1U, std::string("keep *")); std::vector<std::string> commands = pset.getUntrackedParameter<std::vector<std::string> >(parameterName, defaultCommands); if (commands.empty()) { commands.push_back(defaultCommands[0]); } rules_.reserve(commands.size()); for(std::vector<std::string>::const_iterator it = commands.begin(), end = commands.end(); it != end; ++it) { rules_.push_back(Rule(*it, parameterName, parameterOwnerName)); } keepAll_ = commands.size() == 1 && commands[0] == defaultCommands[0]; }
void edm::GroupSelectorRules::applyToAll | ( | std::vector< BranchSelectState > & | branchstates | ) | const |
void edm::GroupSelectorRules::fillDescription | ( | ParameterSetDescription & | desc, |
char const * | parameterName | ||
) | [static] |
Definition at line 226 of file GroupSelectorRules.cc.
References edm::ParameterSetDescription::addUntracked().
{ std::vector<std::string> defaultStrings(1U, std::string("keep *")); desc.addUntracked<std::vector<std::string> >(parameterName, defaultStrings) ->setComment("Specifies which branches are kept or dropped."); }
bool edm::GroupSelectorRules::keepAll | ( | ) | const [inline] |
bool edm::GroupSelectorRules::keepAll_ [private] |
Definition at line 84 of file GroupSelectorRules.h.
Referenced by GroupSelectorRules(), and keepAll().
std::string edm::GroupSelectorRules::parameterName_ [private] |
Definition at line 82 of file GroupSelectorRules.h.
std::string edm::GroupSelectorRules::parameterOwnerName_ [private] |
Definition at line 83 of file GroupSelectorRules.h.
std::vector<Rule> edm::GroupSelectorRules::rules_ [private] |
Definition at line 81 of file GroupSelectorRules.h.
Referenced by applyToAll(), and GroupSelectorRules().