Main Page
Namespaces
Classes
Package Documentation
Geometry
HGCalCommonData
interface
HGCalGeometryMode.h
Go to the documentation of this file.
1
#ifndef Geometry_HGCalCommonData_HGCalGeometryMode_H
2
#define Geometry_HGCalCommonData_HGCalGeometryMode_H
3
4
#include "
FWCore/Utilities/interface/Exception.h
"
5
#include <map>
6
#include <string>
7
#include <algorithm>
8
9
template
<
typename
T >
10
class
HGCalStringToEnumParser
{
11
std::map<std::string, T>
enumMap
;
12
public
:
13
14
HGCalStringToEnumParser
(
void
);
15
16
T
parseString
(
const
std::string
&
value
) {
17
typename
std::map<std::string, T>::const_iterator itr = enumMap.find(value);
18
if
(itr == enumMap.end())
19
throw
cms::Exception
(
"Configuration"
) <<
"the value "
<< value
20
<<
" is not defined."
;
21
return
itr->second;
22
}
23
};
24
25
namespace
HGCalGeometryMode
{
26
enum
GeometryMode
{
Square
=0,
Hexagon
=1,
HexagonFull
=2 };
27
enum
WaferMode
{
Polyhedra
=0,
ExtrudedPolygon
=1};
28
}
29
30
#endif
HGCalGeometryMode::Polyhedra
Definition:
HGCalGeometryMode.h:27
HGCalStringToEnumParser
Definition:
HGCalGeometryMode.h:10
HGCalStringToEnumParser::parseString
T parseString(const std::string &value)
Definition:
HGCalGeometryMode.h:16
HGCalGeometryMode::WaferMode
WaferMode
Definition:
HGCalGeometryMode.h:27
HGCalGeometryMode::GeometryMode
GeometryMode
Definition:
HGCalGeometryMode.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
HGCalGeometryMode::Hexagon
Definition:
HGCalGeometryMode.h:26
HGCalGeometryMode
Definition:
HGCalGeometryMode.h:25
HGCalGeometryMode::ExtrudedPolygon
Definition:
HGCalGeometryMode.h:27
HGCalStringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition:
HGCalGeometryMode.h:11
HGCalGeometryMode::Square
Definition:
HGCalGeometryMode.h:26
value
Definition:
value.py:1
Exception.h
HGCalStringToEnumParser::HGCalStringToEnumParser
HGCalStringToEnumParser(void)
cms::Exception
Definition:
Exception.h:67
HGCalGeometryMode::HexagonFull
Definition:
HGCalGeometryMode.h:26
T
long double T
Definition:
Basic3DVectorLD.h:57
Generated for CMSSW Reference Manual by
1.8.11