CMS 3D CMS Logo

List of all members | Public Member Functions
CondDBCmsMTDConstruction Class Reference

#include <CondDBCmsMTDConstruction.h>

Public Member Functions

 CondDBCmsMTDConstruction ()
 
const GeometricTimingDetconstruct (const PGeometricTimingDet &pgd)
 

Detailed Description

High level class to build a tracker. It will only build subdets, then call subdet builders

Definition at line 17 of file CondDBCmsMTDConstruction.h.

Constructor & Destructor Documentation

CondDBCmsMTDConstruction::CondDBCmsMTDConstruction ( )

Definition at line 12 of file CondDBCmsMTDConstruction.cc.

12 { }

Member Function Documentation

const GeometricTimingDet * CondDBCmsMTDConstruction::construct ( const PGeometricTimingDet pgd)

Definition at line 14 of file CondDBCmsMTDConstruction.cc.

References GeometricTimingDet::MTD, and PGeometricTimingDet::pgeomdets_.

Referenced by MTDGeometricTimingDetESModule::produce().

14  {
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 }
std::vector< Item > pgeomdets_