25 validator.
add<std::vector<std::string>>(
"value");
26 desc.addVPSet(
"modulesAndConsumes", validator, std::vector<edm::ParameterSet>());
29 descriptions.
setComment(
"This service is intended to be used in framework tests.");
37 return desc->moduleLabel() == moduleToCheck.first;
41 ex <<
"Module " << moduleToCheck.first
42 <<
" not found in PathsAndConsumesOfModulesBase, that has the following modules:\n";
45 ex <<
" " <<
desc->moduleLabel() <<
"\n";
53 std::set<std::string> tocheck(moduleToCheck.second.begin(), moduleToCheck.second.end());
55 auto found = tocheck.find(
desc->moduleLabel());
56 if (
found == tocheck.end()) {
58 ex <<
"Module " << moduleToCheck.first <<
" consumes " <<
desc->moduleLabel()
59 <<
" that was not one of the expected modules:\n";
60 for (
auto const&
m : moduleToCheck.second) {
61 ex <<
" " <<
m <<
"\n";
67 if (not tocheck.empty()) {
69 ex <<
"Module " << moduleToCheck.first <<
" was expected to consume the following modules, but it did not\n";
70 for (
auto const&
m : tocheck) {
71 ex <<
" " <<
m <<
"\n";
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
std::vector< ModuleDescription const * > const & allModules() const
std::vector< std::pair< std::string, std::vector< std::string > > > modulesConsumes_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &pathsAndConsumes, edm::ProcessContext const &) const
#define DEFINE_FWK_SERVICE(type)
void setComment(std::string const &value)
PathsAndConsumesOfModulesTestService(edm::ParameterSet const &pset, edm::ActivityRegistry &iRegistry)
void watchPreBeginJob(PreBeginJob::slot_type const &iSlot)
convenience function for attaching to signal
std::vector< ModuleDescription const * > const & modulesWhoseProductsAreConsumedBy(unsigned int moduleID, BranchType branchType=InEvent) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)