#include <Geometry/TrackerNumberingBuilder/plugins/DDDCmsTrackerContruction.h>
Public Member Functions | |
const GeometricDet * | construct (const DDCompactView *cpv) |
DDDCmsTrackerContruction () | |
Protected Attributes | |
std::string | attribute |
CmsTrackerStringToEnum | theCmsTrackerStringToEnum |
It will only build subdets, then call subdet builders
Definition at line 16 of file DDDCmsTrackerContruction.h.
DDDCmsTrackerContruction::DDDCmsTrackerContruction | ( | ) |
const GeometricDet * DDDCmsTrackerContruction::construct | ( | const DDCompactView * | cpv | ) |
Definition at line 15 of file DDDCmsTrackerContruction.cc.
References DDFilteredView::addFilter(), attribute, CmsTrackerLevelBuilder::build(), CmsTrackerDetIdBuilder::buildId(), Exception, filter, DDFilteredView::firstChild(), ExtractStringFromDDD::getString(), DDSpecificsFilter::not_equals, DDFilteredView::parent(), DDSpecificsFilter::setCriteria(), theCmsTrackerStringToEnum, GeometricDet::Tracker, CmsTrackerStringToEnum::type(), and value.
Referenced by TrackerGeometricDetESModule::produceFromDDDXML().
00015 { 00016 attribute = "TkDDDStructure"; // could come from .orcarc 00017 std::string value = "any"; 00018 DDSpecificsFilter filter; 00019 DDValue ddv(attribute,value,0); 00020 filter.setCriteria(ddv,DDSpecificsFilter::not_equals); 00021 00022 DDFilteredView fv(*cpv); 00023 fv.addFilter(filter); 00024 if (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker){ 00025 fv.firstChild(); 00026 if (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker){ 00027 00028 throw cms::Exception("Configuration") <<" The first child of the DDFilteredView is not what is expected \n" 00029 <<ExtractStringFromDDD::getString(attribute,&fv)<<"\n"; 00030 } 00031 } 00032 00033 GeometricDet* tracker = new GeometricDet(&fv,GeometricDet::Tracker); 00034 CmsTrackerBuilder theCmsTrackerBuilder; 00035 theCmsTrackerBuilder.build(fv,tracker,attribute); 00036 00037 00038 CmsTrackerDetIdBuilder theCmsTrackerDetIdBuilder; 00039 00040 tracker = theCmsTrackerDetIdBuilder.buildId(tracker); 00041 fv.parent(); 00042 // 00043 // set the Tracker 00044 // 00045 //TrackerMapDDDtoID::instance().setTracker(tracker); 00046 //NOTE: If it is decided that the TrackerMapDDDtoID should be 00047 // constructed here, then we should return from this 00048 // function so that the EventSetup can manage it 00049 00050 return tracker; 00051 }
std::string DDDCmsTrackerContruction::attribute [protected] |