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

Definition at line 8 of file CmsMTDDebugNavigator.cc.

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

References _helperMap.

Member Function Documentation

◆ dump()

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

Definition at line 15 of file CmsMTDDebugNavigator.cc.

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

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

◆ iterate()

void CmsMTDDebugNavigator::iterate ( const GeometricTimingDet in,
int  level,
const std::vector< GeometricTimingDetExtra > &  gdes 
)
private

Definition at line 27 of file CmsMTDDebugNavigator.cc.

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

References _helperMap, GeometricTimingDetExtra::copyno(), GeometricTimingDetExtra::density(), recoMuon::in, dqmdumpme::k, personalPlayback::level, numinstances, AlCaHLTBitMon_QueryRunRegistry::string, GeometricTimingDetExtra::volume(), and GeometricTimingDetExtra::weight().

Referenced by dump().

Member Data Documentation

◆ _CmsMTDStringToEnum

CmsMTDStringToEnum CmsMTDDebugNavigator::_CmsMTDStringToEnum
private

Definition at line 21 of file CmsMTDDebugNavigator.h.

◆ _helperMap

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

Definition at line 22 of file CmsMTDDebugNavigator.h.

Referenced by CmsMTDDebugNavigator(), and iterate().

◆ numinstances

int CmsMTDDebugNavigator::numinstances[30]
private

Definition at line 20 of file CmsMTDDebugNavigator.h.

Referenced by dump(), and iterate().

personalPlayback.level
level
Definition: personalPlayback.py:22
CmsMTDDebugNavigator::numinstances
int numinstances[30]
Definition: CmsMTDDebugNavigator.h:20
GeometricTimingDetExtra::density
double density() const
Definition: GeometricTimingDetExtra.h:53
edm::LogInfo
Definition: MessageLogger.h:254
GeometricTimingDetExtra
Definition: GeometricTimingDetExtra.h:13
GeometricTimingDetExtra::weight
double weight() const
Definition: GeometricTimingDetExtra.h:54
CmsMTDDebugNavigator::_helperMap
std::map< uint32_t, const GeometricTimingDetExtra * > _helperMap
Definition: CmsMTDDebugNavigator.h:22
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
recoMuon::in
Definition: RecoMuonEnumerators.h:6
GeometricTimingDetExtra::volume
double volume() const
Definition: GeometricTimingDetExtra.h:52
CmsMTDDebugNavigator::iterate
void iterate(const GeometricTimingDet &, int, const std::vector< GeometricTimingDetExtra > &)
Definition: CmsMTDDebugNavigator.cc:27
GeometricTimingDetExtra::copyno
int copyno() const
Definition: GeometricTimingDetExtra.h:51