Skip to content

Commit

Permalink
making HLTConfig correctly handle ignored modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Harper committed Feb 8, 2016
1 parent 38304a4 commit 2e1b560
Showing 1 changed file with 12 additions and 4 deletions.
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

0 comments on commit 2e1b560

Please sign in to comment.