CMS 3D CMS Logo

CondDBCmsMTDConstruction.cc
Go to the documentation of this file.
9 
10 using namespace cms;
11 
13 
16 
17  size_t detMax = pgd.pgeomdets_.size();
18  size_t tri = 1;
19  std::vector<GeometricTimingDet*> hier;
20  int lev=1;
21  GeometricTimingDet* subdet = mtd;
22  hier.emplace_back(subdet);
23  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 1 ) {
24  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
25  ++tri;
26  hier.back()->addComponent(subdet);
27  hier.emplace_back(subdet);
28  ++lev;
29  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 2 ) {
30  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
31  ++tri;
32  hier.back()->addComponent(subdet);
33  hier.emplace_back(subdet);
34  ++lev;
35  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 3 ) {
36  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
37  ++tri;
38  hier.back()->addComponent(subdet);
39  hier.emplace_back(subdet);
40  ++lev;
41  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 4 ) {
42  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
43  ++tri;
44  hier.back()->addComponent(subdet);
45  hier.emplace_back(subdet);
46  ++lev;
47  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 5 ) {
48  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
49  ++tri;
50  hier.back()->addComponent(subdet);
51  hier.emplace_back(subdet);
52  ++lev;
53  while ( tri < detMax && pgd.pgeomdets_[tri].level_ == 6 ) {
54  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
55  ++tri;
56  hier.back()->addComponent(subdet);
57  }
58  --lev;
59  hier.pop_back();
60  }
61  --lev;
62  hier.pop_back();
63  }
64  --lev;
65  hier.pop_back();
66  }
67  --lev;
68  hier.pop_back();
69  }
70  --lev;
71  hier.pop_back();
72  }
73  return mtd;
74 }
75 
const GeometricTimingDet * construct(const PGeometricTimingDet &pgd)
std::vector< Item > pgeomdets_
Namespace of DDCMS conversion namespace.