CMS 3D CMS Logo

SiStripHashedDetIdFakeESSource.cc
Go to the documentation of this file.
4 
8 
11 
13 public:
16 
17  virtual std::unique_ptr<SiStripHashedDetId> produce(const SiStripHashedDetIdRcd&);
18 
19 private:
21 };
22 
23 using namespace sistrip;
24 
26  setWhatProduced(this).setConsumes(geomDetToken_);
27 }
28 
30 
31 std::unique_ptr<SiStripHashedDetId> SiStripHashedDetIdFakeESSource::produce(const SiStripHashedDetIdRcd& record) {
32  edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
33  << " Building \"fake\" hashed DetId map from IdealGeometry";
34 
35  const auto& geomDet = record.getRecord<TrackerDigiGeometryRecord>().get(geomDetToken_);
36 
37  const std::vector<uint32_t> dets = TrackerGeometryUtils::getSiStripDetIds(geomDet);
38  edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
39  << " Retrieved " << dets.size() << " DetIds from IdealGeometry!";
40 
41  auto hash = std::make_unique<SiStripHashedDetId>(dets);
42  LogTrace("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
43  << " DetId hash map: " << std::endl
44  << *hash;
45 
46  return hash;
47 }
48 
MessageLogger.h
cond::hash
Definition: Time.h:19
SiStripHashedDetIdFakeESSource::~SiStripHashedDetIdFakeESSource
~SiStripHashedDetIdFakeESSource() override
Definition: SiStripHashedDetIdFakeESSource.cc:29
SiStripHashedDetIdFakeESSource::produce
virtual std::unique_ptr< SiStripHashedDetId > produce(const SiStripHashedDetIdRcd &)
Definition: SiStripHashedDetIdFakeESSource.cc:31
ESProducer.h
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
SiStripHashedDetIdRcd.h
TrackerGeometryUtils::getSiStripDetIds
std::vector< uint32_t > getSiStripDetIds(const GeometricDet &geomDet)
Definition: utils.cc:4
SiStripHashedDetIdFakeESSource::geomDetToken_
edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: SiStripHashedDetIdFakeESSource.cc:20
MakerMacros.h
SiStripHashedDetId.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogVerbatim
Definition: MessageLogger.h:297
IdealGeometryRecord.h
utils.h
SiStripHashedDetIdFakeESSource::SiStripHashedDetIdFakeESSource
SiStripHashedDetIdFakeESSource(const edm::ParameterSet &)
Definition: SiStripHashedDetIdFakeESSource.cc:25
GeometricDet.h
get
#define get
edm::ESGetToken< GeometricDet, IdealGeometryRecord >
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:101
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
ParameterSet.h
sistrip
sistrip classes
Definition: SiStripQualityHelpers.h:14
SiStripHashedDetIdFakeESSource
Definition: SiStripHashedDetIdFakeESSource.cc:12
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
SiStripHashedDetIdRcd
Definition: SiStripDependentRecords.h:48