Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:12

0001 // -*- C++ -*-
0002 //
0003 // Package:    CaloTowerHardcodeGeometryEP
0004 // Class:      CaloTowerHardcodeGeometryEP
0005 //
0006 /**\class CaloTowerHardcodeGeometryEP CaloTowerHardcodeGeometryEP.h tmp/CaloTowerHardcodeGeometryEP/interface/CaloTowerHardcodeGeometryEP.h
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Jeremiah Mans
0015 //         Created:  Mon Oct  3 11:35:27 CDT 2005
0016 //
0017 //
0018 
0019 #include "Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.h"
0020 #include "Geometry/Records/interface/HcalRecNumberingRecord.h"
0021 #include "Geometry/CaloTopology/interface/CaloTowerTopology.h"
0022 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0023 #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h"
0024 
0025 CaloTowerHardcodeGeometryEP::CaloTowerHardcodeGeometryEP(const edm::ParameterSet& iConfig) {
0026   //the following line is needed to tell the framework what
0027   // data is being produced
0028   auto cc = setWhatProduced(this, &CaloTowerHardcodeGeometryEP::produce, edm::es::Label("TOWER"));
0029   cttopoToken_ = cc.consumesFrom<CaloTowerTopology, HcalRecNumberingRecord>(edm::ESInputTag{});
0030   hcaltopoToken_ = cc.consumesFrom<HcalTopology, HcalRecNumberingRecord>(edm::ESInputTag{});
0031   consToken_ = cc.consumesFrom<HcalDDDRecConstants, HcalRecNumberingRecord>(edm::ESInputTag{});
0032 }
0033 
0034 // ------------ method called to produce the data  ------------
0035 CaloTowerHardcodeGeometryEP::ReturnType CaloTowerHardcodeGeometryEP::produce(const CaloTowerGeometryRecord& iRecord) {
0036   const auto& cttopo = iRecord.get(cttopoToken_);
0037   const auto& hcaltopo = iRecord.get(hcaltopoToken_);
0038   const auto& cons = iRecord.get(consToken_);
0039 
0040   return std::unique_ptr<CaloSubdetectorGeometry>(loader_.load(&cttopo, &hcaltopo, &cons));
0041 }