CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CmsTrackerDebugNavigator Class Reference

#include <CmsTrackerDebugNavigator.h>

List of all members.

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.

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

Member Function Documentation

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

Definition at line 17 of file CmsTrackerDebugNavigator.cc.

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

                                                                                                   {
  edm::LogInfo("CmsTrackerDebugNavigator")<<" CmsTrackerDebugNavigator - Starting debug";
  for (int k=0; k<20; k++) numinstances[k]=0;
  iterate(in,0, gdes);
  
  for (int k=0; k<20; k++){
    edm::LogInfo("CmsTrackerDebugNavigator")<<" CmsTrackerDebugNavigator has found "<<numinstances[k]<<" GeometricDets at level "<<k;
  }
}
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, gen::k, testEve_cfg::level, GeometricDet::name(), DDName::name(), numinstances, AlCaHLTBitMon_QueryRunRegistry::string, GeometricDetExtra::volume(), and GeometricDetExtra::weight().

Referenced by dump().

                                                                                                                 {
  numinstances[level]++;
  for (unsigned int k=0; k<in.components().size(); k++){
    std::string spaces = "";
    for(unsigned int i=0; (int)i<=level; i++) spaces+="  ";
    const GeometricDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
    edm::LogInfo("CmsTrackerDebugNavigator") << level << spaces
                                             << "### VOLUME " << in.components()[k]->name().name()
                                             << " of type " << in.components()[k]->type()
                                             << " copy number " << extra->copyno()
                                             << " positioned in " << in.name().name()
                                             << " global position of centre " << in.components()[k]->translation()
      //              << " rotation matrix " << in.components()[k]->rotation()
                                             << " volume = "  << extra->volume()  << " cm3"
                                             << " density = " << extra->density() << " g/cm3"
                                             << " weight "    << extra->weight()  << " g"
                                             << std::endl;
    iterate(*((in.components())[k]),level+1, gdes);
  }
  return;
}

Member Data Documentation

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().

Definition at line 19 of file CmsTrackerDebugNavigator.h.

Referenced by dump(), and iterate().