CMS 3D CMS Logo

CmsMTDSubStrctBuilder.cc
Go to the documentation of this file.
8 #include <vector>
9 
10 #include <bitset>
11 
13 
15  CmsMTDTrayBuilder theCmsMTDTrayBuilder;
16 
18 
19  switch (theCmsMTDStringToEnum.type(fv.logicalPart().name().name())) {
21  theCmsMTDTrayBuilder.build(fv, subdet, side);
22  break;
23 
24  default:
25  throw cms::Exception("CmsMTDSubStrctBuilder")
26  << " ERROR - I was expecting a BTLLayer... I got a " << fv.logicalPart().name().name();
27  }
28 
29  g->addComponent(subdet);
30 }
31 
35 
36  switch (comp.front()->type()) {
38  std::stable_sort(comp.begin(), comp.end(), isLessR);
39  break;
40  default:
41  edm::LogError("CmsMTDSubStrctBuilder")
42  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
43  }
44 
45  for (uint32_t i = 0; i < comp.size(); i++) {
46  det->component(i)->setGeographicalID(i + 1); // Every subdetector: Layer/Disk/Wheel Number
47  }
48 }
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:59
static bool isLessR(const GeometricTimingDet *a, const GeometricTimingDet *b)
CmsMTDStringToEnum theCmsMTDStringToEnum
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
ConstGeometricTimingDetContainer & components()
void addComponent(GeometricTimingDet *)
GeometricTimingDet * component(size_t index)
void setGeographicalID(DetId id)
void build(DDFilteredView &, GeometricTimingDet *, std::string) override
void sortNS(DDFilteredView &, GeometricTimingDet *) override
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
void buildComponent(DDFilteredView &, GeometricTimingDet *, std::string) override
const std::string & name() const
Returns the name.
Definition: DDName.cc:40