CMS 3D CMS Logo

SiStripHashedDetIdESModule.cc
Go to the documentation of this file.
8 
9 using namespace sistrip;
10 
11 // -----------------------------------------------------------------------------
12 //
15 {
16  edm::LogVerbatim("HashedDetId")
17  << "[SiStripHashedDetIdESSourceFromGeom::" << __func__ << "]"
18  << " Constructing object...";
19 }
20 
21 // -----------------------------------------------------------------------------
22 //
24  edm::LogVerbatim("HashedDetId")
25  << "[SiStripHashedDetIdESSourceFromGeom::" << __func__ << "]"
26  << " Destructing object...";
27 }
28 
29 // -----------------------------------------------------------------------------
30 //
32  edm::LogVerbatim("HashedDetId")
33  << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
34  << " Building \"fake\" hashed DetId map from geometry";
35 
37  rcd.getRecord<TrackerDigiGeometryRecord>().get( geom );
38 
39  std::vector<uint32_t> dets;
40  dets.reserve(16000);
41 
42  for( const auto& iter : geom->detUnits()) {
43  const auto strip = dynamic_cast<StripGeomDetUnit const*>(iter);
44  if ( strip ) { dets.push_back( (strip->geographicalId()).rawId() ); }
45  }
47  << "[SiStripHashedDetIdESModule::" << __func__ << "]"
48  << " Retrieved " << dets.size()
49  << " sistrip DetIds from geometry!";
50 
51  // Create hash map object
54  << "[SiStripHashedDetIdESModule::" << __func__ << "]"
55  << " DetId hash map: " << std::endl
56  << *hash;
57 
58  return hash;
59 
60 }
61 
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
sistrip classes
Provides dense hash map in place of DetId.
Abstract base class for producer of SiStripHashedDetId record.
static const char mlDqmCommon_[]
#define LogTrace(id)
SiStripHashedDetIdESModule(const edm::ParameterSet &)
SiStripHashedDetId * make(const SiStripHashedDetIdRcd &) override