test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
18  std::string value = "any";
20  DDValue ddv( attribute, value, 0 );
21  filter.setCriteria( ddv, DDCompOp::not_equals );
22 
23  DDFilteredView fv( *cpv );
24  fv.addFilter( filter );
25  if( theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker )
26  {
27  fv.firstChild();
28  if( theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker )
29  {
30  throw cms::Exception( "Configuration" ) << " The first child of the DDFilteredView is not what is expected \n"
31  << ExtractStringFromDDD::getString( attribute, &fv ) << "\n";
32  }
33  }
34 
36  CmsTrackerBuilder theCmsTrackerBuilder;
37  theCmsTrackerBuilder.build( fv, tracker, attribute );
38 
39  CmsTrackerDetIdBuilder theCmsTrackerDetIdBuilder( detidShifts );
40 
41  tracker = theCmsTrackerDetIdBuilder.buildId( tracker );
42  fv.parent();
43  //
44  // set the Tracker
45  //
46  //TrackerMapDDDtoID::instance().setTracker(tracker);
47  //NOTE: If it is decided that the TrackerMapDDDtoID should be
48  // constructed here, then we should return from this
49  // function so that the EventSetup can manage it
50 
51  return tracker;
52 }
53 
static std::string getString(std::string const &, DDFilteredView *)
bool parent()
set the current node to the parent node ...
void addFilter(const DDFilter &, DDLogOp op=DDLogOp::AND)
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)
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:253
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:33