CMS 3D CMS Logo

CmsMTDStringToEnum.cc
Go to the documentation of this file.
2 
4 
6  _map.emplace("FastTimerRegion", GeometricTimingDet::MTD);
7  _map.emplace("BarrelTimingLayer", GeometricTimingDet::BTL);
8  _map.emplace("Layer1", GeometricTimingDet::BTLLayer);
9  _map.emplace("Layer1Timing", GeometricTimingDet::BTLLayer);
10  _map.emplace("BModule", GeometricTimingDet::BTLModule);
11  _map.emplace("EndcapTimingLayer", GeometricTimingDet::ETL);
12  _map.emplace("Disc1", GeometricTimingDet::ETLDisc);
13  _map.emplace("Disc1Timing", GeometricTimingDet::ETLDisc);
14  _map.emplace("Disc2Timing", GeometricTimingDet::ETLDisc);
15  _map.emplace("EModule", GeometricTimingDet::ETLModule);
16 }
17 
19  // remove namespace if present
20  std::string_view v = s;
21  auto first = v.find_first_of(":");
22  v.remove_prefix(std::min(first + 1, v.size()));
23  MapEnumType::const_iterator p = map().find({v.data(), v.size()});
24  if (p != map().end())
25  return p->second;
27 }
CmsMTDStringToEnum::Impl::_map
MapEnumType _map
Definition: CmsMTDStringToEnum.h:24
min
T min(T a, T b)
Definition: MathUtil.h:58
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GeometricTimingDet::BTLModule
Definition: GeometricTimingDet.h:56
findQualityFiles.v
v
Definition: findQualityFiles.py:179
dqmdumpme.first
first
Definition: dqmdumpme.py:55
alignCSCRings.s
s
Definition: alignCSCRings.py:92
GeometricTimingDet::ETLDisc
Definition: GeometricTimingDet.h:60
CmsMTDStringToEnum::Impl
Definition: CmsMTDStringToEnum.h:22
CmsMTDStringToEnum::m_impl
static const Impl m_impl
Definition: CmsMTDStringToEnum.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometricTimingDet::ETL
Definition: GeometricTimingDet.h:59
GeometricTimingDet::MTD
Definition: GeometricTimingDet.h:52
CmsMTDStringToEnum::type
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
Definition: CmsMTDStringToEnum.cc:18
CmsMTDStringToEnum::map
static MapEnumType const & map()
Definition: CmsMTDStringToEnum.h:19
GeometricTimingDet::BTLLayer
Definition: GeometricTimingDet.h:54
GeometricTimingDet::BTL
Definition: GeometricTimingDet.h:53
GeometricTimingDet::GeometricTimingEnumType
enum GeometricTimingDet::GTDEnumType GeometricTimingEnumType
GeometricTimingDet::ETLModule
Definition: GeometricTimingDet.h:62
CmsMTDStringToEnum.h
CmsMTDStringToEnum::Impl::Impl
Impl()
Definition: CmsMTDStringToEnum.cc:5
GeometricTimingDet::unknown
Definition: GeometricTimingDet.h:51