added detector type

This commit is contained in:
maliakal_d 2019-08-22 10:58:03 +02:00
parent 3d78b7b6a7
commit 794b6f8090

View File

@ -86,7 +86,8 @@ class slsDetectorDefs {
GOTTHARD, /**< gotthard */ GOTTHARD, /**< gotthard */
JUNGFRAU, /**< jungfrau */ JUNGFRAU, /**< jungfrau */
CHIPTESTBOARD, /**< CTB */ CHIPTESTBOARD, /**< CTB */
MOENCH /**< moench */ MOENCH, /**< moench */
MYTHEN3 /** mythen3 */
}; };
/** /**
@ -576,8 +577,8 @@ format
}; };
/** returns detector type string from detector type index /** returns detector type string from detector type index
\param t string can be EIGER, GOTTHARD, JUNGFRAU, CHIPTESTBOARD \param t string can be EIGER, GOTTHARD, JUNGFRAU, CHIPTESTBOARD, MYTHEN3
\returns Eiger, Gotthard, Jungfrau, JungfrauCTB, Unknown \returns Eiger, Gotthard, Jungfrau, JungfrauCTB, Mythen3, Unknown
*/ */
static std::string detectorTypeToString(detectorType t) { static std::string detectorTypeToString(detectorType t) {
switch (t) { switch (t) {
@ -591,14 +592,16 @@ format
return std::string("JungfrauCTB"); return std::string("JungfrauCTB");
case MOENCH: case MOENCH:
return std::string("Moench"); return std::string("Moench");
case MYTHEN3:
return std::string("Mythen3");
default: default:
return std::string("Unknown"); return std::string("Unknown");
} }
}; };
/** returns detector type index from detector type string /** returns detector type index from detector type string
\param type can be Eiger, Gotthard, Jungfrau, JungfrauCTB \param type can be Eiger, Gotthard, Jungfrau, JungfrauCTB, Mythen3
\returns EIGER, GOTTHARD, JUNGFRAU, CHIPTESTBOARD, GENERIC \returns EIGER, GOTTHARD, JUNGFRAU, CHIPTESTBOARD, MYTHEN3, GENERIC
*/ */
static detectorType detectorTypeToEnum(const std::string &type) { static detectorType detectorTypeToEnum(const std::string &type) {
if (type == "Eiger") if (type == "Eiger")
@ -611,6 +614,8 @@ format
return CHIPTESTBOARD; return CHIPTESTBOARD;
if (type == "Moench") if (type == "Moench")
return MOENCH; return MOENCH;
if (type == "Mythen3")
return MYTHEN3;
return GENERIC; return GENERIC;
}; };