CMS 3D CMS Logo

DDDCmsTrackerContruction.cc
Go to the documentation of this file.
8 
9 using namespace cms;
10 
12 {}
13 
14 const GeometricDet*
15 DDDCmsTrackerContruction::construct( const DDCompactView* cpv, std::vector<int> detidShifts)
16 {
17  attribute = "TkDDDStructure"; // could come from .orcarc
19 
20  DDFilteredView fv( *cpv, filter );
21  if( theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker )
22  {
23  fv.firstChild();
24  if( theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker )
25  {
26  throw cms::Exception( "Configuration" ) << " The first child of the DDFilteredView is not what is expected \n"
27  << ExtractStringFromDDD::getString( attribute, &fv ) << "\n";
28  }
29  }
30 
32  CmsTrackerBuilder theCmsTrackerBuilder;
33  theCmsTrackerBuilder.build( fv, tracker, attribute );
34 
35  CmsTrackerDetIdBuilder theCmsTrackerDetIdBuilder( detidShifts );
36 
37  tracker = theCmsTrackerDetIdBuilder.buildId( tracker );
38  fv.parent();
39  //
40  // set the Tracker
41  //
42  //TrackerMapDDDtoID::instance().setTracker(tracker);
43  //NOTE: If it is decided that the TrackerMapDDDtoID should be
44  // constructed here, then we should return from this
45  // function so that the EventSetup can manage it
46 
47  return tracker;
48 }
49 
static std::string getString(std::string const &, DDFilteredView *)
bool parent()
set the current node to the parent node ...
GeometricDet * buildId(GeometricDet *det)
type of data representation of DDCompactView
Definition: DDCompactView.h:90
virtual void build(DDFilteredView &, GeometricDet *, std::string)
bool firstChild()
set the current node to the first child ...
const GeometricDet * construct(const DDCompactView *cpv, std::vector< int > detidShifts)