Main Page
Namespaces
Classes
Package Documentation
Geometry
CaloTopology
interface
HcalTopologyMode.h
Go to the documentation of this file.
1
#ifndef CALO_TOPOLOGY_HCAL_TOPOLOGY_MODE_H
2
#define CALO_TOPOLOGY_HCAL_TOPOLOGY_MODE_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
StringToEnumParser
11
{
12
std::map< std::string, T >
enumMap
;
13
public
:
14
15
StringToEnumParser
(
void
);
16
17
T
parseString
(
const
std::string
&
value
)
18
{
19
typename
std::map<std::string, T>::const_iterator iValue = enumMap.find( value );
20
if
( iValue == enumMap.end())
21
throw
cms::Exception
(
"Configuration"
)
22
<<
"the value "
<< value <<
" is not defined."
;
23
24
return
iValue->second;
25
}
26
};
27
28
namespace
HcalTopologyMode
{
29
enum
Mode
{
30
LHC
=0,
H2
=1,
SLHC
=2,
H2HE
=3 };
31
32
enum
TriggerMode
{
33
tm_LHC_PreLS1
=0
// HF is summed in 3x2 regions
34
};
35
}
36
37
38
#endif // CALO_TOPOLOGY_HCAL_TOPOLOGY_MODE_H
HcalTopologyMode::LHC
Definition:
HcalTopologyMode.h:30
HcalTopologyMode
Definition:
HcalTopologyMode.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition:
HcalTopologyMode.h:12
StringToEnumParser
Definition:
HcalTopologyMode.h:10
HcalTopologyMode::SLHC
Definition:
HcalTopologyMode.h:30
HcalTopologyMode::TriggerMode
TriggerMode
Definition:
HcalTopologyMode.h:32
HcalTopologyMode::Mode
Mode
Definition:
HcalTopologyMode.h:29
value
Definition:
value.py:1
Exception.h
HcalTopologyMode::H2HE
Definition:
HcalTopologyMode.h:30
cms::Exception
Definition:
Exception.h:67
StringToEnumParser::StringToEnumParser
StringToEnumParser(void)
HcalTopologyMode::tm_LHC_PreLS1
Definition:
HcalTopologyMode.h:33
T
long double T
Definition:
Basic3DVectorLD.h:66
HcalTopologyMode::H2
Definition:
HcalTopologyMode.h:30
StringToEnumParser::parseString
T parseString(const std::string &value)
Definition:
HcalTopologyMode.h:17
Generated for CMSSW Reference Manual by
1.8.11