src
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 <algorithm>
5
#include <map>
6
#include <string>
7
#include "
FWCore/Utilities/interface/Exception.h
"
8
9
template
<
typename
T>
10
class
HGCalStringToEnumParser
{
11
std::map<std::string, T>
enumMap
;
12
13
public
:
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
<<
" is not defined."
;
20
return
itr->second;
21
}
22
};
23
24
namespace
HGCalGeometryMode
{
25
enum
GeometryMode
{
26
Square
= 0,
27
Hexagon
= 1,
28
HexagonFull
= 2,
29
Hexagon8
= 3,
30
Hexagon8Full
= 4,
31
Trapezoid
= 5,
32
Hexagon8File
= 6,
33
TrapezoidFile
= 7,
34
Hexagon8Module
= 8,
35
TrapezoidModule
= 9,
36
Hexagon8Cassette
= 10,
37
TrapezoidCassette
= 11,
38
};
39
enum
WaferMode
{
Polyhedra
= 0,
ExtrudedPolygon
= 1 };
40
}
// namespace HGCalGeometryMode
41
42
#endif
HGCalGeometryMode::Hexagon8
Definition:
HGCalGeometryMode.h:29
HGCalGeometryMode::Polyhedra
Definition:
HGCalGeometryMode.h:39
HGCalStringToEnumParser
Definition:
HGCalGeometryMode.h:10
HGCalStringToEnumParser::parseString
T parseString(const std::string &value)
Definition:
HGCalGeometryMode.h:16
HGCalGeometryMode::Trapezoid
Definition:
HGCalGeometryMode.h:31
HGCalGeometryMode::Hexagon8File
Definition:
HGCalGeometryMode.h:32
HGCalGeometryMode::WaferMode
WaferMode
Definition:
HGCalGeometryMode.h:39
HGCalGeometryMode::GeometryMode
GeometryMode
Definition:
HGCalGeometryMode.h:25
HGCalGeometryMode::Hexagon
Definition:
HGCalGeometryMode.h:27
HGCalGeometryMode
Definition:
HGCalGeometryMode.h:24
HGCalGeometryMode::Hexagon8Cassette
Definition:
HGCalGeometryMode.h:36
HGCalGeometryMode::ExtrudedPolygon
Definition:
HGCalGeometryMode.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalGeometryMode::Hexagon8Module
Definition:
HGCalGeometryMode.h:34
HGCalGeometryMode::TrapezoidCassette
Definition:
HGCalGeometryMode.h:37
HGCalStringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition:
HGCalGeometryMode.h:11
HGCalGeometryMode::Square
Definition:
HGCalGeometryMode.h:26
HGCalGeometryMode::Hexagon8Full
Definition:
HGCalGeometryMode.h:30
value
Definition:
value.py:1
Exception.h
HGCalGeometryMode::TrapezoidModule
Definition:
HGCalGeometryMode.h:35
HGCalStringToEnumParser::HGCalStringToEnumParser
HGCalStringToEnumParser(void)
cms::Exception
Definition:
Exception.h:70
HGCalGeometryMode::TrapezoidFile
Definition:
HGCalGeometryMode.h:33
HGCalGeometryMode::HexagonFull
Definition:
HGCalGeometryMode.h:28
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.14