CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/Geometry/TrackerNumberingBuilder/plugins/CmsTrackerRodBuilder.cc

Go to the documentation of this file.
00001 #include "Geometry/TrackerNumberingBuilder/plugins/CmsTrackerRodBuilder.h"
00002 #include "DetectorDescription/Core/interface/DDFilteredView.h"
00003 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00004 #include "Geometry/TrackerNumberingBuilder/plugins/ExtractStringFromDDD.h"
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 #include "Geometry/TrackerNumberingBuilder/plugins/CmsDetConstruction.h"
00007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00008 #include <vector>
00009 
00010 
00011 void CmsTrackerRodBuilder::buildComponent(DDFilteredView& fv, GeometricDet* g, std::string s){
00012   CmsDetConstruction theCmsDetConstruction;
00013   theCmsDetConstruction.buildComponent(fv,g,s);  
00014 }
00015 
00016 void CmsTrackerRodBuilder::sortNS(DDFilteredView& fv, GeometricDet* det){
00017   GeometricDet::GeometricDetContainer & comp = det->components();
00018 
00019   std::stable_sort(comp.begin(),comp.end(),LessModZ());         
00020 
00021   for(uint32_t i=0; i<comp.size();i++){
00022      comp[i]->setGeographicalID(i+1);
00023   }
00024     
00025   if (comp.empty() ){
00026    edm::LogError("CmsTrackerRodBuilder")<<"Where are the Rod's modules?";
00027   }
00028 }