CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CmsTrackerBuilder Class Reference

#include <CmsTrackerBuilder.h>

Inheritance diagram for CmsTrackerBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

List of all members.

Public Member Functions

 CmsTrackerBuilder (unsigned int totalBlade)

Private Member Functions

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

Private Attributes

unsigned int m_totalBlade

Detailed Description

Abstract Class to construct a Level in the hierarchy

Definition at line 11 of file CmsTrackerBuilder.h.


Constructor & Destructor Documentation

CmsTrackerBuilder::CmsTrackerBuilder ( unsigned int  totalBlade)

Definition at line 12 of file CmsTrackerBuilder.cc.

  : m_totalBlade( totalBlade )
{}

Member Function Documentation

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

Implements CmsTrackerLevelBuilder.

Definition at line 17 of file CmsTrackerBuilder.cc.

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

{
  CmsTrackerSubStrctBuilder theCmsTrackerSubStrctBuilder( m_totalBlade );

  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 50 of file CmsTrackerBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::components(), i, and groupFilesInBlocks::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);
  }
}

Member Data Documentation

unsigned int CmsTrackerBuilder::m_totalBlade [private]

Definition at line 17 of file CmsTrackerBuilder.h.

Referenced by buildComponent().