File indexing completed on 2024-10-14 10:08:27
0001 #ifndef Geometry_HcalCommonData_HcalTopologyMode_H
0002 #define Geometry_HcalCommonData_HcalTopologyMode_H
0003
0004 #include "FWCore/Utilities/interface/Exception.h"
0005 #include <map>
0006 #include <string>
0007 #include <algorithm>
0008
0009 template <typename T>
0010 class StringToEnumParser {
0011 std::map<std::string, T> enumMap;
0012
0013 public:
0014 StringToEnumParser(void);
0015
0016 T parseString(const std::string &value) {
0017 typename std::map<std::string, T>::const_iterator iValue = enumMap.find(value);
0018 if (iValue == enumMap.end())
0019 throw cms::Exception("Configuration") << "the value " << value << " is not defined.";
0020
0021 return iValue->second;
0022 }
0023 };
0024
0025 namespace HcalTopologyMode {
0026 enum Mode {
0027 LHC = 0,
0028 H2 = 1,
0029 SLHC = 2,
0030 H2HE = 3,
0031 Run3 = 4,
0032 Run4 = 5,
0033 Run2A = 6,
0034 Run2B = 7,
0035 Run2C = 8
0036 };
0037
0038 enum TriggerMode {
0039 TriggerMode_2009 = 0,
0040 TriggerMode_2016 = 1,
0041 TriggerMode_2018legacy = 2,
0042 TriggerMode_2017 = 3,
0043 TriggerMode_2017plan1 = 4,
0044 TriggerMode_2018 = 5,
0045 TriggerMode_2021 = 6
0046 };
0047 }
0048
0049 #endif