CMS 3D CMS Logo

Public Member Functions | Private Member Functions

SiStripHashedDetIdESProducer Class Reference

Abstract base class for producer of SiStripHashedDetId record. More...

#include <SiStripHashedDetIdESProducer.h>

Inheritance diagram for SiStripHashedDetIdESProducer:
edm::ESProducer edm::ESProducer edm::ESProxyFactoryProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider edm::eventsetup::DataProxyProvider SiStripHashedDetIdESModule SiStripHashedDetIdFakeESSource

List of all members.

Public Member Functions

virtual std::auto_ptr
< SiStripHashedDetId
produce (const SiStripHashedDetIdRcd &)
std::auto_ptr< SiStripHashedDetIdproduce (const SiStripHashedDetIdRcd &)
 SiStripHashedDetIdESProducer (const edm::ParameterSet &)
 SiStripHashedDetIdESProducer (const edm::ParameterSet &)
virtual ~SiStripHashedDetIdESProducer ()
virtual ~SiStripHashedDetIdESProducer ()

Private Member Functions

virtual SiStripHashedDetIdmake (const SiStripHashedDetIdRcd &)=0
const
SiStripHashedDetIdESProducer
operator= (const SiStripHashedDetIdESProducer &)
 SiStripHashedDetIdESProducer (const SiStripHashedDetIdESProducer &)

Detailed Description

Abstract base class for producer of SiStripHashedDetId record.

Author:
R.Bainbridge

Definition at line 17 of file SiStripHashedDetIdESProducer.h.


Constructor & Destructor Documentation

SiStripHashedDetIdESProducer::SiStripHashedDetIdESProducer ( const edm::ParameterSet pset)
SiStripHashedDetIdESProducer::~SiStripHashedDetIdESProducer ( ) [virtual]

Definition at line 19 of file SiStripHashedDetIdESProducer.cc.

{}
SiStripHashedDetIdESProducer::SiStripHashedDetIdESProducer ( const SiStripHashedDetIdESProducer ) [private]
SiStripHashedDetIdESProducer::SiStripHashedDetIdESProducer ( const edm::ParameterSet )
virtual SiStripHashedDetIdESProducer::~SiStripHashedDetIdESProducer ( ) [virtual]

Member Function Documentation

virtual SiStripHashedDetId* SiStripHashedDetIdESProducer::make ( const SiStripHashedDetIdRcd ) [private, pure virtual]
const SiStripHashedDetIdESProducer& SiStripHashedDetIdESProducer::operator= ( const SiStripHashedDetIdESProducer ) [private]
std::auto_ptr<SiStripHashedDetId> SiStripHashedDetIdESProducer::produce ( const SiStripHashedDetIdRcd )
std::auto_ptr< SiStripHashedDetId > SiStripHashedDetIdESProducer::produce ( const SiStripHashedDetIdRcd rcd) [virtual]

Calls pure virtual make() method, to force concrete implementation.

Definition at line 23 of file SiStripHashedDetIdESProducer.cc.

References GeomDet::geographicalId(), relativeConstraints::geom, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), cond::hash, LogTrace, sistrip::mlDqmCommon_, and strip().

Referenced by SiStripHashedDetIdESProducer().

                                                                                                        {

  // Retrieve geometry
  edm::ESHandle<TrackerGeometry> geom;
  rcd.getRecord<TrackerDigiGeometryRecord>().get( geom );
  
  // Build list of DetIds
  std::vector<uint32_t> dets;
  dets.reserve(16000);
  TrackerGeometry::DetUnitContainer::const_iterator iter = geom->detUnits().begin();
  for( ; iter != geom->detUnits().end(); ++iter ) {
    const StripGeomDetUnit* strip = dynamic_cast<StripGeomDetUnit*>(*iter);
    if( strip ) {
      dets.push_back( (strip->geographicalId()).rawId() );
    }
  }
  edm::LogVerbatim(mlDqmCommon_)
    << "[SiStripHashedDetIdESProducer::" << __func__ << "]"
    << " Retrieved " << dets.size()
    << " sistrip DetIds from geometry!";
  
  // Create hash map object
  SiStripHashedDetId* hash = new SiStripHashedDetId( dets );
  LogTrace(mlDqmCommon_)
    << "[SiStripHashedDetIdESProducer::" << __func__ << "]"
    << " DetId hash map: " << std::endl
    << *hash;
  
  return std::auto_ptr<SiStripHashedDetId>( hash );

}