Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:45

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 { LHC = 0, H2 = 1, SLHC = 2, H2HE = 3 };
0027 
0028   enum TriggerMode {
0029     TriggerMode_2009 = 0,        // HF is summed in 3x2 regions
0030     TriggerMode_2016 = 1,        // HF is summed in both 3x2 and 1x1 regions
0031     TriggerMode_2018legacy = 2,  // For the database, before 2017 and 2017plan1 was introduced
0032     TriggerMode_2017 = 3,        // HF upgraded to QIE10
0033     TriggerMode_2017plan1 = 4,   // HF upgraded to QIE10, 1 RBX of HE to QIE11
0034     TriggerMode_2018 = 5,        // HF upgraded to QIE10, HE to QIE11
0035     TriggerMode_2021 = 6         // HF upgraded to QIE10, HBHE to QIE11
0036   };
0037 }  // namespace HcalTopologyMode
0038 
0039 #endif  // Geometry_HcalCommonData_HcalTopologyMode_H