Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
// -*- C++ -*-
//
// Package:    CaloTowerTopologyEP
// Class:      CaloTowerTopologyEP
//
/**\class CaloTowerTopologyEP CaloTowerTopologyEP.h tmp/CaloTowerTopologyEP/interface/CaloTowerTopologyEP.h

 Description: <one line class summary>

 Implementation:
     <Notes on implementation>
*/

#include "Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

//
// constants, enums and typedefs
//

//
// static data member definitions
//

//
// constructors and destructor
//
CaloTowerTopologyEP::CaloTowerTopologyEP(const edm::ParameterSet& conf)
    : topoToken_{setWhatProduced(this).consumes<HcalTopology>(edm::ESInputTag{})} {
  edm::LogInfo("HCAL") << "CaloTowerTopologyEP::CaloTowerTopologyEP";
}

CaloTowerTopologyEP::~CaloTowerTopologyEP() {}

void CaloTowerTopologyEP::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
  edm::ParameterSetDescription desc;
  descriptions.add("CaloTowerTopologyEP", desc);
}

//
// member functions
//

// ------------ method called to produce the data  ------------
CaloTowerTopologyEP::ReturnType CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord) {
  const auto& hcaltopo = iRecord.get(topoToken_);

  edm::LogInfo("HCAL") << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)";

  return std::make_unique<CaloTowerTopology>(&hcaltopo);
}