CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
12  std::map< std::string, T > enumMap;
13 public:
14 
15  StringToEnumParser( void );
16 
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
std::map< std::string, T > enumMap
long double T
T parseString(const std::string &value)