CMS 3D CMS Logo

MTDDetLayerGeometryESProducer.cc
Go to the documentation of this file.
1 
14 
18 
22 
24 
25 #include <memory>
26 #include <iostream>
27 
29 public:
32 
34  std::unique_ptr<MTDDetLayerGeometry> produce(const MTDRecoGeometryRecord& record);
35 
37 
38 private:
40 };
41 
42 using namespace edm;
43 
45  setWhatProduced(this).setConsumes(geomToken_);
46 }
47 
48 std::unique_ptr<MTDDetLayerGeometry> MTDDetLayerGeometryESProducer::produce(const MTDRecoGeometryRecord& record) {
49  auto mtdDetLayerGeometry = std::make_unique<MTDDetLayerGeometry>();
50 
51  if (auto mtd = record.getHandle(geomToken_)) {
52  // Build BTL layers
54  // Build ETL layers
56  } else {
57  const std::string metname = "MTD|RecoMTD|RecoMTDDetLayers|MTDDetLayerGeometryESProducer";
58  LogInfo(metname) << "No MTD geometry is available.";
59  }
60 
61  // Sort layers properly
62  mtdDetLayerGeometry->sortLayers();
63 
64  return mtdDetLayerGeometry;
65 }
66 
69  desc.addDefault(ps);
70 }
71 
MessageLogger.h
ESHandle.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
MTDDetLayerGeometryESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: MTDDetLayerGeometryESProducer.cc:67
edm::LogInfo
Definition: MessageLogger.h:254
MTDGeometry.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
MTDDigiGeometryRecord.h
BTLDetLayerGeometryBuilder::buildLayers
static std::vector< DetLayer * > buildLayers(const MTDGeometry &geo)
Operations.
Definition: BTLDetLayerGeometryBuilder.cc:21
ETLDetLayerGeometryBuilder.h
MTDDetLayerGeometryESProducer
Definition: MTDDetLayerGeometryESProducer.cc:28
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MTDDetLayerGeometryESProducer::MTDDetLayerGeometryESProducer
MTDDetLayerGeometryESProducer(const edm::ParameterSet &p)
Constructor.
Definition: MTDDetLayerGeometryESProducer.cc:44
edm::ParameterSet
Definition: ParameterSet.h:36
MTDDetLayerGeometryESProducer::produce
std::unique_ptr< MTDDetLayerGeometry > produce(const MTDRecoGeometryRecord &record)
Produce MuonDeLayerGeometry.
Definition: MTDDetLayerGeometryESProducer.cc:48
MTDDetLayerGeometryESProducer::geomToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > geomToken_
Definition: MTDDetLayerGeometryESProducer.cc:39
MTDRecoGeometryRecord.h
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord >
MTDRecoGeometryRecord
Definition: MTDRecoGeometryRecord.h:17
ETLDetLayerGeometryBuilder::buildLayers
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildLayers(const MTDGeometry &geo)
Definition: ETLDetLayerGeometryBuilder.cc:17
ModuleFactory.h
MTDDetLayerGeometry.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
mtdDetLayerGeometry_cfi.mtdDetLayerGeometry
mtdDetLayerGeometry
Definition: mtdDetLayerGeometry_cfi.py:3
BTLDetLayerGeometryBuilder.h
EventSetup.h
edm::ESProducer
Definition: ESProducer.h:101
ParameterSet.h
mtd_digitizer
Definition: MTDDigitizer.h:35
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43