CMS 3D CMS Logo

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