CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
DDDCmsMTDConstruction Class Reference

#include <DDDCmsMTDConstruction.h>

Public Member Functions

 DDDCmsMTDConstruction ()=delete
 

Static Public Member Functions

static std::unique_ptr< GeometricTimingDetconstruct (const DDCompactView &cpv, std::vector< int > detidShifts)
 

Detailed Description

High level class to build a tracker. It will only build subdets, then call subdet builders

Definition at line 18 of file DDDCmsMTDConstruction.h.

Constructor & Destructor Documentation

DDDCmsMTDConstruction::DDDCmsMTDConstruction ( )
delete

Member Function Documentation

std::unique_ptr< GeometricTimingDet > DDDCmsMTDConstruction::construct ( const DDCompactView cpv,
std::vector< int >  detidShifts 
)
static

Definition at line 35 of file DDDCmsMTDConstruction.cc.

References DDNameFilter::add(), CmsMTDLevelBuilder::build(), Exception, ALCARECOTkAlBeamHalo_cff::filter, cms::DDFilteredView::firstChild(), ExtractStringFromDDD< FilteredView >::getString(), GeometricTimingDet::MTD, cms::DDFilteredView::parent(), AlCaHLTBitMon_QueryRunRegistry::string, CmsMTDStringToEnum::type(), and DDNameFilter::veto().

Referenced by MTDGeometricTimingDetESModule::produce().

36  {
37  std::string attribute{"CMSCutsRegion"};
39  filter.add("mtd:");
40  filter.add("btl:");
41  filter.add("etl:");
42  filter.veto("service");
43  filter.veto("support");
44  filter.veto("FSide");
45  filter.veto("BSide");
46  filter.veto("LSide");
47  filter.veto("RSide");
48  filter.veto("Between");
49  filter.veto("SupportPlate");
50  filter.veto("Shield");
51 
52  DDFilteredView fv(cpv, filter);
53 
54  CmsMTDStringToEnum theCmsMTDStringToEnum;
55  auto check_root = theCmsMTDStringToEnum.type(ExtractStringFromDDD::getString(attribute, &fv));
56  if (check_root != GeometricTimingDet::MTD) {
57  fv.firstChild();
58  auto check_child = theCmsMTDStringToEnum.type(ExtractStringFromDDD::getString(attribute, &fv));
59  if (check_child != GeometricTimingDet::MTD) {
60  throw cms::Exception("Configuration") << " The first child of the DDFilteredView is not what is expected \n"
61  << ExtractStringFromDDD::getString(attribute, &fv) << "\n";
62  }
63  fv.parent();
64  }
65 
66  auto mtd = std::make_unique<GeometricTimingDet>(&fv, GeometricTimingDet::MTD);
67  CmsMTDBuilder theCmsMTDBuilder;
68  theCmsMTDBuilder.build(fv, mtd.get(), attribute);
69 
70  return mtd;
71 }
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
void add(const std::string &add)
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
static std::string getString(std::string const &, DDFilteredView *)
void veto(const std::string &veto)