CMS 3D CMS Logo

Private Member Functions

CmsTrackerBuilder Class Reference

#include <CmsTrackerBuilder.h>

Inheritance diagram for CmsTrackerBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

List of all members.

Private Member Functions

virtual void buildComponent (DDFilteredView &, GeometricDet *, std::string)
virtual void sortNS (DDFilteredView &, GeometricDet *)

Detailed Description

Abstract Class to construct a Level in the hierarchy

Definition at line 10 of file CmsTrackerBuilder.h.


Member Function Documentation

void CmsTrackerBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
) [private, virtual]

Implements CmsTrackerLevelBuilder.

Definition at line 13 of file CmsTrackerBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), ExtractStringFromDDD::getString(), GeometricDet::PixelBarrel, GeometricDet::PixelEndCap, GeometricDet::TEC, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, GeometricDet::TIB, GeometricDet::TID, GeometricDet::TOB, and CmsTrackerStringToEnum::type().

                                                                                      {

  CmsTrackerSubStrctBuilder theCmsTrackerSubStrctBuilder;

  GeometricDet * subdet = new GeometricDet(&fv,theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv)));
  switch (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(s,&fv))){
  case GeometricDet::PixelBarrel:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::PixelEndCap:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::TIB:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::TOB:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::TEC:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::TID:
    theCmsTrackerSubStrctBuilder.build(fv,subdet,s);      
    break;
  default:
    edm::LogError("CmsTrackerBuilder")<<" ERROR - I was expecting a SubDet, I got a "<<ExtractStringFromDDD::getString(s,&fv);
    ;
  }
  
  g->addComponent(subdet);
  
}
void CmsTrackerBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
) [private, virtual]

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 46 of file CmsTrackerBuilder.cc.

References GeometricDet::components(), i, and cond::rpcobtemp::temp.

                                                                   {
  
  GeometricDet::GeometricDetContainer & comp = det->components();
  std::stable_sort(comp.begin(),comp.end(),subDetByType());
  
  for(uint32_t i=0; i<comp.size(); i++){
    uint32_t temp= comp[i]->type();
    comp[i]->setGeographicalID(temp);
  }

}