CMS 3D CMS Logo

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

#include <CmsMTDDebugNavigator.h>

Public Member Functions

 CmsMTDDebugNavigator (const std::vector< GeometricTimingDetExtra > &)
 
void dump (const GeometricTimingDet &, const std::vector< GeometricTimingDetExtra > &)
 

Private Member Functions

void iterate (const GeometricTimingDet &, int, const std::vector< GeometricTimingDetExtra > &)
 

Private Attributes

CmsMTDStringToEnum _CmsMTDStringToEnum
 
std::map< uint32_t, const GeometricTimingDetExtra * > _helperMap
 
int numinstances [30]
 

Detailed Description

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

Definition at line 13 of file CmsMTDDebugNavigator.h.

Constructor & Destructor Documentation

CmsMTDDebugNavigator::CmsMTDDebugNavigator ( const std::vector< GeometricTimingDetExtra > &  gdes)

Definition at line 8 of file CmsMTDDebugNavigator.cc.

References _helperMap.

8  {
9  for( const auto& gdei : gdes ) {
10  const GeometricTimingDetExtra* gdeaddr = &gdei;
11  _helperMap[gdei.geographicalId().rawId()] = gdeaddr;
12  }
13 }
std::map< uint32_t, const GeometricTimingDetExtra * > _helperMap

Member Function Documentation

void CmsMTDDebugNavigator::dump ( const GeometricTimingDet in,
const std::vector< GeometricTimingDetExtra > &  gdes 
)

Definition at line 15 of file CmsMTDDebugNavigator.cc.

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

15  {
16  edm::LogInfo("CmsMTDDebugNavigator")<<" CmsMTDDebugNavigator - Starting debug";
17  for (int k=0; k<20; k++) numinstances[k]=0;
18  iterate(in,0, gdes);
19 
20  for (int k=0; k<20; k++){
21  edm::LogInfo("CmsMTDDebugNavigator")<<" CmsMTDDebugNavigator has found "<<numinstances[k]<<" GeometricTimingDets at level "<<k;
22  }
23 }
int k[5][pyjets_maxn]
void iterate(const GeometricTimingDet &, int, const std::vector< GeometricTimingDetExtra > &)
void CmsMTDDebugNavigator::iterate ( const GeometricTimingDet in,
int  level,
const std::vector< GeometricTimingDetExtra > &  gdes 
)
private

Definition at line 25 of file CmsMTDDebugNavigator.cc.

References _helperMap, GeometricTimingDet::components(), GeometricTimingDetExtra::copyno(), GeometricTimingDetExtra::density(), gen::k, hcalDigis_cfi::level, DDName::name(), GeometricTimingDet::name(), numinstances, AlCaHLTBitMon_QueryRunRegistry::string, GeometricTimingDetExtra::volume(), and GeometricTimingDetExtra::weight().

Referenced by dump().

25  {
27  std::string spaces(' ',level*2);
28  for (unsigned int k=0; k<in.components().size(); k++){
29  const GeometricTimingDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
30  edm::LogInfo("CmsMTDDebugNavigator") << level << spaces
31  << "### VOLUME " << in.components()[k]->name().name()
32  << " of type " << in.components()[k]->type()
33  << " copy number " << extra->copyno()
34  << " positioned in " << in.name().name()
35  << " global position of centre " << in.components()[k]->translation()
36  << " volume = " << extra->volume() << " cm3"
37  << " density = " << extra->density() << " g/cm3"
38  << " weight " << extra->weight() << " g"
39  << std::endl;
40  iterate(*((in.components())[k]),level+1, gdes);
41  }
42  return;
43 }
std::map< uint32_t, const GeometricTimingDetExtra * > _helperMap
ConstGeometricTimingDetContainer & components()
int k[5][pyjets_maxn]
void iterate(const GeometricTimingDet &, int, const std::vector< GeometricTimingDetExtra > &)
DDName const & name() const
const std::string & name() const
Returns the name.
Definition: DDName.cc:53

Member Data Documentation

CmsMTDStringToEnum CmsMTDDebugNavigator::_CmsMTDStringToEnum
private

Definition at line 20 of file CmsMTDDebugNavigator.h.

std::map<uint32_t, const GeometricTimingDetExtra*> CmsMTDDebugNavigator::_helperMap
private

Definition at line 21 of file CmsMTDDebugNavigator.h.

Referenced by CmsMTDDebugNavigator(), and iterate().

int CmsMTDDebugNavigator::numinstances[30]
private

Definition at line 19 of file CmsMTDDebugNavigator.h.

Referenced by dump(), and iterate().