Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:49

0001 // -*- C++ -*-
0002 //
0003 // Package:    HcalDDDGeometryEP
0004 // Class:      HcalDDDGeometryEP
0005 //
0006 /**\class HcalDDDGeometryEP HcalDDDGeometryEP.h tmp/HcalDDDGeometryEP/interface/HcalDDDGeometryEP.h
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Sunanda Banerjee
0015 //         Created:  Thu Oct 20 11:35:27 CDT 2006
0016 //
0017 //
0018 
0019 #include "Geometry/HcalEventSetup/interface/HcalDDDGeometryEP.h"
0020 #include "Geometry/Records/interface/HcalRecNumberingRecord.h"
0021 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0022 
0023 HcalDDDGeometryEP::HcalDDDGeometryEP(const edm::ParameterSet& ps) {
0024   //the following line is needed to tell the framework what
0025   // data is being produced
0026   auto cc = setWhatProduced(this, &HcalDDDGeometryEP::produceAligned, edm::es::Label("HCAL"));
0027   consToken_ = cc.consumesFrom<HcalDDDRecConstants, HcalRecNumberingRecord>(edm::ESInputTag{});
0028   topologyToken_ = cc.consumesFrom<HcalTopology, HcalRecNumberingRecord>(edm::ESInputTag{});
0029 }
0030 
0031 // ------------ method called to produce the data  ------------
0032 HcalDDDGeometryEP::ReturnType HcalDDDGeometryEP::produceAligned(const HcalGeometryRecord& iRecord) {
0033   edm::LogInfo("HCAL") << "Using default HCAL topology";
0034   const auto& cons = iRecord.get(consToken_);
0035   const auto& topology = iRecord.get(topologyToken_);
0036 
0037   HcalDDDGeometryLoader loader(&cons);
0038 
0039   return ReturnType(loader.load(topology));
0040 }