Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 if (value == prefix + "btlv3etlv8") {
0025       output = Mode::btlv3etlv8;
0026     } else {
0027       throw cms::Exception("MTDTopologyModeError") << "the value " << value << " is not defined.";
0028     }
0029     return output;
0030   }
0031 
0032 }  // namespace MTDTopologyMode