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  : geomDetToken_(setWhatProduced(this).consumes()) {}
27 
29 
30 std::unique_ptr<SiStripHashedDetId> SiStripHashedDetIdFakeESSource::produce(const SiStripHashedDetIdRcd& record) {
31  edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
32  << " Building \"fake\" hashed DetId map from IdealGeometry";
33 
34  const auto& geomDet = record.getRecord<TrackerDigiGeometryRecord>().get(geomDetToken_);
35 
36  const std::vector<uint32_t> dets = TrackerGeometryUtils::getSiStripDetIds(geomDet);
37  edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
38  << " Retrieved " << dets.size() << " DetIds from IdealGeometry!";
39 
40  auto hash = std::make_unique<SiStripHashedDetId>(dets);
41  LogTrace("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]"
42  << " DetId hash map: " << std::endl
43  << *hash;
44 
45  return hash;
46 }
47 
MessageLogger.h
cond::hash
Definition: Time.h:19
SiStripHashedDetIdFakeESSource::~SiStripHashedDetIdFakeESSource
~SiStripHashedDetIdFakeESSource() override
Definition: SiStripHashedDetIdFakeESSource.cc:28
SiStripHashedDetIdFakeESSource::produce
virtual std::unique_ptr< SiStripHashedDetId > produce(const SiStripHashedDetIdRcd &)
Definition: SiStripHashedDetIdFakeESSource.cc:30
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:5
MakerMacros.h
SiStripHashedDetId.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
edm::ParameterSet
Definition: ParameterSet.h:47
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
SiStripHashedDetIdFakeESSource::geomDetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: SiStripHashedDetIdFakeESSource.cc:20
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
edm::ESProducer
Definition: ESProducer.h:104
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
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:47