File indexing completed on 2024-04-06 12:05:14
0001 #include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
0002
0003
0004
0005 std::string SiStripEnumsAndStrings::view(const sistrip::View& view) {
0006 if (view == sistrip::READOUT_VIEW) {
0007 return sistrip::readoutView_;
0008 } else if (view == sistrip::CONTROL_VIEW) {
0009 return sistrip::controlView_;
0010 } else if (view == sistrip::DETECTOR_VIEW) {
0011 return sistrip::detectorView_;
0012 } else if (view == sistrip::UNDEFINED_VIEW) {
0013 return sistrip::undefinedView_;
0014 } else {
0015 return sistrip::unknownView_;
0016 }
0017 }
0018
0019
0020
0021 sistrip::View SiStripEnumsAndStrings::view(const std::string& dir) {
0022 if (dir.find(sistrip::readoutView_) != std::string::npos) {
0023 return sistrip::READOUT_VIEW;
0024 } else if (dir.find(sistrip::controlView_) != std::string::npos) {
0025 return sistrip::CONTROL_VIEW;
0026 } else if (dir.find(sistrip::detectorView_) != std::string::npos) {
0027 return sistrip::DETECTOR_VIEW;
0028 } else if (dir.find(sistrip::undefinedView_) != std::string::npos) {
0029 return sistrip::UNDEFINED_VIEW;
0030 } else if (dir.empty()) {
0031 return sistrip::UNDEFINED_VIEW;
0032 } else {
0033 return sistrip::UNKNOWN_VIEW;
0034 }
0035 }
0036
0037
0038
0039 std::string SiStripEnumsAndStrings::runType(const sistrip::RunType& run_type) {
0040 if (run_type == sistrip::FAST_CABLING) {
0041 return sistrip::fastCablingRun_;
0042 } else if (run_type == sistrip::FED_CABLING) {
0043 return sistrip::fedCablingRun_;
0044 } else if (run_type == sistrip::APV_TIMING) {
0045 return sistrip::apvTimingRun_;
0046 } else if (run_type == sistrip::FED_TIMING) {
0047 return sistrip::fedTimingRun_;
0048 } else if (run_type == sistrip::OPTO_SCAN) {
0049 return sistrip::optoScanRun_;
0050 } else if (run_type == sistrip::VPSP_SCAN) {
0051 return sistrip::vpspScanRun_;
0052 } else if (run_type == sistrip::PEDESTALS) {
0053 return sistrip::pedestalsRun_;
0054 } else if (run_type == sistrip::PEDS_ONLY) {
0055 return sistrip::pedsOnlyRun_;
0056 } else if (run_type == sistrip::NOISE) {
0057 return sistrip::noiseRun_;
0058 } else if (run_type == sistrip::PEDS_FULL_NOISE) {
0059 return sistrip::pedsFullNoiseRun_;
0060 } else if (run_type == sistrip::APV_LATENCY) {
0061 return sistrip::apvLatencyRun_;
0062 } else if (run_type == sistrip::FINE_DELAY) {
0063 return sistrip::fineDelayRun_;
0064 } else if (run_type == sistrip::CALIBRATION) {
0065 return sistrip::calibPeakRun_;
0066 } else if (run_type == sistrip::CALIBRATION_DECO) {
0067 return sistrip::calibDeconRun_;
0068 } else if (run_type == sistrip::CALIBRATION_SCAN) {
0069 return sistrip::calibScanPeakRun_;
0070 } else if (run_type == sistrip::CALIBRATION_SCAN_DECO) {
0071 return sistrip::calibScanDeconRun_;
0072 } else if (run_type == sistrip::DAQ_SCOPE_MODE) {
0073 return sistrip::daqScopeModeRun_;
0074 } else if (run_type == sistrip::PHYSICS) {
0075 return sistrip::physicsRun_;
0076 } else if (run_type == sistrip::UNDEFINED_RUN_TYPE) {
0077 return sistrip::undefinedRunType_;
0078 } else {
0079 return sistrip::unknownRunType_;
0080 }
0081 }
0082
0083
0084
0085 sistrip::RunType SiStripEnumsAndStrings::runType(const std::string& run_type) {
0086 if (run_type.find(sistrip::fastCablingRun_) != std::string::npos) {
0087 return sistrip::FAST_CABLING;
0088 } else if (run_type.find(sistrip::fedCablingRun_) != std::string::npos) {
0089 return sistrip::FED_CABLING;
0090 } else if (run_type.find(sistrip::apvTimingRun_) != std::string::npos) {
0091 return sistrip::APV_TIMING;
0092 } else if (run_type.find(sistrip::fedTimingRun_) != std::string::npos) {
0093 return sistrip::FED_TIMING;
0094 } else if (run_type.find(sistrip::optoScanRun_) != std::string::npos) {
0095 return sistrip::OPTO_SCAN;
0096 } else if (run_type.find(sistrip::vpspScanRun_) != std::string::npos) {
0097 return sistrip::VPSP_SCAN;
0098 } else if (run_type.find(sistrip::pedestalsRun_) != std::string::npos) {
0099 return sistrip::PEDESTALS;
0100 } else if (run_type.find(sistrip::pedsOnlyRun_) != std::string::npos) {
0101 return sistrip::PEDS_ONLY;
0102 } else if (run_type.find(sistrip::pedsFullNoiseRun_) != std::string::npos) {
0103 return sistrip::PEDS_FULL_NOISE;
0104 }
0105 else if (run_type.find(sistrip::noiseRun_) != std::string::npos) {
0106 return sistrip::NOISE;
0107 } else if (run_type.find(sistrip::fineDelayRun_) != std::string::npos) {
0108 return sistrip::FINE_DELAY;
0109 } else if (run_type.find(sistrip::calibPeakRun_) != std::string::npos) {
0110 return sistrip::CALIBRATION;
0111 } else if (run_type.find(sistrip::calibScanPeakRun_) != std::string::npos) {
0112 return sistrip::CALIBRATION_SCAN;
0113 } else if (run_type.find(sistrip::calibDeconRun_) != std::string::npos) {
0114 return sistrip::CALIBRATION_DECO;
0115 } else if (run_type.find(sistrip::calibScanDeconRun_) != std::string::npos) {
0116 return sistrip::CALIBRATION_SCAN_DECO;
0117 } else if (run_type.find(sistrip::apvLatencyRun_) != std::string::npos) {
0118 return sistrip::APV_LATENCY;
0119 } else if (run_type.find(sistrip::daqScopeModeRun_) != std::string::npos) {
0120 return sistrip::DAQ_SCOPE_MODE;
0121 } else if (run_type.find(sistrip::physicsRun_) != std::string::npos) {
0122 return sistrip::PHYSICS;
0123 } else if (run_type.find(sistrip::undefinedRunType_) != std::string::npos) {
0124 return sistrip::UNDEFINED_RUN_TYPE;
0125 } else if (run_type.empty()) {
0126 return sistrip::UNDEFINED_RUN_TYPE;
0127 } else if (run_type == "FAST_CABLING") {
0128 return sistrip::FAST_CABLING;
0129 } else if (run_type == "FED_CABLING") {
0130 return sistrip::FED_CABLING;
0131 } else if (run_type == "APV_TIMING") {
0132 return sistrip::APV_TIMING;
0133 } else if (run_type == "FED_TIMING") {
0134 return sistrip::FED_TIMING;
0135 } else if (run_type == "OPTO_SCAN") {
0136 return sistrip::OPTO_SCAN;
0137 } else if (run_type == "VPSP_SCAN") {
0138 return sistrip::VPSP_SCAN;
0139 } else if (run_type == "PEDESTALS") {
0140 return sistrip::PEDESTALS;
0141 } else if (run_type == "PEDS_FULL_NOISE") {
0142 return sistrip::PEDS_FULL_NOISE;
0143 } else if (run_type == "PEDS_ONLY") {
0144 return sistrip::PEDS_ONLY;
0145 } else if (run_type == "NOISE") {
0146 return sistrip::NOISE;
0147 } else if (run_type == "APV_LATENCY") {
0148 return sistrip::APV_LATENCY;
0149 } else if (run_type == "FINE_DELAY") {
0150 return sistrip::FINE_DELAY;
0151 } else if (run_type == "CALIBRATION") {
0152 return sistrip::CALIBRATION;
0153 } else if (run_type == "CALIBRATION_SCAN") {
0154 return sistrip::CALIBRATION_SCAN;
0155 } else if (run_type == "CALIBRATION_DECO") {
0156 return sistrip::CALIBRATION_DECO;
0157 } else if (run_type == "CALIBRATION_SCAN_DECO") {
0158 return sistrip::CALIBRATION_SCAN_DECO;
0159 } else if (run_type == "DAQ_SCOPE_MODE") {
0160 return sistrip::DAQ_SCOPE_MODE;
0161 } else if (run_type == "PHYSICS") {
0162 return sistrip::PHYSICS;
0163 } else if (run_type == "UNDEFINED") {
0164 return sistrip::UNDEFINED_RUN_TYPE;
0165 } else {
0166 return sistrip::UNKNOWN_RUN_TYPE;
0167 }
0168 }
0169
0170
0171
0172 sistrip::RunType SiStripEnumsAndStrings::runType(const uint16_t& run_type) {
0173 if (run_type == 1) {
0174 return sistrip::PHYSICS;
0175 } else if (run_type == 2) {
0176 return sistrip::PEDESTALS;
0177 } else if (run_type == 3) {
0178 return sistrip::CALIBRATION;
0179 } else if (run_type == 4) {
0180 return sistrip::OPTO_SCAN;
0181 } else if (run_type == 5) {
0182 return sistrip::APV_TIMING;
0183 } else if (run_type == 6) {
0184 return sistrip::APV_LATENCY;
0185 } else if (run_type == 7) {
0186 return sistrip::FINE_DELAY_PLL;
0187 } else if (run_type == 8) {
0188 return sistrip::FINE_DELAY_TTC;
0189 } else if (run_type == 10) {
0190 return sistrip::MULTI_MODE;
0191 } else if (run_type == 11) {
0192 return sistrip::FED_CABLING;
0193 } else if (run_type == 12) {
0194 return sistrip::FED_TIMING;
0195 } else if (run_type == 13) {
0196 return sistrip::FED_CABLING;
0197 } else if (run_type == 14) {
0198 return sistrip::VPSP_SCAN;
0199 } else if (run_type == 15) {
0200 return sistrip::DAQ_SCOPE_MODE;
0201 } else if (run_type == 16) {
0202 return sistrip::QUITE_FAST_CABLING;
0203 } else if (run_type == 17) {
0204 return sistrip::FINE_DELAY;
0205 }
0206 else if (run_type == 18) {
0207 return sistrip::PHYSICS_ZS;
0208 } else if (run_type == 19) {
0209 return sistrip::CALIBRATION_SCAN;
0210 } else if (run_type == 20) {
0211 return sistrip::CALIBRATION_SCAN_DECO;
0212 } else if (run_type == 21) {
0213 return sistrip::FAST_CABLING;
0214 } else if (run_type == 22) {
0215 return sistrip::PEDS_ONLY;
0216 } else if (run_type == 23) {
0217 return sistrip::NOISE;
0218 } else if (run_type == 24) {
0219 return sistrip::PEDS_FULL_NOISE;
0220 } else if (run_type == 33) {
0221 return sistrip::CALIBRATION_DECO;
0222 } else if (run_type == sistrip::invalid_) {
0223 return sistrip::UNDEFINED_RUN_TYPE;
0224 } else {
0225 return sistrip::UNKNOWN_RUN_TYPE;
0226 }
0227 }
0228
0229
0230
0231 std::string SiStripEnumsAndStrings::keyType(const sistrip::KeyType& key_type) {
0232 if (key_type == sistrip::FED_KEY) {
0233 return sistrip::fedKey_;
0234 } else if (key_type == sistrip::FEC_KEY) {
0235 return sistrip::fecKey_;
0236 } else if (key_type == sistrip::DET_KEY) {
0237 return sistrip::detKey_;
0238 } else if (key_type == sistrip::UNDEFINED_KEY) {
0239 return sistrip::undefinedKey_;
0240 } else {
0241 return sistrip::unknownKey_;
0242 }
0243 }
0244
0245
0246
0247 sistrip::KeyType SiStripEnumsAndStrings::keyType(const std::string& key_type) {
0248 if (key_type.find(sistrip::fedKey_) != std::string::npos) {
0249 return sistrip::FED_KEY;
0250 } else if (key_type.find(sistrip::fecKey_) != std::string::npos) {
0251 return sistrip::FEC_KEY;
0252 } else if (key_type.find(sistrip::detKey_) != std::string::npos) {
0253 return sistrip::DET_KEY;
0254 } else if (key_type.find(sistrip::undefinedKey_) != std::string::npos) {
0255 return sistrip::UNDEFINED_KEY;
0256 } else if (key_type.empty()) {
0257 return sistrip::UNDEFINED_KEY;
0258 } else {
0259 return sistrip::UNKNOWN_KEY;
0260 }
0261 }
0262
0263
0264
0265 std::string SiStripEnumsAndStrings::granularity(const sistrip::Granularity& granularity) {
0266
0267 if (granularity == sistrip::TRACKER) {
0268 return sistrip::tracker_;
0269 } else if (granularity == sistrip::PARTITION) {
0270 return sistrip::partition_;
0271 } else if (granularity == sistrip::TIB) {
0272 return sistrip::tib_;
0273 } else if (granularity == sistrip::TOB) {
0274 return sistrip::tob_;
0275 } else if (granularity == sistrip::TEC) {
0276 return sistrip::tec_;
0277 }
0278
0279 else if (granularity == sistrip::LAYER) {
0280 return sistrip::layer_;
0281 } else if (granularity == sistrip::ROD) {
0282 return sistrip::rod_;
0283 } else if (granularity == sistrip::STRING) {
0284 return sistrip::string_;
0285 } else if (granularity == sistrip::DISK) {
0286 return sistrip::disk_;
0287 } else if (granularity == sistrip::PETAL) {
0288 return sistrip::petal_;
0289 } else if (granularity == sistrip::RING) {
0290 return sistrip::ring_;
0291 }
0292
0293 else if (granularity == sistrip::MODULE) {
0294 return sistrip::module_;
0295 } else if (granularity == sistrip::LLD_CHAN) {
0296 return sistrip::lldChan_;
0297 } else if (granularity == sistrip::APV) {
0298 return sistrip::apv_;
0299 }
0300
0301 else if (granularity == sistrip::FED_SYSTEM) {
0302 return sistrip::fedSystem_;
0303 } else if (granularity == sistrip::FE_DRIVER) {
0304 return sistrip::feDriver_;
0305 } else if (granularity == sistrip::FE_UNIT) {
0306 return sistrip::feUnit_;
0307 } else if (granularity == sistrip::FE_CHAN) {
0308 return sistrip::feChan_;
0309 } else if (granularity == sistrip::FED_APV) {
0310 return sistrip::fedApv_;
0311 } else if (granularity == sistrip::FED_CHANNEL) {
0312 return sistrip::fedChannel_;
0313 }
0314
0315 else if (granularity == sistrip::FEC_SYSTEM) {
0316 return sistrip::fecSystem_;
0317 } else if (granularity == sistrip::FEC_CRATE) {
0318 return sistrip::fecCrate_;
0319 } else if (granularity == sistrip::FEC_SLOT) {
0320 return sistrip::fecSlot_;
0321 } else if (granularity == sistrip::FEC_RING) {
0322 return sistrip::fecRing_;
0323 } else if (granularity == sistrip::CCU_ADDR) {
0324 return sistrip::ccuAddr_;
0325 } else if (granularity == sistrip::CCU_CHAN) {
0326 return sistrip::ccuChan_;
0327 }
0328
0329 else if (granularity == sistrip::UNDEFINED_GRAN) {
0330 return sistrip::undefinedGranularity_;
0331 } else {
0332 return sistrip::unknownGranularity_;
0333 }
0334 }
0335
0336
0337
0338 sistrip::Granularity SiStripEnumsAndStrings::granularity(const std::string& granularity) {
0339
0340 if (granularity.find(sistrip::tracker_) != std::string::npos) {
0341 return sistrip::TRACKER;
0342 } else if (granularity.find(sistrip::partition_) != std::string::npos) {
0343 return sistrip::PARTITION;
0344 } else if (granularity.find(sistrip::tib_) != std::string::npos) {
0345 return sistrip::TIB;
0346 } else if (granularity.find(sistrip::tob_) != std::string::npos) {
0347 return sistrip::TOB;
0348 } else if (granularity.find(sistrip::tec_) != std::string::npos) {
0349 return sistrip::TEC;
0350 }
0351
0352 else if (granularity.find(sistrip::fedSystem_) != std::string::npos) {
0353 return sistrip::FED_SYSTEM;
0354 } else if (granularity.find(sistrip::feDriver_) != std::string::npos) {
0355 return sistrip::FE_DRIVER;
0356 } else if (granularity.find(sistrip::feUnit_) != std::string::npos) {
0357 return sistrip::FE_UNIT;
0358 } else if (granularity.find(sistrip::feChan_) != std::string::npos) {
0359 return sistrip::FE_CHAN;
0360 } else if (granularity.find(sistrip::fedApv_) != std::string::npos) {
0361 return sistrip::FED_APV;
0362 } else if (granularity.find(sistrip::fedChannel_) != std::string::npos) {
0363 return sistrip::FED_CHANNEL;
0364 }
0365
0366 else if (granularity.find(sistrip::fecSystem_) != std::string::npos) {
0367 return sistrip::FEC_SYSTEM;
0368 } else if (granularity.find(sistrip::fecCrate_) != std::string::npos) {
0369 return sistrip::FEC_CRATE;
0370 } else if (granularity.find(sistrip::fecSlot_) != std::string::npos) {
0371 return sistrip::FEC_SLOT;
0372 } else if (granularity.find(sistrip::fecRing_) != std::string::npos) {
0373 return sistrip::FEC_RING;
0374 } else if (granularity.find(sistrip::ccuAddr_) != std::string::npos) {
0375 return sistrip::CCU_ADDR;
0376 } else if (granularity.find(sistrip::ccuChan_) != std::string::npos) {
0377 return sistrip::CCU_CHAN;
0378 }
0379
0380 else if (granularity.find(sistrip::layer_) != std::string::npos) {
0381 return sistrip::LAYER;
0382 } else if (granularity.find(sistrip::rod_) != std::string::npos) {
0383 return sistrip::ROD;
0384 } else if (granularity.find(sistrip::string_) != std::string::npos) {
0385 return sistrip::STRING;
0386 } else if (granularity.find(sistrip::disk_) != std::string::npos) {
0387 return sistrip::DISK;
0388 } else if (granularity.find(sistrip::petal_) != std::string::npos) {
0389 return sistrip::PETAL;
0390 } else if (granularity.find(sistrip::ring_) != std::string::npos) {
0391 return sistrip::RING;
0392 }
0393
0394 else if (granularity.find(sistrip::module_) != std::string::npos) {
0395 return sistrip::MODULE;
0396 } else if (granularity.find(sistrip::lldChan_) != std::string::npos) {
0397 return sistrip::LLD_CHAN;
0398 } else if (granularity.find(sistrip::apv_) != std::string::npos) {
0399 return sistrip::APV;
0400 }
0401
0402 else if (granularity.find(sistrip::undefinedGranularity_) != std::string::npos) {
0403 return sistrip::UNDEFINED_GRAN;
0404 } else if (granularity.empty()) {
0405 return sistrip::UNDEFINED_GRAN;
0406 } else {
0407 return sistrip::UNKNOWN_GRAN;
0408 }
0409 }
0410
0411
0412
0413 std::string SiStripEnumsAndStrings::apvReadoutMode(const sistrip::ApvReadoutMode& mode) {
0414 if (mode == sistrip::APV_PEAK_MODE) {
0415 return sistrip::apvPeakMode_;
0416 } else if (mode == sistrip::APV_DECON_MODE) {
0417 return sistrip::apvDeconMode_;
0418 } else if (mode == sistrip::APV_MULTI_MODE) {
0419 return sistrip::apvMultiMode_;
0420 } else if (mode == sistrip::UNDEFINED_APV_READOUT_MODE) {
0421 return sistrip::undefinedApvReadoutMode_;
0422 } else {
0423 return sistrip::unknownApvReadoutMode_;
0424 }
0425 }
0426
0427
0428
0429 sistrip::ApvReadoutMode SiStripEnumsAndStrings::apvReadoutMode(const std::string& mode) {
0430 if (mode.find(sistrip::apvPeakMode_) != std::string::npos) {
0431 return sistrip::APV_PEAK_MODE;
0432 } else if (mode.find(sistrip::apvDeconMode_) != std::string::npos) {
0433 return sistrip::APV_DECON_MODE;
0434 } else if (mode.find(sistrip::apvMultiMode_) != std::string::npos) {
0435 return sistrip::APV_MULTI_MODE;
0436 } else if (mode.find(sistrip::undefinedApvReadoutMode_) != std::string::npos) {
0437 return sistrip::UNDEFINED_APV_READOUT_MODE;
0438 } else if (mode.empty()) {
0439 return sistrip::UNDEFINED_APV_READOUT_MODE;
0440 } else {
0441 return sistrip::UNKNOWN_APV_READOUT_MODE;
0442 }
0443 }
0444
0445
0446
0447 std::string SiStripEnumsAndStrings::fedReadoutMode(const sistrip::FedReadoutMode& mode) {
0448 if (mode == sistrip::FED_SCOPE_MODE) {
0449 return sistrip::fedScopeMode_;
0450 } else if (mode == sistrip::FED_VIRGIN_RAW) {
0451 return sistrip::fedVirginRaw_;
0452 } else if (mode == sistrip::FED_PROC_RAW) {
0453 return sistrip::fedProcRaw_;
0454 } else if (mode == sistrip::FED_ZERO_SUPPR) {
0455 return sistrip::fedZeroSuppr_;
0456 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE) {
0457 return sistrip::fedZeroSupprLite_;
0458 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE_CMO) {
0459 return sistrip::fedZeroSupprLiteCMO_;
0460 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_TT) {
0461 return sistrip::fedZeroSupprLite8TT_;
0462 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_TT_CMO) {
0463 return sistrip::fedZeroSupprLite8TTCMO_;
0464 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_TB) {
0465 return sistrip::fedZeroSupprLite8TB_;
0466 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_TB_CMO) {
0467 return sistrip::fedZeroSupprLite8TBCMO_;
0468 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_BB) {
0469 return sistrip::fedZeroSupprLite8BB_;
0470 } else if (mode == sistrip::FED_ZERO_SUPPR_LITE8_BB_CMO) {
0471 return sistrip::fedZeroSupprLite8BBCMO_;
0472 } else if (mode == sistrip::UNDEFINED_FED_READOUT_MODE) {
0473 return sistrip::undefinedFedReadoutMode_;
0474 } else {
0475 return sistrip::unknownFedReadoutMode_;
0476 }
0477 }
0478
0479
0480
0481 sistrip::FedReadoutMode SiStripEnumsAndStrings::fedReadoutMode(const std::string& mode) {
0482 if (mode.find(sistrip::fedScopeMode_) != std::string::npos) {
0483 return sistrip::FED_SCOPE_MODE;
0484 } else if (mode.find(sistrip::fedVirginRaw_) != std::string::npos) {
0485 return sistrip::FED_VIRGIN_RAW;
0486 } else if (mode.find(sistrip::fedProcRaw_) != std::string::npos) {
0487 return sistrip::FED_PROC_RAW;
0488 } else if (mode.find(sistrip::fedZeroSuppr_) != std::string::npos) {
0489 return sistrip::FED_ZERO_SUPPR;
0490 } else if (mode.find(sistrip::fedZeroSupprLite_) != std::string::npos) {
0491 return sistrip::FED_ZERO_SUPPR_LITE;
0492 } else if (mode.find(sistrip::fedZeroSupprLiteCMO_) != std::string::npos) {
0493 return sistrip::FED_ZERO_SUPPR_LITE_CMO;
0494 } else if (mode.find(sistrip::fedZeroSupprLite8TT_) != std::string::npos) {
0495 return sistrip::FED_ZERO_SUPPR_LITE8_TT;
0496 } else if (mode.find(sistrip::fedZeroSupprLite8TTCMO_) != std::string::npos) {
0497 return sistrip::FED_ZERO_SUPPR_LITE8_TT_CMO;
0498 } else if (mode.find(sistrip::fedZeroSupprLite8TB_) != std::string::npos) {
0499 return sistrip::FED_ZERO_SUPPR_LITE8_TB;
0500 } else if (mode.find(sistrip::fedZeroSupprLite8TBCMO_) != std::string::npos) {
0501 return sistrip::FED_ZERO_SUPPR_LITE8_TB_CMO;
0502 } else if (mode.find(sistrip::fedZeroSupprLite8BB_) != std::string::npos) {
0503 return sistrip::FED_ZERO_SUPPR_LITE8_BB;
0504 } else if (mode.find(sistrip::fedZeroSupprLite8BBCMO_) != std::string::npos) {
0505 return sistrip::FED_ZERO_SUPPR_LITE8_BB_CMO;
0506 } else if (mode.find(sistrip::undefinedFedReadoutMode_) != std::string::npos) {
0507 return sistrip::UNDEFINED_FED_READOUT_MODE;
0508 } else if (mode.empty()) {
0509 return sistrip::UNDEFINED_FED_READOUT_MODE;
0510 } else {
0511 return sistrip::UNKNOWN_FED_READOUT_MODE;
0512 }
0513 }
0514
0515
0516
0517 std::string SiStripEnumsAndStrings::histoType(const sistrip::HistoType& type) {
0518 if (type == sistrip::EXPERT_HISTO) {
0519 return sistrip::expertHisto_;
0520 } else if (type == sistrip::SUMMARY_HISTO) {
0521 return sistrip::summaryHisto_;
0522 } else if (type == sistrip::UNDEFINED_HISTO_TYPE) {
0523 return sistrip::undefinedHistoType_;
0524 } else {
0525 return sistrip::unknownHistoType_;
0526 }
0527 }
0528
0529
0530
0531 sistrip::HistoType SiStripEnumsAndStrings::histoType(const std::string& type) {
0532 if (type.find(sistrip::expertHisto_) != std::string::npos) {
0533 return sistrip::EXPERT_HISTO;
0534 } else if (type.find(sistrip::summaryHisto_) != std::string::npos) {
0535 return sistrip::SUMMARY_HISTO;
0536 } else if (type.find(sistrip::undefinedHistoType_) != std::string::npos) {
0537 return sistrip::UNDEFINED_HISTO_TYPE;
0538 } else if (type.empty()) {
0539 return sistrip::UNDEFINED_HISTO_TYPE;
0540 } else {
0541 return sistrip::UNKNOWN_HISTO_TYPE;
0542 }
0543 }
0544
0545
0546
0547 std::string SiStripEnumsAndStrings::monitorable(const sistrip::Monitorable& mon) {
0548
0549 if (mon == sistrip::FED_CABLING_FED_ID) {
0550 return sistrip::fedCablingFedId_;
0551 } else if (mon == sistrip::FED_CABLING_FED_CH) {
0552 return sistrip::fedCablingFedCh_;
0553 } else if (mon == sistrip::FED_CABLING_ADC_LEVEL) {
0554 return sistrip::fedCablingAdcLevel_;
0555 }
0556
0557
0558 else if (mon == sistrip::FAST_CABLING_DCU_ID) {
0559 return sistrip::fastCablingDcuId_;
0560 } else if (mon == sistrip::FAST_CABLING_LLD_CH) {
0561 return sistrip::fastCablingLldCh_;
0562 } else if (mon == sistrip::FAST_CABLING_HIGH_LEVEL) {
0563 return sistrip::fastCablingHighLevel_;
0564 } else if (mon == sistrip::FAST_CABLING_HIGH_RMS) {
0565 return sistrip::fastCablingHighRms_;
0566 } else if (mon == sistrip::FAST_CABLING_LOW_LEVEL) {
0567 return sistrip::fastCablingLowLevel_;
0568 } else if (mon == sistrip::FAST_CABLING_LOW_RMS) {
0569 return sistrip::fastCablingLowRms_;
0570 } else if (mon == sistrip::FAST_CABLING_MAX) {
0571 return sistrip::fastCablingMax_;
0572 } else if (mon == sistrip::FAST_CABLING_MIN) {
0573 return sistrip::fastCablingMin_;
0574 } else if (mon == sistrip::FAST_CABLING_CONNS_PER_FED) {
0575 return sistrip::fastCablingConnsPerFed_;
0576 }
0577
0578
0579 else if (mon == sistrip::APV_TIMING_TIME) {
0580 return sistrip::apvTimingTime_;
0581 } else if (mon == sistrip::APV_TIMING_MAX_TIME) {
0582 return sistrip::apvTimingMax_;
0583 } else if (mon == sistrip::APV_TIMING_DELAY) {
0584 return sistrip::apvTimingDelay_;
0585 } else if (mon == sistrip::APV_TIMING_ERROR) {
0586 return sistrip::apvTimingError_;
0587 } else if (mon == sistrip::APV_TIMING_BASE) {
0588 return sistrip::apvTimingBase_;
0589 } else if (mon == sistrip::APV_TIMING_PEAK) {
0590 return sistrip::apvTimingPeak_;
0591 } else if (mon == sistrip::APV_TIMING_HEIGHT) {
0592 return sistrip::apvTimingHeight_;
0593 }
0594
0595
0596 else if (mon == sistrip::FED_TIMING_TIME) {
0597 return sistrip::fedTimingTime_;
0598 } else if (mon == sistrip::FED_TIMING_MAX_TIME) {
0599 return sistrip::fedTimingMax_;
0600 } else if (mon == sistrip::FED_TIMING_DELAY) {
0601 return sistrip::fedTimingDelay_;
0602 } else if (mon == sistrip::FED_TIMING_ERROR) {
0603 return sistrip::fedTimingError_;
0604 } else if (mon == sistrip::FED_TIMING_BASE) {
0605 return sistrip::fedTimingBase_;
0606 } else if (mon == sistrip::FED_TIMING_PEAK) {
0607 return sistrip::fedTimingPeak_;
0608 } else if (mon == sistrip::FED_TIMING_HEIGHT) {
0609 return sistrip::fedTimingHeight_;
0610 }
0611
0612
0613 else if (mon == sistrip::OPTO_SCAN_LLD_GAIN_SETTING) {
0614 return sistrip::optoScanLldGain_;
0615 } else if (mon == sistrip::OPTO_SCAN_LLD_BIAS_SETTING) {
0616 return sistrip::optoScanLldBias_;
0617 } else if (mon == sistrip::OPTO_SCAN_MEASURED_GAIN) {
0618 return sistrip::optoScanMeasGain_;
0619 } else if (mon == sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL) {
0620 return sistrip::optoScanZeroLight_;
0621 } else if (mon == sistrip::OPTO_SCAN_LINK_NOISE) {
0622 return sistrip::optoScanLinkNoise_;
0623 } else if (mon == sistrip::OPTO_SCAN_BASELINE_LIFT_OFF) {
0624 return sistrip::optoScanBaseLiftOff_;
0625 } else if (mon == sistrip::OPTO_SCAN_LASER_THRESHOLD) {
0626 return sistrip::optoScanLaserThresh_;
0627 } else if (mon == sistrip::OPTO_SCAN_TICK_HEIGHT) {
0628 return sistrip::optoScanTickHeight_;
0629 }
0630
0631
0632 else if (mon == sistrip::VPSP_SCAN_APV_SETTINGS) {
0633 return sistrip::vpspScanBothApvs_;
0634 } else if (mon == sistrip::VPSP_SCAN_APV0_SETTING) {
0635 return sistrip::vpspScanApv0_;
0636 } else if (mon == sistrip::VPSP_SCAN_APV1_SETTING) {
0637 return sistrip::vpspScanApv1_;
0638 } else if (mon == sistrip::VPSP_SCAN_ADC_LEVEL) {
0639 return sistrip::vpspScanAdcLevel_;
0640 } else if (mon == sistrip::VPSP_SCAN_DIGITAL_HIGH) {
0641 return sistrip::vpspScanDigitalHigh_;
0642 } else if (mon == sistrip::VPSP_SCAN_DIGITAL_LOW) {
0643 return sistrip::vpspScanDigitalLow_;
0644 }
0645
0646
0647 else if (mon == sistrip::PEDESTALS_ALL_STRIPS) {
0648 return sistrip::pedestalsAllStrips_;
0649 } else if (mon == sistrip::PEDESTALS_MEAN) {
0650 return sistrip::pedestalsMean_;
0651 } else if (mon == sistrip::PEDESTALS_SPREAD) {
0652 return sistrip::pedestalsSpread_;
0653 } else if (mon == sistrip::PEDESTALS_MAX) {
0654 return sistrip::pedestalsMax_;
0655 } else if (mon == sistrip::PEDESTALS_MIN) {
0656 return sistrip::pedestalsMin_;
0657 } else if (mon == sistrip::NOISE_ALL_STRIPS) {
0658 return sistrip::noiseAllStrips_;
0659 } else if (mon == sistrip::NOISE_MEAN) {
0660 return sistrip::noiseMean_;
0661 } else if (mon == sistrip::NOISE_SPREAD) {
0662 return sistrip::noiseSpread_;
0663 } else if (mon == sistrip::NOISE_MAX) {
0664 return sistrip::noiseMax_;
0665 } else if (mon == sistrip::NOISE_MIN) {
0666 return sistrip::noiseMin_;
0667 } else if (mon == sistrip::NUM_OF_DEAD) {
0668 return sistrip::numOfDeadStrips_;
0669 } else if (mon == sistrip::NUM_OF_NOISY) {
0670 return sistrip::numOfNoisy_;
0671 } else if (mon == sistrip::NUM_OF_BAD) {
0672 return sistrip::numOfBadStrips_;
0673 } else if (mon == sistrip::NUM_OF_BAD_SHIFTED) {
0674 return sistrip::numOfBadShiftedStrips_;
0675 } else if (mon == sistrip::NUM_OF_BAD_LOW_NOISE) {
0676 return sistrip::numOfBadLowNoiseStrips_;
0677 } else if (mon == sistrip::NUM_OF_BAD_LARGE_NOISE) {
0678 return sistrip::numOfBadLargeNoiseStrips_;
0679 } else if (mon == sistrip::NUM_OF_BAD_LARGE_SIGNIF) {
0680 return sistrip::numOfBadLargeNoiseSignificanceStrips_;
0681 } else if (mon == sistrip::NUM_OF_BAD_FIT_STATUS) {
0682 return sistrip::numOfBadFitStatusStrips_;
0683 } else if (mon == sistrip::NUM_OF_BAD_AD_PROBAB) {
0684 return sistrip::numOfBadADProbabStrips_;
0685 } else if (mon == sistrip::NUM_OF_BAD_KS_PROBAB) {
0686 return sistrip::numOfBadKSProbabStrips_;
0687 } else if (mon == sistrip::NUM_OF_BAD_JB_PROBAB) {
0688 return sistrip::numOfBadJBProbabStrips_;
0689 } else if (mon == sistrip::NUM_OF_BAD_CHI2_PROBAB) {
0690 return sistrip::numOfBadChi2ProbabStrips_;
0691 } else if (mon == sistrip::NUM_OF_BAD_TAIL) {
0692 return sistrip::numOfBadTailStrips_;
0693 } else if (mon == sistrip::NUM_OF_BAD_DOUBLE_PEAK) {
0694 return sistrip::numOfBadDoublePeakStrips_;
0695 }
0696
0697 else if (mon == sistrip::BAD_STRIP_BIT_ALL_STRIPS) {
0698 return sistrip::badStripBit_;
0699 } else if (mon == sistrip::DEAD_STRIP_BIT_ALL_STRIPS) {
0700 return sistrip::deadStripBit_;
0701 } else if (mon == sistrip::AD_PROBAB_ALL_STRIPS) {
0702 return sistrip::adProbabAllStrips_;
0703 } else if (mon == sistrip::KS_PROBAB_ALL_STRIPS) {
0704 return sistrip::ksProbabAllStrips_;
0705 } else if (mon == sistrip::JB_PROBAB_ALL_STRIPS) {
0706 return sistrip::jbProbabAllStrips_;
0707 } else if (mon == sistrip::CHI2_PROBAB_ALL_STRIPS) {
0708 return sistrip::chi2ProbabAllStrips_;
0709 } else if (mon == sistrip::RESIDUAL_RMS_ALL_STRIPS) {
0710 return sistrip::residualRMSAllStrips_;
0711 } else if (mon == sistrip::RESIDUAL_GAUS_ALL_STRIPS) {
0712 return sistrip::residualSigmaGausAllStrips_;
0713 } else if (mon == sistrip::NOISE_SIGNIFICANCE_ALL_STRIPS) {
0714 return sistrip::noiseSignificanceAllStrips_;
0715 } else if (mon == sistrip::RESIDUAL_MEAN_ALL_STRIPS) {
0716 return sistrip::residualMeanAllStrips_;
0717 } else if (mon == sistrip::RESIDUAL_SKEWNESS_ALL_STRIPS) {
0718 return sistrip::residualSkewnessAllStrips_;
0719 } else if (mon == sistrip::RESIDUAL_KURTOSIS_ALL_STRIPS) {
0720 return sistrip::residualKurtosisAllStrips_;
0721 } else if (mon == sistrip::RESIDUAL_INTEGRALNSIGMA_ALL_STRIPS) {
0722 return sistrip::residualIntegralNsigmaAllStrips_;
0723 } else if (mon == sistrip::RESIDUAL_INTEGRAL_ALL_STRIPS) {
0724 return sistrip::residualIntegralAllStrips_;
0725 }
0726
0727
0728 else if (mon == sistrip::FINE_DELAY_POS) {
0729 return sistrip::fineDelayPos_;
0730 } else if (mon == sistrip::FINE_DELAY_ERROR) {
0731 return sistrip::fineDelayErr_;
0732 }
0733
0734 else if (mon == sistrip::CALIBRATION_AMPLITUDE_MEAN) {
0735 return sistrip::calibrationAmplitudeMean_;
0736 } else if (mon == sistrip::CALIBRATION_TAIL_MEAN) {
0737 return sistrip::calibrationTailMean_;
0738 } else if (mon == sistrip::CALIBRATION_RISETIME_MEAN) {
0739 return sistrip::calibrationRiseTimeMean_;
0740 } else if (mon == sistrip::CALIBRATION_DECAYTIME_MEAN) {
0741 return sistrip::calibrationDecayTimeMean_;
0742 } else if (mon == sistrip::CALIBRATION_PEAKTIME_MEAN) {
0743 return sistrip::calibrationPeakTimeMean_;
0744 } else if (mon == sistrip::CALIBRATION_TURNON_MEAN) {
0745 return sistrip::calibrationTurnOnMean_;
0746 } else if (mon == sistrip::CALIBRATION_BASELINE_MEAN) {
0747 return sistrip::calibrationBaselineMean_;
0748 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_MEAN) {
0749 return sistrip::calibrationUndershootMean_;
0750 } else if (mon == sistrip::CALIBRATION_SMEARING_MEAN) {
0751 return sistrip::calibrationSmearingMean_;
0752 } else if (mon == sistrip::CALIBRATION_CHI2_MEAN) {
0753 return sistrip::calibrationChi2Mean_;
0754 }
0755
0756 else if (mon == sistrip::CALIBRATION_AMPLITUDE_MIN) {
0757 return sistrip::calibrationAmplitudeMin_;
0758 } else if (mon == sistrip::CALIBRATION_TAIL_MIN) {
0759 return sistrip::calibrationTailMin_;
0760 } else if (mon == sistrip::CALIBRATION_RISETIME_MIN) {
0761 return sistrip::calibrationRiseTimeMin_;
0762 } else if (mon == sistrip::CALIBRATION_DECAYTIME_MIN) {
0763 return sistrip::calibrationDecayTimeMin_;
0764 } else if (mon == sistrip::CALIBRATION_PEAKTIME_MIN) {
0765 return sistrip::calibrationPeakTimeMin_;
0766 } else if (mon == sistrip::CALIBRATION_TURNON_MIN) {
0767 return sistrip::calibrationTurnOnMin_;
0768 } else if (mon == sistrip::CALIBRATION_BASELINE_MIN) {
0769 return sistrip::calibrationBaselineMin_;
0770 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_MIN) {
0771 return sistrip::calibrationUndershootMin_;
0772 } else if (mon == sistrip::CALIBRATION_SMEARING_MIN) {
0773 return sistrip::calibrationSmearingMin_;
0774 } else if (mon == sistrip::CALIBRATION_CHI2_MIN) {
0775 return sistrip::calibrationChi2Min_;
0776 }
0777
0778 else if (mon == sistrip::CALIBRATION_AMPLITUDE_MAX) {
0779 return sistrip::calibrationAmplitudeMax_;
0780 } else if (mon == sistrip::CALIBRATION_TAIL_MAX) {
0781 return sistrip::calibrationTailMax_;
0782 } else if (mon == sistrip::CALIBRATION_RISETIME_MAX) {
0783 return sistrip::calibrationRiseTimeMax_;
0784 } else if (mon == sistrip::CALIBRATION_DECAYTIME_MAX) {
0785 return sistrip::calibrationDecayTimeMax_;
0786 } else if (mon == sistrip::CALIBRATION_PEAKTIME_MAX) {
0787 return sistrip::calibrationPeakTimeMax_;
0788 } else if (mon == sistrip::CALIBRATION_TURNON_MAX) {
0789 return sistrip::calibrationTurnOnMax_;
0790 } else if (mon == sistrip::CALIBRATION_BASELINE_MAX) {
0791 return sistrip::calibrationBaselineMax_;
0792 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_MAX) {
0793 return sistrip::calibrationUndershootMax_;
0794 } else if (mon == sistrip::CALIBRATION_SMEARING_MAX) {
0795 return sistrip::calibrationSmearingMax_;
0796 } else if (mon == sistrip::CALIBRATION_CHI2_MAX) {
0797 return sistrip::calibrationChi2Max_;
0798 }
0799
0800 else if (mon == sistrip::CALIBRATION_AMPLITUDE_SPREAD) {
0801 return sistrip::calibrationAmplitudeSpread_;
0802 } else if (mon == sistrip::CALIBRATION_TAIL_SPREAD) {
0803 return sistrip::calibrationTailSpread_;
0804 } else if (mon == sistrip::CALIBRATION_RISETIME_SPREAD) {
0805 return sistrip::calibrationRiseTimeSpread_;
0806 } else if (mon == sistrip::CALIBRATION_DECAYTIME_SPREAD) {
0807 return sistrip::calibrationDecayTimeSpread_;
0808 } else if (mon == sistrip::CALIBRATION_PEAKTIME_SPREAD) {
0809 return sistrip::calibrationPeakTimeSpread_;
0810 } else if (mon == sistrip::CALIBRATION_TURNON_SPREAD) {
0811 return sistrip::calibrationTurnOnSpread_;
0812 } else if (mon == sistrip::CALIBRATION_BASELINE_SPREAD) {
0813 return sistrip::calibrationBaselineSpread_;
0814 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_SPREAD) {
0815 return sistrip::calibrationUndershootSpread_;
0816 } else if (mon == sistrip::CALIBRATION_SMEARING_SPREAD) {
0817 return sistrip::calibrationSmearingSpread_;
0818 } else if (mon == sistrip::CALIBRATION_CHI2_SPREAD) {
0819 return sistrip::calibrationChi2Spread_;
0820 }
0821
0822 else if (mon == sistrip::CALIBRATION_AMPLITUDE_ALL_STRIPS) {
0823 return sistrip::calibrationAmplitude_;
0824 } else if (mon == sistrip::CALIBRATION_TAIL_ALL_STRIPS) {
0825 return sistrip::calibrationTail_;
0826 } else if (mon == sistrip::CALIBRATION_RISETIME_ALL_STRIPS) {
0827 return sistrip::calibrationRiseTime_;
0828 } else if (mon == sistrip::CALIBRATION_DECAYTIME_ALL_STRIPS) {
0829 return sistrip::calibrationDecayTime_;
0830 } else if (mon == sistrip::CALIBRATION_PEAKTIME_ALL_STRIPS) {
0831 return sistrip::calibrationPeakTime_;
0832 } else if (mon == sistrip::CALIBRATION_TURNON_ALL_STRIPS) {
0833 return sistrip::calibrationTurnOn_;
0834 } else if (mon == sistrip::CALIBRATION_BASELINE_ALL_STRIPS) {
0835 return sistrip::calibrationBaseline_;
0836 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_ALL_STRIPS) {
0837 return sistrip::calibrationUndershoot_;
0838 } else if (mon == sistrip::CALIBRATION_SMEARING_ALL_STRIPS) {
0839 return sistrip::calibrationSmearing_;
0840 } else if (mon == sistrip::CALIBRATION_CHI2_ALL_STRIPS) {
0841 return sistrip::calibrationChi2_;
0842 }
0843
0844 else if (mon == sistrip::CALIBRATION_AMPLITUDE_TUNED) {
0845 return sistrip::calibrationAmplitudeTuned_;
0846 } else if (mon == sistrip::CALIBRATION_TAIL_TUNED) {
0847 return sistrip::calibrationTailTuned_;
0848 } else if (mon == sistrip::CALIBRATION_RISETIME_TUNED) {
0849 return sistrip::calibrationRiseTimeTuned_;
0850 } else if (mon == sistrip::CALIBRATION_DECAYTIME_TUNED) {
0851 return sistrip::calibrationDecayTimeTuned_;
0852 } else if (mon == sistrip::CALIBRATION_PEAKTIME_TUNED) {
0853 return sistrip::calibrationPeakTimeTuned_;
0854 } else if (mon == sistrip::CALIBRATION_TURNON_TUNED) {
0855 return sistrip::calibrationTurnOnTuned_;
0856 } else if (mon == sistrip::CALIBRATION_BASELINE_TUNED) {
0857 return sistrip::calibrationBaselineTuned_;
0858 } else if (mon == sistrip::CALIBRATION_UNDERSHOOT_TUNED) {
0859 return sistrip::calibrationUndershootTuned_;
0860 } else if (mon == sistrip::CALIBRATION_SMEARING_TUNED) {
0861 return sistrip::calibrationSmearingTuned_;
0862 } else if (mon == sistrip::CALIBRATION_CHI2_TUNED) {
0863 return sistrip::calibrationChi2Tuned_;
0864 } else if (mon == sistrip::CALIBRATION_ISHA_TUNED) {
0865 return sistrip::calibrationISHATuned_;
0866 } else if (mon == sistrip::CALIBRATION_VFS_TUNED) {
0867 return sistrip::calibrationVFSTuned_;
0868 } else if (mon == sistrip::CALIBRATION_ISHA_BEST) {
0869 return sistrip::calibrationISHABest_;
0870 } else if (mon == sistrip::CALIBRATION_VFS_BEST) {
0871 return sistrip::calibrationVFSBest_;
0872 }
0873
0874
0875 else if (mon == sistrip::DAQ_SCOPE_MODE_MEAN_SIGNAL) {
0876 return sistrip::daqScopeModeMeanSignal_;
0877 }
0878
0879
0880 else if (mon == sistrip::UNDEFINED_MONITORABLE) {
0881 return sistrip::undefinedMonitorable_;
0882 } else {
0883 return sistrip::unknownMonitorable_;
0884 }
0885 }
0886
0887
0888
0889 sistrip::Monitorable SiStripEnumsAndStrings::monitorable(const std::string& mon) {
0890
0891 if (mon.find(sistrip::fedCablingFedId_) != std::string::npos) {
0892 return sistrip::FED_CABLING_FED_ID;
0893 } else if (mon.find(sistrip::fedCablingFedCh_) != std::string::npos) {
0894 return sistrip::FED_CABLING_FED_CH;
0895 } else if (mon.find(sistrip::fedCablingAdcLevel_) != std::string::npos) {
0896 return sistrip::FED_CABLING_ADC_LEVEL;
0897 }
0898
0899
0900 else if (mon.find(sistrip::fastCablingDcuId_) != std::string::npos) {
0901 return sistrip::FAST_CABLING_DCU_ID;
0902 } else if (mon.find(sistrip::fastCablingLldCh_) != std::string::npos) {
0903 return sistrip::FAST_CABLING_LLD_CH;
0904 } else if (mon.find(sistrip::fastCablingHighLevel_) != std::string::npos) {
0905 return sistrip::FAST_CABLING_HIGH_LEVEL;
0906 } else if (mon.find(sistrip::fastCablingHighRms_) != std::string::npos) {
0907 return sistrip::FAST_CABLING_HIGH_RMS;
0908 } else if (mon.find(sistrip::fastCablingLowLevel_) != std::string::npos) {
0909 return sistrip::FAST_CABLING_LOW_LEVEL;
0910 } else if (mon.find(sistrip::fastCablingLowRms_) != std::string::npos) {
0911 return sistrip::FAST_CABLING_LOW_RMS;
0912 } else if (mon.find(sistrip::fastCablingMax_) != std::string::npos) {
0913 return sistrip::FAST_CABLING_MAX;
0914 } else if (mon.find(sistrip::fastCablingMin_) != std::string::npos) {
0915 return sistrip::FAST_CABLING_MIN;
0916 } else if (mon.find(sistrip::fastCablingConnsPerFed_) != std::string::npos) {
0917 return sistrip::FAST_CABLING_CONNS_PER_FED;
0918 }
0919
0920
0921 else if (mon.find(sistrip::apvTimingTime_) != std::string::npos) {
0922 return sistrip::APV_TIMING_TIME;
0923 } else if (mon.find(sistrip::apvTimingMax_) != std::string::npos) {
0924 return sistrip::APV_TIMING_MAX_TIME;
0925 } else if (mon.find(sistrip::apvTimingDelay_) != std::string::npos) {
0926 return sistrip::APV_TIMING_DELAY;
0927 } else if (mon.find(sistrip::apvTimingError_) != std::string::npos) {
0928 return sistrip::APV_TIMING_ERROR;
0929 } else if (mon.find(sistrip::apvTimingBase_) != std::string::npos) {
0930 return sistrip::APV_TIMING_BASE;
0931 } else if (mon.find(sistrip::apvTimingPeak_) != std::string::npos) {
0932 return sistrip::APV_TIMING_PEAK;
0933 } else if (mon.find(sistrip::apvTimingHeight_) != std::string::npos) {
0934 return sistrip::APV_TIMING_HEIGHT;
0935 }
0936
0937
0938 else if (mon.find(sistrip::fedTimingTime_) != std::string::npos) {
0939 return sistrip::FED_TIMING_TIME;
0940 } else if (mon.find(sistrip::fedTimingMax_) != std::string::npos) {
0941 return sistrip::FED_TIMING_MAX_TIME;
0942 } else if (mon.find(sistrip::fedTimingDelay_) != std::string::npos) {
0943 return sistrip::FED_TIMING_DELAY;
0944 } else if (mon.find(sistrip::fedTimingError_) != std::string::npos) {
0945 return sistrip::FED_TIMING_ERROR;
0946 } else if (mon.find(sistrip::fedTimingBase_) != std::string::npos) {
0947 return sistrip::FED_TIMING_BASE;
0948 } else if (mon.find(sistrip::fedTimingPeak_) != std::string::npos) {
0949 return sistrip::FED_TIMING_PEAK;
0950 } else if (mon.find(sistrip::fedTimingHeight_) != std::string::npos) {
0951 return sistrip::FED_TIMING_HEIGHT;
0952 }
0953
0954
0955 else if (mon.find(sistrip::optoScanLldGain_) != std::string::npos) {
0956 return sistrip::OPTO_SCAN_LLD_GAIN_SETTING;
0957 } else if (mon.find(sistrip::optoScanLldBias_) != std::string::npos) {
0958 return sistrip::OPTO_SCAN_LLD_BIAS_SETTING;
0959 } else if (mon.find(sistrip::optoScanMeasGain_) != std::string::npos) {
0960 return sistrip::OPTO_SCAN_MEASURED_GAIN;
0961 } else if (mon.find(sistrip::optoScanZeroLight_) != std::string::npos) {
0962 return sistrip::OPTO_SCAN_ZERO_LIGHT_LEVEL;
0963 } else if (mon.find(sistrip::optoScanLinkNoise_) != std::string::npos) {
0964 return sistrip::OPTO_SCAN_LINK_NOISE;
0965 } else if (mon.find(sistrip::optoScanBaseLiftOff_) != std::string::npos) {
0966 return sistrip::OPTO_SCAN_BASELINE_LIFT_OFF;
0967 } else if (mon.find(sistrip::optoScanLaserThresh_) != std::string::npos) {
0968 return sistrip::OPTO_SCAN_LASER_THRESHOLD;
0969 } else if (mon.find(sistrip::optoScanTickHeight_) != std::string::npos) {
0970 return sistrip::OPTO_SCAN_TICK_HEIGHT;
0971 }
0972
0973
0974 else if (mon.find(sistrip::vpspScanBothApvs_) != std::string::npos) {
0975 return sistrip::VPSP_SCAN_APV_SETTINGS;
0976 } else if (mon.find(sistrip::vpspScanApv0_) != std::string::npos) {
0977 return sistrip::VPSP_SCAN_APV0_SETTING;
0978 } else if (mon.find(sistrip::vpspScanApv1_) != std::string::npos) {
0979 return sistrip::VPSP_SCAN_APV1_SETTING;
0980 } else if (mon.find(sistrip::vpspScanAdcLevel_) != std::string::npos) {
0981 return sistrip::VPSP_SCAN_ADC_LEVEL;
0982 } else if (mon.find(sistrip::vpspScanDigitalHigh_) != std::string::npos) {
0983 return sistrip::VPSP_SCAN_DIGITAL_HIGH;
0984 } else if (mon.find(sistrip::vpspScanDigitalLow_) != std::string::npos) {
0985 return sistrip::VPSP_SCAN_DIGITAL_LOW;
0986 }
0987
0988
0989 else if (mon.find(sistrip::pedestalsAllStrips_) != std::string::npos) {
0990 return sistrip::PEDESTALS_ALL_STRIPS;
0991 } else if (mon.find(sistrip::pedestalsMean_) != std::string::npos) {
0992 return sistrip::PEDESTALS_MEAN;
0993 } else if (mon.find(sistrip::pedestalsSpread_) != std::string::npos) {
0994 return sistrip::PEDESTALS_SPREAD;
0995 } else if (mon.find(sistrip::pedestalsMax_) != std::string::npos) {
0996 return sistrip::PEDESTALS_MAX;
0997 } else if (mon.find(sistrip::pedestalsMin_) != std::string::npos) {
0998 return sistrip::PEDESTALS_MIN;
0999 }
1000
1001
1002 else if (mon.find(sistrip::noiseAllStrips_) != std::string::npos) {
1003 return sistrip::NOISE_ALL_STRIPS;
1004 } else if (mon.find(sistrip::noiseMean_) != std::string::npos) {
1005 return sistrip::NOISE_MEAN;
1006 } else if (mon.find(sistrip::noiseSpread_) != std::string::npos) {
1007 return sistrip::NOISE_SPREAD;
1008 } else if (mon.find(sistrip::noiseMax_) != std::string::npos) {
1009 return sistrip::NOISE_MAX;
1010 } else if (mon.find(sistrip::noiseMin_) != std::string::npos) {
1011 return sistrip::NOISE_MIN;
1012 } else if (mon.find(sistrip::numOfDeadStrips_) != std::string::npos) {
1013 return sistrip::NUM_OF_DEAD;
1014 } else if (mon.find(sistrip::numOfNoisy_) != std::string::npos) {
1015 return sistrip::NUM_OF_NOISY;
1016 } else if (mon.find(sistrip::numOfBadStrips_) != std::string::npos) {
1017 return sistrip::NUM_OF_BAD;
1018 } else if (mon.find(sistrip::numOfBadShiftedStrips_) != std::string::npos) {
1019 return sistrip::NUM_OF_BAD_SHIFTED;
1020 } else if (mon.find(sistrip::numOfBadLowNoiseStrips_) != std::string::npos) {
1021 return sistrip::NUM_OF_BAD_LOW_NOISE;
1022 } else if (mon.find(sistrip::numOfBadLargeNoiseStrips_) != std::string::npos) {
1023 return sistrip::NUM_OF_BAD_LARGE_NOISE;
1024 } else if (mon.find(sistrip::numOfBadLargeNoiseSignificanceStrips_) != std::string::npos) {
1025 return sistrip::NUM_OF_BAD_LARGE_SIGNIF;
1026 } else if (mon.find(sistrip::numOfBadFitStatusStrips_) != std::string::npos) {
1027 return sistrip::NUM_OF_BAD_FIT_STATUS;
1028 } else if (mon.find(sistrip::numOfBadADProbabStrips_) != std::string::npos) {
1029 return sistrip::NUM_OF_BAD_AD_PROBAB;
1030 } else if (mon.find(sistrip::numOfBadKSProbabStrips_) != std::string::npos) {
1031 return sistrip::NUM_OF_BAD_KS_PROBAB;
1032 } else if (mon.find(sistrip::numOfBadJBProbabStrips_) != std::string::npos) {
1033 return sistrip::NUM_OF_BAD_JB_PROBAB;
1034 } else if (mon.find(sistrip::numOfBadChi2ProbabStrips_) != std::string::npos) {
1035 return sistrip::NUM_OF_BAD_CHI2_PROBAB;
1036 } else if (mon.find(sistrip::numOfBadTailStrips_) != std::string::npos) {
1037 return sistrip::NUM_OF_BAD_TAIL;
1038 } else if (mon.find(sistrip::numOfBadDoublePeakStrips_) != std::string::npos) {
1039 return sistrip::NUM_OF_BAD_DOUBLE_PEAK;
1040 }
1041
1042 else if (mon.find(sistrip::badStripBit_) != std::string::npos) {
1043 return sistrip::BAD_STRIP_BIT_ALL_STRIPS;
1044 } else if (mon.find(sistrip::deadStripBit_) != std::string::npos) {
1045 return sistrip::DEAD_STRIP_BIT_ALL_STRIPS;
1046 } else if (mon.find(sistrip::adProbabAllStrips_) != std::string::npos) {
1047 return sistrip::AD_PROBAB_ALL_STRIPS;
1048 } else if (mon.find(sistrip::ksProbabAllStrips_) != std::string::npos) {
1049 return sistrip::KS_PROBAB_ALL_STRIPS;
1050 } else if (mon.find(sistrip::jbProbabAllStrips_) != std::string::npos) {
1051 return sistrip::JB_PROBAB_ALL_STRIPS;
1052 } else if (mon.find(sistrip::chi2ProbabAllStrips_) != std::string::npos) {
1053 return sistrip::CHI2_PROBAB_ALL_STRIPS;
1054 } else if (mon.find(sistrip::residualRMSAllStrips_) != std::string::npos) {
1055 return sistrip::RESIDUAL_RMS_ALL_STRIPS;
1056 } else if (mon.find(sistrip::residualSigmaGausAllStrips_) != std::string::npos) {
1057 return sistrip::RESIDUAL_GAUS_ALL_STRIPS;
1058 } else if (mon.find(sistrip::noiseSignificanceAllStrips_) != std::string::npos) {
1059 return sistrip::NOISE_SIGNIFICANCE_ALL_STRIPS;
1060 } else if (mon.find(sistrip::residualMeanAllStrips_) != std::string::npos) {
1061 return sistrip::RESIDUAL_MEAN_ALL_STRIPS;
1062 } else if (mon.find(sistrip::residualSkewnessAllStrips_) != std::string::npos) {
1063 return sistrip::RESIDUAL_SKEWNESS_ALL_STRIPS;
1064 } else if (mon.find(sistrip::residualKurtosisAllStrips_) != std::string::npos) {
1065 return sistrip::RESIDUAL_KURTOSIS_ALL_STRIPS;
1066 } else if (mon.find(sistrip::residualIntegralNsigmaAllStrips_) != std::string::npos) {
1067 return sistrip::RESIDUAL_INTEGRALNSIGMA_ALL_STRIPS;
1068 } else if (mon.find(sistrip::residualIntegralAllStrips_) != std::string::npos) {
1069 return sistrip::RESIDUAL_INTEGRAL_ALL_STRIPS;
1070 }
1071
1072
1073 else if (mon.find(sistrip::fineDelayPos_) != std::string::npos) {
1074 return sistrip::FINE_DELAY_POS;
1075 } else if (mon.find(sistrip::fineDelayErr_) != std::string::npos) {
1076 return sistrip::FINE_DELAY_ERROR;
1077 }
1078
1079
1080 else if (mon.find(sistrip::calibrationAmplitudeMean_) != std::string::npos) {
1081 return sistrip::CALIBRATION_AMPLITUDE_MEAN;
1082 } else if (mon.find(sistrip::calibrationTailMean_) != std::string::npos) {
1083 return sistrip::CALIBRATION_TAIL_MEAN;
1084 } else if (mon.find(sistrip::calibrationRiseTimeMean_) != std::string::npos) {
1085 return sistrip::CALIBRATION_RISETIME_MEAN;
1086 } else if (mon.find(sistrip::calibrationDecayTimeMean_) != std::string::npos) {
1087 return sistrip::CALIBRATION_DECAYTIME_MEAN;
1088 } else if (mon.find(sistrip::calibrationPeakTimeMean_) != std::string::npos) {
1089 return sistrip::CALIBRATION_PEAKTIME_MEAN;
1090 } else if (mon.find(sistrip::calibrationTurnOnMean_) != std::string::npos) {
1091 return sistrip::CALIBRATION_TURNON_MEAN;
1092 } else if (mon.find(sistrip::calibrationBaselineMean_) != std::string::npos) {
1093 return sistrip::CALIBRATION_BASELINE_MEAN;
1094 } else if (mon.find(sistrip::calibrationUndershootMean_) != std::string::npos) {
1095 return sistrip::CALIBRATION_UNDERSHOOT_MEAN;
1096 } else if (mon.find(sistrip::calibrationSmearingMean_) != std::string::npos) {
1097 return sistrip::CALIBRATION_SMEARING_MEAN;
1098 } else if (mon.find(sistrip::calibrationChi2Mean_) != std::string::npos) {
1099 return sistrip::CALIBRATION_CHI2_MEAN;
1100 }
1101
1102 else if (mon.find(sistrip::calibrationAmplitudeMax_) != std::string::npos) {
1103 return sistrip::CALIBRATION_AMPLITUDE_MAX;
1104 } else if (mon.find(sistrip::calibrationTailMax_) != std::string::npos) {
1105 return sistrip::CALIBRATION_TAIL_MAX;
1106 } else if (mon.find(sistrip::calibrationRiseTimeMax_) != std::string::npos) {
1107 return sistrip::CALIBRATION_RISETIME_MAX;
1108 } else if (mon.find(sistrip::calibrationDecayTimeMax_) != std::string::npos) {
1109 return sistrip::CALIBRATION_DECAYTIME_MAX;
1110 } else if (mon.find(sistrip::calibrationPeakTimeMax_) != std::string::npos) {
1111 return sistrip::CALIBRATION_PEAKTIME_MAX;
1112 } else if (mon.find(sistrip::calibrationTurnOnMax_) != std::string::npos) {
1113 return sistrip::CALIBRATION_TURNON_MAX;
1114 } else if (mon.find(sistrip::calibrationBaselineMax_) != std::string::npos) {
1115 return sistrip::CALIBRATION_BASELINE_MAX;
1116 } else if (mon.find(sistrip::calibrationUndershootMax_) != std::string::npos) {
1117 return sistrip::CALIBRATION_UNDERSHOOT_MAX;
1118 } else if (mon.find(sistrip::calibrationSmearingMax_) != std::string::npos) {
1119 return sistrip::CALIBRATION_SMEARING_MAX;
1120 } else if (mon.find(sistrip::calibrationChi2Max_) != std::string::npos) {
1121 return sistrip::CALIBRATION_CHI2_MAX;
1122 }
1123
1124 else if (mon.find(sistrip::calibrationAmplitudeMin_) != std::string::npos) {
1125 return sistrip::CALIBRATION_AMPLITUDE_MIN;
1126 } else if (mon.find(sistrip::calibrationTailMin_) != std::string::npos) {
1127 return sistrip::CALIBRATION_TAIL_MIN;
1128 } else if (mon.find(sistrip::calibrationRiseTimeMin_) != std::string::npos) {
1129 return sistrip::CALIBRATION_RISETIME_MIN;
1130 } else if (mon.find(sistrip::calibrationDecayTimeMin_) != std::string::npos) {
1131 return sistrip::CALIBRATION_DECAYTIME_MIN;
1132 } else if (mon.find(sistrip::calibrationPeakTimeMin_) != std::string::npos) {
1133 return sistrip::CALIBRATION_PEAKTIME_MIN;
1134 } else if (mon.find(sistrip::calibrationTurnOnMin_) != std::string::npos) {
1135 return sistrip::CALIBRATION_TURNON_MIN;
1136 } else if (mon.find(sistrip::calibrationBaselineMin_) != std::string::npos) {
1137 return sistrip::CALIBRATION_BASELINE_MIN;
1138 } else if (mon.find(sistrip::calibrationUndershootMin_) != std::string::npos) {
1139 return sistrip::CALIBRATION_UNDERSHOOT_MIN;
1140 } else if (mon.find(sistrip::calibrationSmearingMin_) != std::string::npos) {
1141 return sistrip::CALIBRATION_SMEARING_MIN;
1142 } else if (mon.find(sistrip::calibrationChi2Min_) != std::string::npos) {
1143 return sistrip::CALIBRATION_CHI2_MIN;
1144 }
1145
1146 else if (mon.find(sistrip::calibrationAmplitudeSpread_) != std::string::npos) {
1147 return sistrip::CALIBRATION_AMPLITUDE_SPREAD;
1148 } else if (mon.find(sistrip::calibrationTailSpread_) != std::string::npos) {
1149 return sistrip::CALIBRATION_TAIL_SPREAD;
1150 } else if (mon.find(sistrip::calibrationRiseTimeSpread_) != std::string::npos) {
1151 return sistrip::CALIBRATION_RISETIME_SPREAD;
1152 } else if (mon.find(sistrip::calibrationDecayTimeSpread_) != std::string::npos) {
1153 return sistrip::CALIBRATION_DECAYTIME_SPREAD;
1154 } else if (mon.find(sistrip::calibrationPeakTimeSpread_) != std::string::npos) {
1155 return sistrip::CALIBRATION_PEAKTIME_SPREAD;
1156 } else if (mon.find(sistrip::calibrationTurnOnSpread_) != std::string::npos) {
1157 return sistrip::CALIBRATION_TURNON_SPREAD;
1158 } else if (mon.find(sistrip::calibrationBaselineSpread_) != std::string::npos) {
1159 return sistrip::CALIBRATION_BASELINE_SPREAD;
1160 } else if (mon.find(sistrip::calibrationUndershootSpread_) != std::string::npos) {
1161 return sistrip::CALIBRATION_UNDERSHOOT_SPREAD;
1162 } else if (mon.find(sistrip::calibrationSmearingSpread_) != std::string::npos) {
1163 return sistrip::CALIBRATION_SMEARING_SPREAD;
1164 } else if (mon.find(sistrip::calibrationChi2Spread_) != std::string::npos) {
1165 return sistrip::CALIBRATION_CHI2_SPREAD;
1166 }
1167
1168 else if (mon.find(sistrip::calibrationAmplitudeTuned_) != std::string::npos) {
1169 return sistrip::CALIBRATION_AMPLITUDE_TUNED;
1170 } else if (mon.find(sistrip::calibrationTailTuned_) != std::string::npos) {
1171 return sistrip::CALIBRATION_TAIL_TUNED;
1172 } else if (mon.find(sistrip::calibrationRiseTimeTuned_) != std::string::npos) {
1173 return sistrip::CALIBRATION_RISETIME_TUNED;
1174 } else if (mon.find(sistrip::calibrationDecayTimeTuned_) != std::string::npos) {
1175 return sistrip::CALIBRATION_DECAYTIME_TUNED;
1176 } else if (mon.find(sistrip::calibrationPeakTimeTuned_) != std::string::npos) {
1177 return sistrip::CALIBRATION_PEAKTIME_TUNED;
1178 } else if (mon.find(sistrip::calibrationTurnOnTuned_) != std::string::npos) {
1179 return sistrip::CALIBRATION_TURNON_TUNED;
1180 } else if (mon.find(sistrip::calibrationBaselineTuned_) != std::string::npos) {
1181 return sistrip::CALIBRATION_BASELINE_TUNED;
1182 } else if (mon.find(sistrip::calibrationUndershootTuned_) != std::string::npos) {
1183 return sistrip::CALIBRATION_UNDERSHOOT_TUNED;
1184 } else if (mon.find(sistrip::calibrationSmearingTuned_) != std::string::npos) {
1185 return sistrip::CALIBRATION_SMEARING_TUNED;
1186 } else if (mon.find(sistrip::calibrationChi2Tuned_) != std::string::npos) {
1187 return sistrip::CALIBRATION_CHI2_TUNED;
1188 } else if (mon.find(sistrip::calibrationISHATuned_) != std::string::npos) {
1189 return sistrip::CALIBRATION_ISHA_TUNED;
1190 } else if (mon.find(sistrip::calibrationVFSTuned_) != std::string::npos) {
1191 return sistrip::CALIBRATION_VFS_TUNED;
1192 } else if (mon.find(sistrip::calibrationISHABest_) != std::string::npos) {
1193 return sistrip::CALIBRATION_ISHA_BEST;
1194 } else if (mon.find(sistrip::calibrationVFSBest_) != std::string::npos) {
1195 return sistrip::CALIBRATION_VFS_BEST;
1196 }
1197
1198 else if (mon.find(sistrip::calibrationAmplitude_) != std::string::npos) {
1199 return sistrip::CALIBRATION_AMPLITUDE_ALL_STRIPS;
1200 } else if (mon.find(sistrip::calibrationTail_) != std::string::npos) {
1201 return sistrip::CALIBRATION_TAIL_ALL_STRIPS;
1202 } else if (mon.find(sistrip::calibrationRiseTime_) != std::string::npos) {
1203 return sistrip::CALIBRATION_RISETIME_ALL_STRIPS;
1204 } else if (mon.find(sistrip::calibrationDecayTime_) != std::string::npos) {
1205 return sistrip::CALIBRATION_DECAYTIME_ALL_STRIPS;
1206 } else if (mon.find(sistrip::calibrationPeakTime_) != std::string::npos) {
1207 return sistrip::CALIBRATION_PEAKTIME_ALL_STRIPS;
1208 } else if (mon.find(sistrip::calibrationTurnOn_) != std::string::npos) {
1209 return sistrip::CALIBRATION_TURNON_ALL_STRIPS;
1210 } else if (mon.find(sistrip::calibrationBaseline_) != std::string::npos) {
1211 return sistrip::CALIBRATION_BASELINE_ALL_STRIPS;
1212 } else if (mon.find(sistrip::calibrationUndershoot_) != std::string::npos) {
1213 return sistrip::CALIBRATION_UNDERSHOOT_ALL_STRIPS;
1214 } else if (mon.find(sistrip::calibrationSmearing_) != std::string::npos) {
1215 return sistrip::CALIBRATION_SMEARING_ALL_STRIPS;
1216 } else if (mon.find(sistrip::calibrationChi2_) != std::string::npos) {
1217 return sistrip::CALIBRATION_CHI2_ALL_STRIPS;
1218 }
1219
1220
1221 else if (mon.find(sistrip::daqScopeModeMeanSignal_) != std::string::npos) {
1222 return sistrip::DAQ_SCOPE_MODE_MEAN_SIGNAL;
1223 }
1224
1225
1226 else if (mon.find(sistrip::undefinedMonitorable_) != std::string::npos) {
1227 return sistrip::UNDEFINED_MONITORABLE;
1228 } else if (mon.empty()) {
1229 return sistrip::UNDEFINED_MONITORABLE;
1230 } else {
1231 return sistrip::UNKNOWN_MONITORABLE;
1232 }
1233 }
1234
1235
1236
1237 std::string SiStripEnumsAndStrings::presentation(const sistrip::Presentation& type) {
1238 if (type == sistrip::HISTO_1D) {
1239 return sistrip::histo1d_;
1240 } else if (type == sistrip::HISTO_2D_SUM) {
1241 return sistrip::histo2dSum_;
1242 } else if (type == sistrip::HISTO_2D_SCATTER) {
1243 return sistrip::histo2dScatter_;
1244 } else if (type == sistrip::PROFILE_1D) {
1245 return sistrip::profile1D_;
1246 } else if (type == sistrip::UNDEFINED_PRESENTATION) {
1247 return sistrip::undefinedPresentation_;
1248 } else {
1249 return sistrip::unknownPresentation_;
1250 }
1251 }
1252
1253
1254
1255 sistrip::Presentation SiStripEnumsAndStrings::presentation(const std::string& type) {
1256 if (type.find(sistrip::histo1d_) != std::string::npos) {
1257 return sistrip::HISTO_1D;
1258 } else if (type.find(sistrip::histo2dSum_) != std::string::npos) {
1259 return sistrip::HISTO_2D_SUM;
1260 } else if (type.find(sistrip::histo2dScatter_) != std::string::npos) {
1261 return sistrip::HISTO_2D_SCATTER;
1262 } else if (type.find(sistrip::profile1D_) != std::string::npos) {
1263 return sistrip::PROFILE_1D;
1264 } else if (type.find(sistrip::undefinedPresentation_) != std::string::npos) {
1265 return sistrip::UNDEFINED_PRESENTATION;
1266 } else if (type.empty()) {
1267 return sistrip::UNDEFINED_PRESENTATION;
1268 } else {
1269 return sistrip::UNKNOWN_PRESENTATION;
1270 }
1271 }
1272
1273
1274
1275 std::string SiStripEnumsAndStrings::cablingSource(const sistrip::CablingSource& source) {
1276 if (source == sistrip::CABLING_FROM_CONNS) {
1277 return sistrip::cablingFromConns_;
1278 } else if (source == sistrip::CABLING_FROM_DEVICES) {
1279 return sistrip::cablingFromDevices_;
1280 } else if (source == sistrip::CABLING_FROM_DETIDS) {
1281 return sistrip::cablingFromDetIds_;
1282 } else if (source == sistrip::UNDEFINED_CABLING_SOURCE) {
1283 return sistrip::undefinedCablingSource_;
1284 } else {
1285 return sistrip::unknownCablingSource_;
1286 }
1287 }
1288
1289
1290
1291 sistrip::CablingSource SiStripEnumsAndStrings::cablingSource(const std::string& source) {
1292 if (source.find(sistrip::cablingFromConns_) != std::string::npos) {
1293 return sistrip::CABLING_FROM_CONNS;
1294 } else if (source.find(sistrip::cablingFromDevices_) != std::string::npos) {
1295 return sistrip::CABLING_FROM_DEVICES;
1296 } else if (source.find(sistrip::cablingFromDetIds_) != std::string::npos) {
1297 return sistrip::CABLING_FROM_DETIDS;
1298 } else if (source.find(sistrip::undefinedCablingSource_) != std::string::npos) {
1299 return sistrip::UNDEFINED_CABLING_SOURCE;
1300 } else if (source.empty()) {
1301 return sistrip::UNDEFINED_CABLING_SOURCE;
1302 } else if (source == "CONNECTIONS") {
1303 return sistrip::CABLING_FROM_CONNS;
1304 } else if (source == "DEVICES") {
1305 return sistrip::CABLING_FROM_DEVICES;
1306 } else if (source == "DETIDS") {
1307 return sistrip::CABLING_FROM_DETIDS;
1308 } else if (source == "UNDEFINED") {
1309 return sistrip::UNDEFINED_CABLING_SOURCE;
1310 } else {
1311 return sistrip::UNKNOWN_CABLING_SOURCE;
1312 }
1313 }