Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making HLTConfigProvider correctly handle ignored modules #13215

Merged
merged 1 commit into from
Feb 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions HLTrigger/HLTcore/src/HLTConfigData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ void HLTConfigData::extract()
const unsigned int m(size(i));
for (unsigned int j=0; j!=m; ++j) {
const string& label(moduleLabels_[i][j]);
if (moduleType(label) == "HLTLevel1GTSeed") {
//HLTConfigProvider sees ignored modules as "-modname"
//if the HLTLevel1GTSeed is ignored in the config, it shouldnt
//count to the number of active HLTLevel1GTSeeds so we now check
//for the module being ignored
if (label.front()!='-' && moduleType(label) == "HLTLevel1GTSeed") {
const ParameterSet& pset(modulePSet(label));
if (pset!=ParameterSet()) {
const bool l1Tech(pset.getParameter<bool>("L1TechTriggerSeeding"));
Expand Down Expand Up @@ -428,9 +432,13 @@ const edm::ParameterSet& HLTConfigData::processPSet() const {
return *processPSet_;
}

const edm::ParameterSet& HLTConfigData::modulePSet(const std::string& module) const {
if (processPSet_->exists(module)) {
return processPSet_->getParameterSet(module);
const edm::ParameterSet& HLTConfigData::modulePSet(const std::string& module) const {
//HLTConfigProvider sees ignored modules as "-modname"
//but in the PSet, the module is named "modname"
//so if it starts with "-", you need to remove the "-" from the
//module name to be able to retreive it from the PSet
if (processPSet_->exists(module.front()!='-' ? module : module.substr(1))) {
return processPSet_->getParameterSet(module.front()!='-' ? module : module.substr(1));
} else {
return *s_dummyPSet();
}
Expand Down