CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmsTrackerSubStrctBuilder.cc
Go to the documentation of this file.
10 #include <vector>
11 
12 #include <bitset>
13 
15  : m_totalBlade( totalBlade )
16 {}
17 
18 void
20 {
21  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
22  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
23  CmsTrackerDiskBuilder theCmsTrackerDiskBuilder( m_totalBlade );
24 
27  {
29  theCmsTrackerLayerBuilder.build(fv,subdet,s);
30  break;
32  theCmsTrackerWheelBuilder.build(fv,subdet,s);
33  break;
34  case GeometricDet::disk:
35  theCmsTrackerDiskBuilder.build(fv,subdet,s);
36  break;
37 
38  default:
39  edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
40  }
41 
42  g->addComponent(subdet);
43 
44 }
45 
46 void
48 {
50 
51  switch( comp.front()->type())
52  {
54  std::sort( comp.begin(), comp.end(), LessR());
55  break;
57  std::sort( comp.begin(), comp.end(), LessModZ());
58  break;
59  case GeometricDet::disk:
60  std::sort( comp.begin(), comp.end(), LessModZ());
61  break;
62  default:
63  edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
64  }
65 
66  for( uint32_t i = 0; i < comp.size(); i++ )
67  {
68  comp[i]->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
69  }
70 }
71 
static std::string getString(std::string const &, DDFilteredView *)
int i
Definition: DBlmapReader.cc:9
void addComponent(GeometricDet *)
virtual void sortNS(DDFilteredView &, GeometricDet *)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< GeometricDet const * > GeometricDetContainer
Definition: GeometricDet.h:36
CmsTrackerSubStrctBuilder(unsigned int totalBlade)
virtual void build(DDFilteredView &, GeometricDet *, std::string)
virtual void buildComponent(DDFilteredView &, GeometricDet *, std::string)
GeometricDetContainer & components()
Definition: GeometricDet.h:163
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum