Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:53

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 {
0023       throw cms::Exception("MTDTopologyModeError") << "the value " << value << " is not defined.";
0024     }
0025     return output;
0026   }
0027 
0028 }  // namespace MTDTopologyMode