test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerNames.cc
Go to the documentation of this file.
1 
4 
5 namespace edm {
6 
8 
10 
11  triggerNames_ = pset.getParameter<Strings>("@trigger_paths");
12 
13  unsigned int index = 0;
14  for (Strings::const_iterator iName = triggerNames_.begin(),
15  iEnd = triggerNames_.end();
16  iName != iEnd;
17  ++iName, ++index) {
18  indexMap_[*iName] = index;
19  }
20  psetID_ = pset.id();
21  }
22 
25 
26  std::string const&
27  TriggerNames::triggerName(unsigned int index) const {
28  return triggerNames_.at(index);
29  }
30 
31  unsigned int
33  IndexMap::const_iterator const pos = indexMap_.find(name);
34  if (pos == indexMap_.end()) return indexMap_.size();
35  return pos->second;
36  }
37 
39  TriggerNames::size() const { return triggerNames_.size(); }
40 
41  ParameterSetID const&
43 }
T getParameter(std::string const &) const
Definition: Hash.h:42
ParameterSetID id() const
Strings::size_type size() const
Definition: TriggerNames.cc:39
IndexMap indexMap_
Definition: TriggerNames.h:89
uint16_t size_type
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
std::vector< std::string > Strings
Definition: TriggerNames.h:59
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
Strings triggerNames_
Definition: TriggerNames.h:88
ParameterSetID psetID_
Definition: TriggerNames.h:86