CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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(), relval_steps::k, and numinstances.

17  {
18  edm::LogInfo("CmsTrackerDebugNavigator")<<" CmsTrackerDebugNavigator - Starting debug";
19  for (int k=0; k<20; k++) numinstances[k]=0;
20  iterate(in,0, gdes);
21 
22  for (int k=0; k<20; k++){
23  edm::LogInfo("CmsTrackerDebugNavigator")<<" CmsTrackerDebugNavigator has found "<<numinstances[k]<<" GeometricDets at level "<<k;
24  }
25 }
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 27 of file CmsTrackerDebugNavigator.cc.

References _helperMap, GeometricDet::components(), GeometricDetExtra::copyno(), GeometricDetExtra::density(), i, relval_steps::k, testEve_cfg::level, DDName::name(), GeometricDet::name(), numinstances, AlCaHLTBitMon_QueryRunRegistry::string, GeometricDetExtra::volume(), and GeometricDetExtra::weight().

Referenced by dump().

27  {
29  for (unsigned int k=0; k<in.components().size(); k++){
30  std::string spaces = "";
31  for(unsigned int i=0; (int)i<=level; i++) spaces+=" ";
32  const GeometricDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
33  edm::LogInfo("CmsTrackerDebugNavigator") << level << spaces
34  << "### VOLUME " << in.components()[k]->name().name()
35  << " of type " << in.components()[k]->type()
36  << " copy number " << extra->copyno()
37  << " positioned in " << in.name().name()
38  << " global position of centre " << in.components()[k]->translation()
39  // << " rotation matrix " << in.components()[k]->rotation()
40  << " volume = " << extra->volume() << " cm3"
41  << " density = " << extra->density() << " g/cm3"
42  << " weight " << extra->weight() << " g"
43  << std::endl;
44  iterate(*((in.components())[k]),level+1, gdes);
45  }
46  return;
47 }
int i
Definition: DBlmapReader.cc:9
double weight() const
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:174
DDName const & name() const
Definition: GeometricDet.h:144
double density() const
double volume() const
void iterate(const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
std::map< uint32_t, const GeometricDetExtra * > _helperMap
tuple level
Definition: testEve_cfg.py:34
const std::string & name() const
Returns the name.
Definition: DDName.cc:87

Member Data Documentation

CmsTrackerStringToEnum CmsTrackerDebugNavigator::_CmsTrackerStringToEnum
private

Definition at line 20 of file CmsTrackerDebugNavigator.h.

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

Definition at line 21 of file CmsTrackerDebugNavigator.h.

Referenced by CmsTrackerDebugNavigator(), and iterate().

int CmsTrackerDebugNavigator::numinstances[30]
private

Definition at line 19 of file CmsTrackerDebugNavigator.h.

Referenced by dump(), and iterate().