CMS 3D CMS Logo

DDDCmsTrackerContruction Class Reference

High level class to build a tracker. More...

#include <Geometry/TrackerNumberingBuilder/plugins/DDDCmsTrackerContruction.h>

List of all members.

Public Member Functions

const GeometricDetconstruct (const DDCompactView *cpv)
 DDDCmsTrackerContruction ()

Protected Attributes

std::string attribute
CmsTrackerStringToEnum theCmsTrackerStringToEnum


Detailed Description

High level class to build a tracker.

It will only build subdets, then call subdet builders

Definition at line 16 of file DDDCmsTrackerContruction.h.


Constructor & Destructor Documentation

DDDCmsTrackerContruction::DDDCmsTrackerContruction (  ) 

Definition at line 11 of file DDDCmsTrackerContruction.cc.

00011                                                   {
00012 
00013 }


Member Function Documentation

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 }


Member Data Documentation

std::string DDDCmsTrackerContruction::attribute [protected]

Definition at line 23 of file DDDCmsTrackerContruction.h.

Referenced by construct().

CmsTrackerStringToEnum DDDCmsTrackerContruction::theCmsTrackerStringToEnum [protected]

Definition at line 24 of file DDDCmsTrackerContruction.h.

Referenced by construct().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:50 2009 for CMSSW by  doxygen 1.5.4