CMS 3D CMS Logo

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 
5 #include <map>
6 #include <string>
7 #include <algorithm>
8 
9 template <typename T>
11  std::map<std::string, T> enumMap;
12 
13 public:
14  StringToEnumParser(void);
15 
17  typename std::map<std::string, T>::const_iterator iValue = enumMap.find(value);
18  if (iValue == enumMap.end())
19  throw cms::Exception("Configuration") << "the value " << value << " is not defined.";
20 
21  return iValue->second;
22  }
23 };
24 
25 namespace HcalTopologyMode {
26  enum Mode { LHC = 0, H2 = 1, SLHC = 2, H2HE = 3 };
27 
28  enum TriggerMode {
29  tm_LHC_PreLS1 = 0 // HF is summed in 3x2 regions
30  };
31 } // namespace HcalTopologyMode
32 
33 #endif // CALO_TOPOLOGY_HCAL_TOPOLOGY_MODE_H
HcalTopologyMode::Mode
Mode
Definition: HcalTopologyMode.h:26
StringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition: HcalTopologyMode.h:11
HcalTopologyMode
Definition: HcalTopologyMode.h:25
HcalTopologyMode::LHC
Definition: HcalTopologyMode.h:26
HcalTopologyMode::SLHC
Definition: HcalTopologyMode.h:26
HcalTopologyMode::H2HE
Definition: HcalTopologyMode.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
StringToEnumParser::parseString
T parseString(const std::string &value)
Definition: HcalTopologyMode.h:16
value
Definition: value.py:1
HcalTopologyMode::tm_LHC_PreLS1
Definition: HcalTopologyMode.h:29
T
long double T
Definition: Basic3DVectorLD.h:48
HcalTopologyMode::H2
Definition: HcalTopologyMode.h:26
Exception.h
HcalTopologyMode::TriggerMode
TriggerMode
Definition: HcalTopologyMode.h:28
StringToEnumParser::StringToEnumParser
StringToEnumParser(void)
cms::Exception
Definition: Exception.h:70
StringToEnumParser
Definition: HcalTopologyMode.h:10