CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripHashedDetIdESProducer.cc
Go to the documentation of this file.
8 
9 using namespace sistrip;
10 
11 // -----------------------------------------------------------------------------
12 //
14  setWhatProduced( this, &SiStripHashedDetIdESProducer::produce );
15 }
16 
17 // -----------------------------------------------------------------------------
18 //
20 
21 // -----------------------------------------------------------------------------
22 //
23 std::auto_ptr<SiStripHashedDetId> SiStripHashedDetIdESProducer::produce( const SiStripHashedDetIdRcd& rcd ) {
24 
25  // Retrieve geometry
27  rcd.getRecord<TrackerDigiGeometryRecord>().get( geom );
28 
29  // Build list of DetIds
30  std::vector<uint32_t> dets;
31  dets.reserve(16000);
32  TrackerGeometry::DetUnitContainer::const_iterator iter = geom->detUnits().begin();
33  for( ; iter != geom->detUnits().end(); ++iter ) {
34  const StripGeomDetUnit* strip = dynamic_cast<StripGeomDetUnit*>(*iter);
35  if( strip ) {
36  dets.push_back( (strip->geographicalId()).rawId() );
37  }
38  }
40  << "[SiStripHashedDetIdESProducer::" << __func__ << "]"
41  << " Retrieved " << dets.size()
42  << " sistrip DetIds from geometry!";
43 
44  // Create hash map object
47  << "[SiStripHashedDetIdESProducer::" << __func__ << "]"
48  << " DetId hash map: " << std::endl
49  << *hash;
50 
51  return std::auto_ptr<SiStripHashedDetId>( hash );
52 
53 }
54 
Provides dense hash map in place of DetId.
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
static const char mlDqmCommon_[]
#define LogTrace(id)
virtual std::auto_ptr< SiStripHashedDetId > produce(const SiStripHashedDetIdRcd &)
SiStripHashedDetIdESProducer(const edm::ParameterSet &)