CMS 3D CMS Logo

TriggerNames.cc
Go to the documentation of this file.
1 
4 
5 namespace edm {
6 
8 
10  triggerNames_ = pset.getParameter<Strings>("@trigger_paths");
11 
12  unsigned int index = 0;
13  for (Strings::const_iterator iName = triggerNames_.begin(), iEnd = triggerNames_.end(); iName != iEnd;
14  ++iName, ++index) {
15  indexMap_[*iName] = index;
16  }
17  psetID_ = pset.id();
18  }
19 
21 
22  std::string const& TriggerNames::triggerName(unsigned int index) const { return triggerNames_.at(index); }
23 
24  unsigned int TriggerNames::triggerIndex(const std::string& name) const {
25  IndexMap::const_iterator const pos = indexMap_.find(name);
26  if (pos == indexMap_.end())
27  return indexMap_.size();
28  return pos->second;
29  }
30 
32 
34 } // namespace edm
edm::TriggerNames::TriggerNames
TriggerNames()
Definition: TriggerNames.cc:7
edm::TriggerNames::parameterSetID
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:33
edm
HLT enums.
Definition: AlignableModifier.h:19
pos
Definition: PixelAliasList.h:18
edm::TriggerNames::triggerNames_
Strings triggerNames_
Definition: TriggerNames.h:85
edm::TriggerNames::Strings
std::vector< std::string > Strings
Definition: TriggerNames.h:57
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::TriggerNames::indexMap_
IndexMap indexMap_
Definition: TriggerNames.h:86
edm::Hash< ParameterSetType >
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
TriggerNames.h
edm::TriggerNames::triggerName
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
edm::TriggerNames::psetID_
ParameterSetID psetID_
Definition: TriggerNames.h:83
edm::TriggerNames::size
Strings::size_type size() const
Definition: TriggerNames.cc:31
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ParameterSet.h
edm::TriggerNames::triggerIndex
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:24
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27