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 ( const std::vector< GeometricDetExtra > &  gdes)

Definition at line 8 of file CmsTrackerDebugNavigator.cc.

References _helperMap.

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 }
std::map< uint32_t, const GeometricDetExtra * > _helperMap

Member Function Documentation

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

Definition at line 17 of file CmsTrackerDebugNavigator.cc.

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

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 }
void iterate(const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
void CmsTrackerDebugNavigator::iterate ( const GeometricDet in,
int  level,
const std::vector< GeometricDetExtra > &  gdes 
)
private

Definition at line 29 of file CmsTrackerDebugNavigator.cc.

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

Referenced by dump().

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 }
double weight() const
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:139
std::string const & name() const
Definition: GeometricDet.h:126
double density() const
double volume() const
void iterate(const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
std::map< uint32_t, const GeometricDetExtra * > _helperMap

Member Data Documentation

CmsTrackerStringToEnum CmsTrackerDebugNavigator::_CmsTrackerStringToEnum
private

Definition at line 21 of file CmsTrackerDebugNavigator.h.

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

Definition at line 22 of file CmsTrackerDebugNavigator.h.

Referenced by CmsTrackerDebugNavigator(), and iterate().

int CmsTrackerDebugNavigator::numinstances[30]
private

Definition at line 20 of file CmsTrackerDebugNavigator.h.

Referenced by dump(), and iterate().