CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Enumerations | Functions
MTDTopologyMode Namespace Reference

Enumerations

enum  Mode {
  Mode::undefined = 0, Mode::tile = 1, Mode::bar = 2, Mode::barzflat = 3,
  Mode::barphiflat = 4, Mode::btlv1etlv4 = 5, Mode::btlv1etlv5 = 6
}
 

Functions

BTLDetId::CrysLayout crysLayoutFromTopoMode (const int &topoMode)
 
Mode MTDStringToEnumParser (const std::string &)
 

Enumeration Type Documentation

enum MTDTopologyMode::Mode
strong

Function Documentation

BTLDetId::CrysLayout MTDTopologyMode::crysLayoutFromTopoMode ( const int &  topoMode)
inline

Returns BTLDetId::CrysLayout as a function of topology mode (to accomodate TDR/post TDR ETL scenarios).

Definition at line 19 of file MTDTopologyMode.h.

References BTLDetId::barphiflat.

Referenced by BtlDigiHitsValidation::analyze(), BtlSimHitsValidation::analyze(), BtlLocalRecoValidation::analyze(), MTDThresholdClusterizer::clusterize(), MTDThresholdClusterizer::copy_to_buffer(), BTLDeviceSim::getHitsResponse(), and MTDTimeCalib::getTimeCalib().

19  {
20  return (topoMode <= static_cast<int>(BTLDetId::CrysLayout::barphiflat) ? static_cast<BTLDetId::CrysLayout>(topoMode)
22  }
Mode MTDTopologyMode::MTDStringToEnumParser ( const std::string &  value)

Definition at line 7 of file MTDTopologyMode.cc.

References bar, barphiflat, barzflat, btlv1etlv4, btlv1etlv5, Exception, convertSQLitetoXML_cfg::output, PostProcessorHGCAL_cfi::prefix, AlCaHLTBitMon_QueryRunRegistry::string, tile, and undefined.

Referenced by MTDParametersFromDD::build().

7  {
8  std::string prefix("MTDTopologyMode::");
9  Mode output = Mode::undefined;
10  if (value == prefix + "tile") {
11  output = Mode::tile;
12  } else if (value == prefix + "bar") {
13  output = Mode::bar;
14  } else if (value == prefix + "barzflat") {
15  output = Mode::barzflat;
16  } else if (value == prefix + "barphiflat") {
17  output = Mode::barphiflat;
18  } else if (value == prefix + "btlv1etlv4") {
19  output = Mode::btlv1etlv4;
20  } else if (value == prefix + "btlv1etlv5") {
21  output = Mode::btlv1etlv5;
22  } else {
23  throw cms::Exception("MTDTopologyModeError") << "the value " << value << " is not defined.";
24  }
25  return output;
26  }