Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 13:03:45

0001 #include "Geometry/MTDCommonData/interface/MTDTopologyMode.h"
0002 
0003 #include <string>
0004 
0005 namespace MTDTopologyMode {
0006 
0007   Mode MTDStringToEnumParser(const std::string &value) {
0008     std::string prefix("MTDTopologyMode::");
0009     Mode output = Mode::undefined;
0010     if (value == prefix + "tile") {
0011       output = Mode::tile;
0012     } else if (value == prefix + "bar") {
0013       output = Mode::bar;
0014     } else if (value == prefix + "barzflat") {
0015       output = Mode::barzflat;
0016     } else if (value == prefix + "barphiflat") {
0017       output = Mode::barphiflat;
0018     } else if (value == prefix + "btlv1etlv4") {
0019       output = Mode::btlv1etlv4;
0020     } else if (value == prefix + "btlv1etlv5") {
0021       output = Mode::btlv1etlv5;
0022     } else if (value == prefix + "btlv2etlv5") {
0023       output = Mode::btlv2etlv5;
0024     } else {
0025       throw cms::Exception("MTDTopologyModeError") << "the value " << value << " is not defined.";
0026     }
0027     return output;
0028   }
0029 
0030 }  // namespace MTDTopologyMode