Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-08 00:35:26

0001 /** \class HLTConfigData
0002  *
0003  * See header file for documentation
0004  *
0005  *
0006  *  \author Martin Grunewald
0007  *
0008  */
0009 
0010 #include "HLTrigger/HLTcore/interface/HLTConfigData.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 #include "FWCore/Utilities/interface/path_configuration.h"
0013 
0014 #include <unordered_set>
0015 #include <iostream>
0016 
0017 //Using this function with the 'const static within s_dummyPSet'
0018 // guarantees that even if multiple threads call s_dummyPSet at the
0019 // same time, only the 'first' one registers the dummy PSet.
0020 static const edm::ParameterSet initializeDummyPSet() {
0021   edm::ParameterSet dummy;
0022   dummy.registerIt();
0023   return dummy;
0024 }
0025 
0026 static const edm::ParameterSet* s_dummyPSet() {
0027   static const edm::ParameterSet dummyPSet{initializeDummyPSet()};
0028   return &dummyPSet;
0029 }
0030 
0031 HLTConfigData::HLTConfigData()
0032     : processPSet_(s_dummyPSet()),
0033       processName_(""),
0034       globalTag_(""),
0035       tableName_(),
0036       triggerNames_(),
0037       moduleLabels_(),
0038       saveTagsModules_(),
0039       triggerIndex_(),
0040       moduleIndex_(),
0041       l1tType_(0),
0042       hltL1GTSeeds_(),
0043       hltL1TSeeds_(),
0044       streamNames_(),
0045       streamIndex_(),
0046       streamContents_(),
0047       datasetNames_(),
0048       datasetIndex_(),
0049       datasetContents_(),
0050       hltPrescaleTable_() {
0051   if (processPSet_->id().isValid()) {
0052     extract();
0053   }
0054 }
0055 
0056 HLTConfigData::HLTConfigData(const edm::ParameterSet* iPSet)
0057     : processPSet_(iPSet),
0058       processName_(""),
0059       globalTag_(""),
0060       tableName_(),
0061       triggerNames_(),
0062       moduleLabels_(),
0063       saveTagsModules_(),
0064       triggerIndex_(),
0065       moduleIndex_(),
0066       l1tType_(0),
0067       hltL1GTSeeds_(),
0068       hltL1TSeeds_(),
0069       streamNames_(),
0070       streamIndex_(),
0071       streamContents_(),
0072       datasetNames_(),
0073       datasetIndex_(),
0074       datasetContents_(),
0075       hltPrescaleTable_() {
0076   if (processPSet_->id().isValid()) {
0077     extract();
0078   }
0079 }
0080 
0081 void HLTConfigData::extract() {
0082   using namespace std;
0083   using namespace edm;
0084   using namespace trigger;
0085 
0086   // Extract process name
0087   if (processPSet_->existsAs<string>("@process_name", true)) {
0088     processName_ = processPSet_->getParameter<string>("@process_name");
0089   }
0090 
0091   // Extract globaltag
0092   globalTag_ = "";
0093   const ParameterSet* GlobalTagPSet(nullptr);
0094   if (processPSet_->exists("GlobalTag")) {
0095     GlobalTagPSet = &(processPSet_->getParameterSet("GlobalTag"));
0096   } else if (processPSet_->exists("PoolDBESSource@GlobalTag")) {
0097     GlobalTagPSet = &(processPSet_->getParameterSet("PoolDBESSource@GlobalTag"));
0098   }
0099   if (GlobalTagPSet && GlobalTagPSet->existsAs<std::string>("globaltag", true)) {
0100     globalTag_ = GlobalTagPSet->getParameter<std::string>("globaltag");
0101   }
0102 
0103   // Obtain PSet containing table name (available only in 2_1_10++ files)
0104   if (processPSet_->existsAs<ParameterSet>("HLTConfigVersion", true)) {
0105     const ParameterSet& HLTPSet(processPSet_->getParameterSet("HLTConfigVersion"));
0106     if (HLTPSet.existsAs<string>("tableName", true)) {
0107       tableName_ = HLTPSet.getParameter<string>("tableName");
0108     }
0109   }
0110 
0111   // Extract trigger paths (= paths - end_paths)
0112   if (processPSet_->existsAs<ParameterSet>("@trigger_paths", true)) {
0113     const ParameterSet& HLTPSet(processPSet_->getParameterSet("@trigger_paths"));
0114     if (HLTPSet.existsAs<vector<string>>("@trigger_paths", true)) {
0115       triggerNames_ = HLTPSet.getParameter<vector<string>>("@trigger_paths");
0116     }
0117   }
0118 
0119   // Obtain module labels of all modules on all trigger paths
0120   const unsigned int n(size());
0121   moduleLabels_.reserve(n);
0122   for (unsigned int i = 0; i != n; ++i) {
0123     if (processPSet_->existsAs<vector<string>>(triggerNames_[i], true)) {
0124       moduleLabels_.push_back(path_configuration::configurationToModuleBitPosition(
0125           processPSet_->getParameter<vector<string>>(triggerNames_[i])));
0126     }
0127   }
0128   saveTagsModules_.reserve(n);
0129   vector<string> labels;
0130   for (unsigned int i = 0; i != n; ++i) {
0131     labels.clear();
0132     const vector<string>& modules(moduleLabels(i));
0133     const unsigned int m(modules.size());
0134     labels.reserve(m);
0135     for (unsigned int j = 0; j != m; ++j) {
0136       const string& label(modules[j]);
0137       if (saveTags(label))
0138         labels.push_back(label);
0139     }
0140     saveTagsModules_.push_back(labels);
0141   }
0142 
0143   // Fill index maps for fast lookup
0144   moduleIndex_.resize(n);
0145   for (unsigned int i = 0; i != n; ++i) {
0146     triggerIndex_[triggerNames_[i]] = i;
0147     moduleIndex_[i].clear();
0148     const unsigned int m(size(i));
0149     for (unsigned int j = 0; j != m; ++j) {
0150       moduleIndex_[i][moduleLabels_[i][j]] = j;
0151     }
0152   }
0153 
0154   // Extract and fill HLTLevel1GTSeed information for each trigger path
0155   hltL1GTSeeds_.resize(n);
0156   for (unsigned int i = 0; i != n; ++i) {
0157     hltL1GTSeeds_[i].clear();
0158     const unsigned int m(size(i));
0159     for (unsigned int j = 0; j != m; ++j) {
0160       const string& label(moduleLabels_[i][j]);
0161       //HLTConfigProvider sees ignored modules as "-modname"
0162       //if the HLTLevel1GTSeed is ignored in the config, it shouldnt
0163       //count to the number of active HLTLevel1GTSeeds so we now check
0164       //for the module being ignored
0165       if (label.front() != '-' && moduleType(label) == "HLTLevel1GTSeed") {
0166         const ParameterSet& pset(modulePSet(label));
0167         if (pset != ParameterSet()) {
0168           const bool l1Tech(pset.getParameter<bool>("L1TechTriggerSeeding"));
0169           const string l1Seed(pset.getParameter<string>("L1SeedsLogicalExpression"));
0170           hltL1GTSeeds_[i].push_back(pair<bool, string>(l1Tech, l1Seed));
0171         }
0172       }
0173     }
0174   }
0175 
0176   // Extract and fill HLTL1TSeed information for each trigger path
0177   hltL1TSeeds_.resize(n);
0178   for (unsigned int i = 0; i != n; ++i) {
0179     hltL1TSeeds_[i].clear();
0180     const unsigned int m(size(i));
0181     for (unsigned int j = 0; j != m; ++j) {
0182       const string& label(moduleLabels_[i][j]);
0183       //HLTConfigProvider sees ignored modules as "-modname"
0184       //if the HLTL1TSeed is ignored in the config, it shouldnt
0185       //count to the number of active HLTL1TSeeds so we now check
0186       //for the module being ignored
0187       if (label.front() != '-' && moduleType(label) == "HLTL1TSeed") {
0188         const ParameterSet& pset(modulePSet(label));
0189         if (pset != ParameterSet()) {
0190           const string l1Gtag(pset.getParameter<edm::InputTag>("L1GlobalInputTag").label());
0191           // Emulator output is used to ignore L1T prescales
0192           if (l1Gtag != "hltGtStage2ObjectMap") {
0193             const string l1Seed(pset.getParameter<string>("L1SeedsLogicalExpression"));
0194             hltL1TSeeds_[i].push_back(l1Seed);
0195           }
0196         }
0197       }
0198     }
0199   }
0200 
0201   // Extract and fill streams information
0202   if (processPSet_->existsAs<ParameterSet>("streams", true)) {
0203     const ParameterSet& streams(processPSet_->getParameterSet("streams"));
0204     streamNames_ = streams.getParameterNamesForType<vector<string>>();
0205     sort(streamNames_.begin(), streamNames_.end());
0206     const unsigned int n(streamNames_.size());
0207     streamContents_.resize(n);
0208     for (unsigned int i = 0; i != n; ++i) {
0209       streamIndex_[streamNames_[i]] = i;
0210       streamContents_[i] = streams.getParameter<vector<string>>(streamNames_[i]);
0211       sort(streamContents_[i].begin(), streamContents_[i].end());
0212     }
0213   }
0214 
0215   // Extract and fill datasets information
0216   if (processPSet_->existsAs<ParameterSet>("datasets", true)) {
0217     const ParameterSet& datasets(processPSet_->getParameterSet("datasets"));
0218     datasetNames_ = datasets.getParameterNamesForType<vector<string>>();
0219     sort(datasetNames_.begin(), datasetNames_.end());
0220     const unsigned int n(datasetNames_.size());
0221     datasetContents_.resize(n);
0222     for (unsigned int i = 0; i != n; ++i) {
0223       datasetIndex_[datasetNames_[i]] = i;
0224       datasetContents_[i] = datasets.getParameter<vector<string>>(datasetNames_[i]);
0225       sort(datasetContents_[i].begin(), datasetContents_[i].end());
0226     }
0227   }
0228 
0229   // Extract and fill Prescale information
0230 
0231   // Check various possibilities to get the HLT prescale sets:
0232   string prescaleName("");
0233   const string preS("PrescaleService");
0234   const string preT("PrescaleTable");
0235   if (processPSet_->existsAs<ParameterSet>(preS, true)) {
0236     prescaleName = preS;
0237   } else if (processPSet_->existsAs<ParameterSet>(preT, true)) {
0238     prescaleName = preT;
0239   }
0240   if (prescaleName.empty()) {
0241     hltPrescaleTable_ = HLTPrescaleTable();
0242   } else {
0243     const ParameterSet& iPS(processPSet_->getParameterSet(prescaleName));
0244     string defaultLabel("default");
0245     if (iPS.existsAs<string>("lvl1DefaultLabel", true)) {
0246       defaultLabel = iPS.getParameter<string>("lvl1DefaultLabel");
0247     }
0248     vector<string> labels;
0249     if (iPS.existsAs<vector<string>>("lvl1Labels", true)) {
0250       labels = iPS.getParameter<vector<string>>("lvl1Labels");
0251     }
0252     unsigned int set(0);
0253     const unsigned int n(labels.size());
0254     for (unsigned int i = 0; i != n; ++i) {
0255       if (labels[i] == defaultLabel)
0256         set = i;
0257     }
0258     map<string, vector<unsigned int>> table;
0259     if (iPS.existsAs<vector<ParameterSet>>("prescaleTable", true)) {
0260       const vector<ParameterSet>& vpTable(iPS.getParameterSetVector("prescaleTable"));
0261       const unsigned int m(vpTable.size());
0262       for (unsigned int i = 0; i != m; ++i) {
0263         table[vpTable[i].getParameter<std::string>("pathName")] =
0264             vpTable[i].getParameter<std::vector<unsigned int>>("prescales");
0265       }
0266     }
0267     if (n > 0) {
0268       hltPrescaleTable_ = HLTPrescaleTable(set, labels, table);
0269     } else {
0270       hltPrescaleTable_ = HLTPrescaleTable();
0271     }
0272   }
0273 
0274   // Determine L1T Type (0=unknown, 1=legacy/stage-1 or 2=stage-2)
0275   l1tType_ = 0;
0276   unsigned int stage1(0), stage2(0);
0277   if (processPSet_->existsAs<std::vector<std::string>>("@all_modules")) {
0278     const std::vector<std::string>& allModules(processPSet_->getParameter<std::vector<std::string>>("@all_modules"));
0279     for (auto const& allModule : allModules) {
0280       if ((moduleType(allModule) == "HLTLevel1GTSeed") or (moduleType(allModule) == "L1GlobalTrigger")) {
0281         stage1 += 1;
0282       } else if ((moduleType(allModule) == "HLTL1TSeed") or (moduleType(allModule) == "L1TGlobalProducer")) {
0283         stage2 += 1;
0284       }
0285     }
0286   }
0287   if ((stage1 + stage2) == 0) {
0288     l1tType_ = 0;
0289     //     edm::LogError("HLTConfigData") << " Can't identify l1tType: Process '" << processName_ << "' does not contain any identifying instances!";
0290   } else if ((stage1 * stage2) != 0) {
0291     l1tType_ = 0;
0292     //     edm::LogError("HLTConfigData") << " Can't identify l1tType: Process '" << processName_ << "' contains both legacy/stage-1/stage-2 instances!";
0293   } else if (stage1 > 0) {
0294     l1tType_ = 1;
0295     //     edm::LogError("HLTConfigData") << " Identified Process '" << processName_ << "' as legacy/stage-1 L1T!";
0296   } else {
0297     l1tType_ = 2;
0298     //     edm::LogError("HLTConfigData") << " Identified Process '" << processName_ << "' as stage-2 L1T!";
0299   }
0300 
0301   LogVerbatim("HLTConfigData") << "HLTConfigData: ProcessPSet with name/GT/table/l1tType: '" << processName_ << "' '"
0302                                << globalTag_ << "' '" << tableName_ << "' " << l1tType_;
0303 
0304   return;
0305 }
0306 
0307 void HLTConfigData::dump(const std::string& what) const {
0308   using namespace std;
0309   using namespace edm;
0310 
0311   if (what == "ProcessPSet") {
0312     cout << "HLTConfigData::dump: ProcessPSet = " << endl << *processPSet_ << endl;
0313   } else if (what == "ProcessName") {
0314     cout << "HLTConfigData::dump: ProcessName = " << processName_ << endl;
0315   } else if (what == "GlobalTag") {
0316     cout << "HLTConfigData::dump: GlobalTag = " << globalTag_ << endl;
0317   } else if (what == "TableName") {
0318     cout << "HLTConfigData::dump: TableName = " << tableName_ << endl;
0319   } else if (what == "Triggers") {
0320     const unsigned int n(size());
0321     cout << "HLTConfigData::dump: Triggers: " << n << endl;
0322     for (unsigned int i = 0; i != n; ++i) {
0323       cout << "  " << i << " " << triggerNames_[i] << endl;
0324     }
0325   } else if (what == "TriggerSeeds") {
0326     const unsigned int n(size());
0327     cout << "HLTConfigData::dump: TriggerSeeds: " << n << endl;
0328     for (unsigned int i = 0; i != n; ++i) {
0329       const unsigned int m1(hltL1GTSeeds_[i].size());
0330       const unsigned int m2(hltL1TSeeds_[i].size());
0331       cout << "  " << i << " " << triggerNames_[i] << " " << m1 << "/" << m2 << endl;
0332       if (m1 > 0) {
0333         for (unsigned int j1 = 0; j1 != m1; ++j1) {
0334           cout << "    HLTLevel1GTSeed: " << j1 << " " << hltL1GTSeeds_[i][j1].first << "/"
0335                << hltL1GTSeeds_[i][j1].second;
0336         }
0337         cout << endl;
0338       }
0339       if (m2 > 0) {
0340         for (unsigned int j2 = 0; j2 != m2; ++j2) {
0341           cout << "    HLTL1TSeed: " << j2 << " " << hltL1TSeeds_[i][j2];
0342         }
0343         cout << endl;
0344       }
0345     }
0346   } else if (what == "Modules") {
0347     const unsigned int n(size());
0348     cout << "HLTConfigData::dump Triggers and Modules: " << n << endl;
0349     for (unsigned int i = 0; i != n; ++i) {
0350       const unsigned int m(size(i));
0351       cout << i << " " << triggerNames_[i] << " " << m << endl;
0352       cout << " - Modules: ";
0353       unsigned int nHLTPrescalers(0);
0354       unsigned int nHLTLevel1GTSeed(0);
0355       unsigned int nHLTL1TSeed(0);
0356       for (unsigned int j = 0; j != m; ++j) {
0357         const string& label(moduleLabels_[i][j]);
0358         const string type(moduleType(label));
0359         const string edmtype(moduleEDMType(label));
0360         const bool tags(saveTags(label));
0361         cout << " " << j << ":" << label << "/" << type << "/" << edmtype << "/" << tags;
0362         if (type == "HLTPrescaler")
0363           nHLTPrescalers++;
0364         if (type == "HLTLevel1GTSeed")
0365           nHLTLevel1GTSeed++;
0366         if (type == "HLTL1TSeed")
0367           nHLTL1TSeed++;
0368       }
0369       cout << endl;
0370       cout << " - Number of HLTPrescaler/HLTLevel1GTSeed/HLTL1TSeed modules: " << nHLTPrescalers << "/"
0371            << nHLTLevel1GTSeed << "/" << nHLTL1TSeed << endl;
0372     }
0373   } else if (what == "StreamNames") {
0374     const unsigned int n(streamNames_.size());
0375     cout << "HLTConfigData::dump: StreamNames: " << n << endl;
0376     for (unsigned int i = 0; i != n; ++i) {
0377       cout << "  " << i << " " << streamNames_[i] << endl;
0378     }
0379   } else if (what == "Streams") {
0380     const unsigned int n(streamNames_.size());
0381     cout << "HLTConfigData::dump: Streams: " << n << endl;
0382     for (unsigned int i = 0; i != n; ++i) {
0383       const unsigned int m(streamContents_[i].size());
0384       cout << "  " << i << " " << streamNames_[i] << " " << m << endl;
0385       for (unsigned int j = 0; j != m; ++j) {
0386         cout << "    " << j << " " << streamContents_[i][j] << endl;
0387       }
0388     }
0389   } else if (what == "DatasetNames") {
0390     const unsigned int n(datasetNames_.size());
0391     cout << "HLTConfigData::dump: DatasetNames: " << n << endl;
0392     for (unsigned int i = 0; i != n; ++i) {
0393       cout << "  " << i << " " << datasetNames_[i] << endl;
0394     }
0395   } else if (what == "Datasets") {
0396     const unsigned int n(datasetNames_.size());
0397     cout << "HLTConfigData::dump: Datasets: " << n << endl;
0398     for (unsigned int i = 0; i != n; ++i) {
0399       const unsigned int m(datasetContents_[i].size());
0400       cout << "  " << i << " " << datasetNames_[i] << " " << m << endl;
0401       for (unsigned int j = 0; j != m; ++j) {
0402         cout << "    " << j << " " << datasetContents_[i][j] << endl;
0403       }
0404     }
0405   } else if (what == "PrescaleTable") {
0406     const unsigned int n(hltPrescaleTable_.size());
0407     cout << "HLTConfigData::dump: PrescaleTable: # of sets : " << n << endl;
0408     const vector<string>& labels(hltPrescaleTable_.labels());
0409     for (unsigned int i = 0; i != n; ++i) {
0410       cout << " " << i << "/'" << labels.at(i) << "'";
0411     }
0412     if (n > 0)
0413       cout << endl;
0414     const map<string, vector<unsigned int>>& table(hltPrescaleTable_.table());
0415     cout << "HLTConfigData::dump: PrescaleTable: # of paths: " << table.size() << endl;
0416     const map<string, vector<unsigned int>>::const_iterator tb(table.begin());
0417     const map<string, vector<unsigned int>>::const_iterator te(table.end());
0418     for (map<string, vector<unsigned int>>::const_iterator ti = tb; ti != te; ++ti) {
0419       for (unsigned int i = 0; i != n; ++i) {
0420         cout << " " << ti->second.at(i);
0421       }
0422       cout << " " << ti->first << endl;
0423     }
0424   } else {
0425     cout << "HLTConfigData::dump: Unkown dump request: " << what << endl;
0426   }
0427   return;
0428 }
0429 
0430 const std::string& HLTConfigData::processName() const { return processName_; }
0431 
0432 const std::string& HLTConfigData::globalTag() const { return globalTag_; }
0433 
0434 unsigned int HLTConfigData::size() const { return triggerNames_.size(); }
0435 unsigned int HLTConfigData::size(unsigned int trigger) const { return moduleLabels_.at(trigger).size(); }
0436 unsigned int HLTConfigData::size(const std::string& trigger) const { return size(triggerIndex(trigger)); }
0437 
0438 const std::string& HLTConfigData::tableName() const { return tableName_; }
0439 const std::vector<std::string>& HLTConfigData::triggerNames() const { return triggerNames_; }
0440 const std::string& HLTConfigData::triggerName(unsigned int trigger) const { return triggerNames_.at(trigger); }
0441 unsigned int HLTConfigData::triggerIndex(const std::string& trigger) const {
0442   const std::map<std::string, unsigned int>::const_iterator index(triggerIndex_.find(trigger));
0443   if (index == triggerIndex_.end()) {
0444     return size();
0445   } else {
0446     return index->second;
0447   }
0448 }
0449 
0450 const std::vector<std::string>& HLTConfigData::moduleLabels(unsigned int trigger) const {
0451   return moduleLabels_.at(trigger);
0452 }
0453 const std::vector<std::string>& HLTConfigData::moduleLabels(const std::string& trigger) const {
0454   return moduleLabels_.at(triggerIndex(trigger));
0455 }
0456 
0457 const std::vector<std::string>& HLTConfigData::saveTagsModules(unsigned int trigger) const {
0458   return saveTagsModules_.at(trigger);
0459 }
0460 const std::vector<std::string>& HLTConfigData::saveTagsModules(const std::string& trigger) const {
0461   return saveTagsModules_.at(triggerIndex(trigger));
0462 }
0463 
0464 const std::string& HLTConfigData::moduleLabel(unsigned int trigger, unsigned int module) const {
0465   return moduleLabels_.at(trigger).at(module);
0466 }
0467 const std::string& HLTConfigData::moduleLabel(const std::string& trigger, unsigned int module) const {
0468   return moduleLabels_.at(triggerIndex(trigger)).at(module);
0469 }
0470 
0471 unsigned int HLTConfigData::moduleIndex(unsigned int trigger, const std::string& module) const {
0472   const std::map<std::string, unsigned int>::const_iterator index(moduleIndex_.at(trigger).find(module));
0473   if (index == moduleIndex_.at(trigger).end()) {
0474     return size(trigger);
0475   } else {
0476     return index->second;
0477   }
0478 }
0479 unsigned int HLTConfigData::moduleIndex(const std::string& trigger, const std::string& module) const {
0480   return moduleIndex(triggerIndex(trigger), module);
0481 }
0482 
0483 const std::string HLTConfigData::moduleType(const std::string& module) const {
0484   const edm::ParameterSet& pset(modulePSet(module));
0485   if (pset.existsAs<std::string>("@module_type", true)) {
0486     return pset.getParameter<std::string>("@module_type");
0487   } else {
0488     return "";
0489   }
0490 }
0491 
0492 const std::string HLTConfigData::moduleEDMType(const std::string& module) const {
0493   const edm::ParameterSet& pset(modulePSet(module));
0494   if (pset.existsAs<std::string>("@module_edm_type", true)) {
0495     return pset.getParameter<std::string>("@module_edm_type");
0496   } else {
0497     return "";
0498   }
0499 }
0500 
0501 const edm::ParameterSet& HLTConfigData::processPSet() const { return *processPSet_; }
0502 
0503 const edm::ParameterSet& HLTConfigData::modulePSet(const std::string& module) const {
0504   //HLTConfigProvider sees ignored modules as "-modname"
0505   //but in the PSet, the module is named "modname"
0506   //so if it starts with "-", you need to remove the "-" from the
0507   //module name to be able to retreive it from the PSet
0508   if (processPSet_->exists(module.front() != '-' ? module : module.substr(1))) {
0509     return processPSet_->getParameterSet(module.front() != '-' ? module : module.substr(1));
0510   } else {
0511     return *s_dummyPSet();
0512   }
0513 }
0514 
0515 bool HLTConfigData::saveTags(const std::string& module) const {
0516   const edm::ParameterSet& pset(modulePSet(module));
0517   if (pset.existsAs<bool>("saveTags", true)) {
0518     return pset.getParameter<bool>("saveTags");
0519   } else {
0520     return false;
0521   }
0522 }
0523 
0524 unsigned int HLTConfigData::l1tType() const { return l1tType_; }
0525 
0526 const std::vector<std::vector<std::pair<bool, std::string>>>& HLTConfigData::hltL1GTSeeds() const {
0527   return hltL1GTSeeds_;
0528 }
0529 
0530 const std::vector<std::pair<bool, std::string>>& HLTConfigData::hltL1GTSeeds(const std::string& trigger) const {
0531   return hltL1GTSeeds(triggerIndex(trigger));
0532 }
0533 
0534 const std::vector<std::pair<bool, std::string>>& HLTConfigData::hltL1GTSeeds(unsigned int trigger) const {
0535   return hltL1GTSeeds_.at(trigger);
0536 }
0537 
0538 const std::vector<std::vector<std::string>>& HLTConfigData::hltL1TSeeds() const { return hltL1TSeeds_; }
0539 
0540 const std::vector<std::string>& HLTConfigData::hltL1TSeeds(const std::string& trigger) const {
0541   return hltL1TSeeds(triggerIndex(trigger));
0542 }
0543 
0544 const std::vector<std::string>& HLTConfigData::hltL1TSeeds(unsigned int trigger) const {
0545   return hltL1TSeeds_.at(trigger);
0546 }
0547 
0548 /// Streams
0549 const std::vector<std::string>& HLTConfigData::streamNames() const { return streamNames_; }
0550 
0551 const std::string& HLTConfigData::streamName(unsigned int stream) const { return streamNames_.at(stream); }
0552 
0553 unsigned int HLTConfigData::streamIndex(const std::string& stream) const {
0554   const std::map<std::string, unsigned int>::const_iterator index(streamIndex_.find(stream));
0555   if (index == streamIndex_.end()) {
0556     return streamNames_.size();
0557   } else {
0558     return index->second;
0559   }
0560 }
0561 
0562 const std::vector<std::vector<std::string>>& HLTConfigData::streamContents() const { return streamContents_; }
0563 
0564 const std::vector<std::string>& HLTConfigData::streamContent(unsigned int stream) const {
0565   return streamContents_.at(stream);
0566 }
0567 
0568 const std::vector<std::string>& HLTConfigData::streamContent(const std::string& stream) const {
0569   return streamContent(streamIndex(stream));
0570 }
0571 
0572 /// Datasets
0573 const std::vector<std::string>& HLTConfigData::datasetNames() const { return datasetNames_; }
0574 
0575 const std::string& HLTConfigData::datasetName(unsigned int dataset) const { return datasetNames_.at(dataset); }
0576 
0577 unsigned int HLTConfigData::datasetIndex(const std::string& dataset) const {
0578   const std::map<std::string, unsigned int>::const_iterator index(datasetIndex_.find(dataset));
0579   if (index == datasetIndex_.end()) {
0580     return datasetNames_.size();
0581   } else {
0582     return index->second;
0583   }
0584 }
0585 
0586 const std::vector<std::vector<std::string>>& HLTConfigData::datasetContents() const { return datasetContents_; }
0587 
0588 const std::vector<std::string>& HLTConfigData::datasetContent(unsigned int dataset) const {
0589   return datasetContents_.at(dataset);
0590 }
0591 
0592 const std::vector<std::string>& HLTConfigData::datasetContent(const std::string& dataset) const {
0593   return datasetContent(datasetIndex(dataset));
0594 }
0595 
0596 unsigned int HLTConfigData::prescaleSize() const { return hltPrescaleTable_.size(); }
0597 unsigned int HLTConfigData::prescaleValue(unsigned int set, const std::string& trigger) const {
0598   return hltPrescaleTable_.prescale(set, trigger);
0599 }
0600 
0601 const std::vector<std::string>& HLTConfigData::prescaleLabels() const { return hltPrescaleTable_.labels(); }
0602 const std::map<std::string, std::vector<unsigned int>>& HLTConfigData::prescaleTable() const {
0603   return hltPrescaleTable_.table();
0604 }
0605 
0606 edm::ParameterSetID HLTConfigData::id() const { return processPSet_->id(); }