Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Package:    CaloTowerTopologyEP
0004 // Class:      CaloTowerTopologyEP
0005 //
0006 /**\class CaloTowerTopologyEP CaloTowerTopologyEP.h tmp/CaloTowerTopologyEP/interface/CaloTowerTopologyEP.h
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 
0014 #include "Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h"
0015 #include "FWCore/Utilities/interface/Exception.h"
0016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0017 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0019 
0020 //
0021 // constants, enums and typedefs
0022 //
0023 
0024 //
0025 // static data member definitions
0026 //
0027 
0028 //
0029 // constructors and destructor
0030 //
0031 CaloTowerTopologyEP::CaloTowerTopologyEP(const edm::ParameterSet& conf)
0032     : topoToken_{setWhatProduced(this).consumes<HcalTopology>(edm::ESInputTag{})} {
0033   edm::LogInfo("HCAL") << "CaloTowerTopologyEP::CaloTowerTopologyEP";
0034 }
0035 
0036 CaloTowerTopologyEP::~CaloTowerTopologyEP() {}
0037 
0038 void CaloTowerTopologyEP::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0039   edm::ParameterSetDescription desc;
0040   descriptions.add("CaloTowerTopology", desc);
0041 }
0042 
0043 //
0044 // member functions
0045 //
0046 
0047 // ------------ method called to produce the data  ------------
0048 CaloTowerTopologyEP::ReturnType CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord) {
0049   const auto& hcaltopo = iRecord.get(topoToken_);
0050 
0051   edm::LogInfo("HCAL") << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)";
0052 
0053   return std::make_unique<CaloTowerTopology>(&hcaltopo);
0054 }