CMS 3D CMS Logo

CmsMTDDebugNavigator.cc
Go to the documentation of this file.
5 
7 
8 CmsMTDDebugNavigator::CmsMTDDebugNavigator(const std::vector<GeometricTimingDetExtra>& gdes) {
9  for (const auto& gdei : gdes) {
10  const GeometricTimingDetExtra* gdeaddr = &gdei;
11  _helperMap[gdei.geographicalId().rawId()] = gdeaddr;
12  }
13 }
14 
15 void CmsMTDDebugNavigator::dump(const GeometricTimingDet& in, const std::vector<GeometricTimingDetExtra>& gdes) {
16  edm::LogInfo("CmsMTDDebugNavigator") << " CmsMTDDebugNavigator - Starting debug";
17  for (int k = 0; k < 20; k++)
18  numinstances[k] = 0;
19  iterate(in, 0, gdes);
20 
21  for (int k = 0; k < 20; k++) {
22  edm::LogInfo("CmsMTDDebugNavigator") << " CmsMTDDebugNavigator has found " << numinstances[k]
23  << " GeometricTimingDets at level " << k;
24  }
25 }
26 
28  int level,
29  const std::vector<GeometricTimingDetExtra>& gdes) {
31  std::string spaces(' ', level * 2);
32  for (unsigned int k = 0; k < in.components().size(); k++) {
33  const GeometricTimingDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
34  edm::LogInfo("CmsMTDDebugNavigator") << level << spaces << "### VOLUME " << in.components()[k]->name()
35  << " of type " << in.components()[k]->type() << " copy number "
36  << extra->copyno() << " positioned in " << in.name()
37  << " global position of centre " << in.components()[k]->translation()
38  << " volume = " << extra->volume() << " cm3"
39  << " density = " << extra->density() << " g/cm3"
40  << " weight " << extra->weight() << " g" << std::endl;
41  iterate(*((in.components())[k]), level + 1, gdes);
42  }
43  return;
44 }
personalPlayback.level
level
Definition: personalPlayback.py:22
CmsMTDDebugNavigator::numinstances
int numinstances[30]
Definition: CmsMTDDebugNavigator.h:20
CmsMTDDebugNavigator.h
MessageLogger.h
CmsMTDDebugNavigator::dump
void dump(const GeometricTimingDet &, const std::vector< GeometricTimingDetExtra > &)
Definition: CmsMTDDebugNavigator.cc:15
GeometricTimingDetExtra::density
double density() const
Definition: GeometricTimingDetExtra.h:53
edm::LogInfo
Definition: MessageLogger.h:254
GeometricTimingDetExtra
Definition: GeometricTimingDetExtra.h:13
GeometricTimingDetExtra::weight
double weight() const
Definition: GeometricTimingDetExtra.h:54
CmsMTDDebugNavigator::_helperMap
std::map< uint32_t, const GeometricTimingDetExtra * > _helperMap
Definition: CmsMTDDebugNavigator.h:22
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeometricTimingDetExtra.h
recoMuon::in
Definition: RecoMuonEnumerators.h:6
GeometricTimingDet
Definition: GeometricTimingDet.h:28
CmsMTDDebugNavigator::CmsMTDDebugNavigator
CmsMTDDebugNavigator(const std::vector< GeometricTimingDetExtra > &)
Definition: CmsMTDDebugNavigator.cc:8
GeometricTimingDetExtra::volume
double volume() const
Definition: GeometricTimingDetExtra.h:52
GeometricTimingDet.h
CmsMTDDebugNavigator::iterate
void iterate(const GeometricTimingDet &, int, const std::vector< GeometricTimingDetExtra > &)
Definition: CmsMTDDebugNavigator.cc:27
GeometricTimingDetExtra::copyno
int copyno() const
Definition: GeometricTimingDetExtra.h:51