CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CmsTrackerDebugNavigator Class Reference

#include <CmsTrackerDebugNavigator.h>

Public Member Functions

 CmsTrackerDebugNavigator (const std::vector< GeometricDetExtra > &)
 
void dump (const GeometricDet &, const std::vector< GeometricDetExtra > &)
 

Private Member Functions

void iterate (const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
 

Private Attributes

CmsTrackerStringToEnum _CmsTrackerStringToEnum
 
std::map< uint32_t, const GeometricDetExtra * > _helperMap
 
int numinstances [30]
 

Detailed Description

This class travel recursively a GeometricDet and dumps the information about type

Definition at line 13 of file CmsTrackerDebugNavigator.h.

Constructor & Destructor Documentation

◆ CmsTrackerDebugNavigator()

CmsTrackerDebugNavigator::CmsTrackerDebugNavigator ( const std::vector< GeometricDetExtra > &  gdes)

Definition at line 8 of file CmsTrackerDebugNavigator.cc.

8  {
9  std::vector<GeometricDetExtra>::const_iterator gdeiEnd(gdes.end());
10  std::vector<GeometricDetExtra>::const_iterator gdei(gdes.begin());
11  for (; gdei != gdeiEnd; ++gdei) {
12  const GeometricDetExtra* gdeaddr = &(*gdei);
13  _helperMap[gdei->geographicalId().rawId()] = gdeaddr;
14  }
15 }

References _helperMap.

Member Function Documentation

◆ dump()

void CmsTrackerDebugNavigator::dump ( const GeometricDet in,
const std::vector< GeometricDetExtra > &  gdes 
)

Definition at line 17 of file CmsTrackerDebugNavigator.cc.

17  {
18  edm::LogInfo("CmsTrackerDebugNavigator") << " CmsTrackerDebugNavigator - Starting debug";
19  for (int k = 0; k < 20; k++)
20  numinstances[k] = 0;
21  iterate(in, 0, gdes);
22 
23  for (int k = 0; k < 20; k++) {
24  edm::LogInfo("CmsTrackerDebugNavigator")
25  << " CmsTrackerDebugNavigator has found " << numinstances[k] << " GeometricDets at level " << k;
26  }
27 }

References recoMuon::in, iterate(), dqmdumpme::k, and numinstances.

◆ iterate()

void CmsTrackerDebugNavigator::iterate ( const GeometricDet in,
int  level,
const std::vector< GeometricDetExtra > &  gdes 
)
private

Definition at line 29 of file CmsTrackerDebugNavigator.cc.

29  {
31  for (unsigned int k = 0; k < in.components().size(); k++) {
32  std::string spaces = "";
33  for (unsigned int i = 0; (int)i <= level; i++)
34  spaces += " ";
35  const GeometricDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
36  edm::LogInfo("CmsTrackerDebugNavigator")
37  << level << spaces << "### VOLUME " << in.components()[k]->name() << " of type " << in.components()[k]->type()
38  << " copy number " << extra->copyno() << " positioned in " << in.name() << " global position of centre "
39  << in.components()[k]->translation()
40  // << " rotation matrix " << in.components()[k]->rotation()
41  << " volume = " << extra->volume() << " cm3"
42  << " density = " << extra->density() << " g/cm3"
43  << " weight " << extra->weight() << " g" << std::endl;
44  iterate(*((in.components())[k]), level + 1, gdes);
45  }
46  return;
47 }

References _helperMap, GeometricDetExtra::copyno(), GeometricDetExtra::density(), mps_fire::i, recoMuon::in, createfilelist::int, dqmdumpme::k, personalPlayback::level, numinstances, AlCaHLTBitMon_QueryRunRegistry::string, GeometricDetExtra::volume(), and GeometricDetExtra::weight().

Referenced by dump().

Member Data Documentation

◆ _CmsTrackerStringToEnum

CmsTrackerStringToEnum CmsTrackerDebugNavigator::_CmsTrackerStringToEnum
private

Definition at line 21 of file CmsTrackerDebugNavigator.h.

◆ _helperMap

std::map<uint32_t, const GeometricDetExtra*> CmsTrackerDebugNavigator::_helperMap
private

Definition at line 22 of file CmsTrackerDebugNavigator.h.

Referenced by CmsTrackerDebugNavigator(), and iterate().

◆ numinstances

int CmsTrackerDebugNavigator::numinstances[30]
private

Definition at line 20 of file CmsTrackerDebugNavigator.h.

Referenced by dump(), and iterate().

personalPlayback.level
level
Definition: personalPlayback.py:22
mps_fire.i
i
Definition: mps_fire.py:355
edm::LogInfo
Definition: MessageLogger.h:254
CmsTrackerDebugNavigator::_helperMap
std::map< uint32_t, const GeometricDetExtra * > _helperMap
Definition: CmsTrackerDebugNavigator.h:22
GeometricDetExtra::weight
double weight() const
Definition: GeometricDetExtra.h:53
GeometricDetExtra::volume
double volume() const
Definition: GeometricDetExtra.h:51
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsTrackerDebugNavigator::numinstances
int numinstances[30]
Definition: CmsTrackerDebugNavigator.h:20
recoMuon::in
Definition: RecoMuonEnumerators.h:6
createfilelist.int
int
Definition: createfilelist.py:10
GeometricDetExtra
Definition: GeometricDetExtra.h:17
CmsTrackerDebugNavigator::iterate
void iterate(const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
Definition: CmsTrackerDebugNavigator.cc:29
GeometricDetExtra::density
double density() const
Definition: GeometricDetExtra.h:52
GeometricDetExtra::copyno
int copyno() const
Definition: GeometricDetExtra.h:50