CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
CmsTrackerLevelBuilder< FilteredView > Class Template Referenceabstract

#include <CmsTrackerLevelBuilder.h>

Inheritance diagram for CmsTrackerLevelBuilder< FilteredView >:
CmsTrackerAbstractConstruction< FilteredView > CmsDetConstruction< FilteredView > CmsTrackerBuilder< FilteredView > CmsTrackerDiskBuilder< FilteredView > CmsTrackerLadderBuilder< FilteredView > CmsTrackerLayerBuilder< FilteredView > CmsTrackerOTDiscBuilder< FilteredView > CmsTrackerOTLayerBuilder< FilteredView > CmsTrackerOTRingBuilder< FilteredView > CmsTrackerPanelBuilder< FilteredView > CmsTrackerPetalBuilder< FilteredView > CmsTrackerPhase1DiskBuilder< FilteredView > CmsTrackerPhase2TPDiskBuilder< FilteredView > CmsTrackerPixelPhase1EndcapBuilder< FilteredView > CmsTrackerPixelPhase2DiskBuilder< FilteredView > CmsTrackerPixelPhase2EndcapBuilder< FilteredView > CmsTrackerPixelPhase2RingBuilder< FilteredView > CmsTrackerRingBuilder< FilteredView > CmsTrackerRodBuilder< FilteredView > CmsTrackerStringBuilder< FilteredView > CmsTrackerSubStrctBuilder< FilteredView > CmsTrackerWheelBuilder< FilteredView >

Public Member Functions

template<>
void build (cms::DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
template<>
void build (DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
void build (FilteredView &, GeometricDet *, const std::string &) override
 
 ~CmsTrackerLevelBuilder () override
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction< FilteredView >
virtual ~CmsTrackerAbstractConstruction ()=default
 

Protected Attributes

CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Private Member Functions

virtual void buildComponent (FilteredView &, GeometricDet *, const std::string &)=0
 
virtual void sortNS (FilteredView &, GeometricDet *)
 

Private Attributes

CmsTrackerStringToEnum _CmsTrackerStringToEnum
 

Detailed Description

template<class FilteredView>
class CmsTrackerLevelBuilder< FilteredView >

Abstract Class to construct a Level in the hierarchy

Definition at line 31 of file CmsTrackerLevelBuilder.h.

Constructor & Destructor Documentation

◆ ~CmsTrackerLevelBuilder()

template<class FilteredView >
CmsTrackerLevelBuilder< FilteredView >::~CmsTrackerLevelBuilder ( )
inlineoverride

Definition at line 34 of file CmsTrackerLevelBuilder.h.

34 {}

Member Function Documentation

◆ build() [1/3]

template<>
void CmsTrackerLevelBuilder< cms::DDFilteredView >::build ( cms::DDFilteredView fv,
GeometricDet tracker,
const std::string &  attribute 
)

Definition at line 191 of file CmsTrackerLevelBuilder.cc.

193  {
194  if (DEBUG) {
195  edm::LogVerbatim("CmsTrackerLevelBuilder")
196  << "CmsTrackerLevelBuilder::build called on volume"
197  << " tracker->name() = " << tracker->name() << " tracker->path() = " << fv.geoHistory()
198  << " tracker->type() = " << tracker->type();
199  }
200 
201  // Go down one level in hierarchy
202  fv.firstChild();
203 
204  // This is the siblings hierarchy level
205  const int level = fv.level();
207 
208  // Treat all siblings of a given hierarchy level
209  while (fv.level() == level) {
210  if (DEBUG) {
211  edm::LogVerbatim("CmsTrackerLevelBuilder")
212  << "Calling buildComponent, before."
213  << " level = " << level << " type = " << type << " fv.level() = " << fv.level()
214  << " fv.type() = " << ExtractStringFromDDD<cms::DDFilteredView>::getString(attribute, &fv);
215  }
216 
217  // Call build on sibling
218  buildComponent(fv, tracker, attribute);
219 
220  if (DEBUG) {
221  edm::LogVerbatim("CmsTrackerLevelBuilder")
222  << "Calling buildComponent, after."
223  << " level = " << level << " type = " << type << " fv.level() = " << fv.level()
224  << " fv.type() = " << ExtractStringFromDDD<cms::DDFilteredView>::getString(attribute, &fv);
225  }
226  }
227 
228  // Now that all GeometricDets of a given hierarchy level are built, sort them!
229  sortNS(fv, tracker);
230 
231  if (DEBUG) {
232  edm::LogVerbatim("CmsTrackerLevelBuilder")
233  << "CmsTrackerLevelBuilder::build: Exit, finished all buildComponents calls.";
234  }
235 }

References DEBUG, cms::DDFilteredView::firstChild(), cms::DDFilteredView::geoHistory(), ExtractStringFromDDD< FilteredView >::getString(), personalPlayback::level, cms::DDFilteredView::level(), AlCaHLTBitMon_QueryRunRegistry::string, and PbPb_ZMuSkimMuonDPG_cff::tracker.

◆ build() [2/3]

template<>
void CmsTrackerLevelBuilder< DDFilteredView >::build ( DDFilteredView fv,
GeometricDet tracker,
const std::string &  attribute 
)

Definition at line 146 of file CmsTrackerLevelBuilder.cc.

148  {
149  if (DEBUG) {
150  edm::LogVerbatim("CmsTrackerLevelBuilder")
151  << "CmsTrackerLevelBuilder::build called on volume"
152  << " tracker->name() = " << tracker->name() << " tracker->path() = " << fv.geoHistory()
153  << " tracker->type() = " << tracker->type();
154  }
155 
156  // Go down one level in hierarchy
157  bool doLayers = fv.firstChild();
158 
159  while (doLayers) {
160  if (DEBUG) {
161  edm::LogVerbatim("CmsTrackerLevelBuilder") << "Calling buildComponent, before";
162  }
163 
164  // Call build on sibling
165  buildComponent(fv, tracker, attribute);
166 
167  if (DEBUG) {
168  edm::LogVerbatim("CmsTrackerLevelBuilder") << "Calling buildComponent, after";
169  }
170 
171  // Go to next sibling
172  doLayers = fv.nextSibling();
173  }
174 
175  // Come back up
176  fv.parent();
177 
178  // Now that all GeometricDets of a given hierarchy level are built, sort them!
179  sortNS(fv, tracker);
180 
181  if (DEBUG) {
182  edm::LogVerbatim("CmsTrackerLevelBuilder")
183  << "CmsTrackerLevelBuilder::build: Exit, finished all buildComponents calls.";
184  }
185 }

References DEBUG, DDFilteredView::firstChild(), DDFilteredView::geoHistory(), DDFilteredView::nextSibling(), DDFilteredView::parent(), and PbPb_ZMuSkimMuonDPG_cff::tracker.

◆ build() [3/3]

template<class FilteredView >
void CmsTrackerLevelBuilder< FilteredView >::build ( FilteredView &  ,
GeometricDet ,
const std::string &   
)
overridevirtual

◆ buildComponent()

template<class FilteredView >
virtual void CmsTrackerLevelBuilder< FilteredView >::buildComponent ( FilteredView &  ,
GeometricDet ,
const std::string &   
)
privatepure virtual

◆ sortNS()

template<class FilteredView >
virtual void CmsTrackerLevelBuilder< FilteredView >::sortNS ( FilteredView &  ,
GeometricDet  
)
inlineprivatevirtual

Member Data Documentation

◆ _CmsTrackerStringToEnum

template<class FilteredView >
CmsTrackerStringToEnum CmsTrackerLevelBuilder< FilteredView >::_CmsTrackerStringToEnum
private

Definition at line 44 of file CmsTrackerLevelBuilder.h.

◆ theCmsTrackerStringToEnum

template<class FilteredView >
CmsTrackerStringToEnum CmsTrackerLevelBuilder< FilteredView >::theCmsTrackerStringToEnum
protected

Definition at line 40 of file CmsTrackerLevelBuilder.h.

personalPlayback.level
level
Definition: personalPlayback.py:22
ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder::sortNS
virtual void sortNS(FilteredView &, GeometricDet *)
Definition: CmsTrackerLevelBuilder.h:43
cms::DDFilteredView::geoHistory
const std::vector< const Node * > geoHistory() const
Definition: DDFilteredView.cc:671
DDFilteredView::parent
bool parent()
set the current node to the parent node ...
Definition: DDFilteredView.cc:161
DEBUG
#define DEBUG
Definition: CmsTrackerLevelBuilder.cc:10
DDFilteredView::firstChild
bool firstChild()
set the current node to the first child ...
Definition: DDFilteredView.cc:86
cms::DDFilteredView::firstChild
bool firstChild()
set the current node to the first child
Definition: DDFilteredView.cc:268
DDFilteredView::nextSibling
bool nextSibling()
set the current node to the next sibling ...
Definition: DDFilteredView.cc:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
cms::DDFilteredView::level
const int level() const
get Iterator level
Definition: DDFilteredView.cc:636
CmsTrackerLevelBuilder::buildComponent
virtual void buildComponent(FilteredView &, GeometricDet *, const std::string &)=0
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
DDFilteredView::geoHistory
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
Definition: DDFilteredView.cc:30
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128