Skip to content

Commit

Permalink
moving to single record as all conds produced have the same IOV
Browse files Browse the repository at this point in the history
  • Loading branch information
pfs committed Jul 24, 2024
1 parent 5c5ff69 commit a21eec7
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 126 deletions.
7 changes: 7 additions & 0 deletions CondFormats/DataRecord/interface/HGCalElectronicsMappingRcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
// Class : HGCalElectronicsMappingRcd
//
/**\class HGCalElectronicsMappingRcd HGCalElectronicsMappingRcd.h CondFormats/DataRecords/interface/HGCalElectronicsMappingRcd.h
<<<<<<< HEAD
Description: This record *is temporary* and it is used to store the parameters which are used to describe
- dense indexing of HGCAL modules and corresponding cells in the readound sequence
- module and cell information in the electronics mapping
The record will change to its final format(s) once the we settle on the final formats to be used in CondDB
=======
Description: This record is used to store the electronics mapping parameters for HGCAL
It contains the readout indexer classes for modules and cells as well as the characteristics of modules and cells stored in SoA
>>>>>>> f199c5da48a (moving to single record as all conds produced have the same IOV)
*/
//
// Author: Pedro Vieira De Castro Ferreira Da Silva
Expand Down
23 changes: 0 additions & 23 deletions CondFormats/DataRecord/interface/HGCalMappingCellIndexerRcd.h

This file was deleted.

23 changes: 0 additions & 23 deletions CondFormats/DataRecord/interface/HGCalMappingModuleIndexerRcd.h

This file was deleted.

26 changes: 0 additions & 26 deletions CondFormats/DataRecord/interface/HGCalMappingModuleRcd.h

This file was deleted.

13 changes: 0 additions & 13 deletions CondFormats/DataRecord/src/HGCalMappingCellIndexerRcd.cc

This file was deleted.

13 changes: 0 additions & 13 deletions CondFormats/DataRecord/src/HGCalMappingModuleIndexerRcd.cc

This file was deleted.

13 changes: 0 additions & 13 deletions CondFormats/DataRecord/src/HGCalMappingModuleRcd.cc

This file was deleted.

10 changes: 4 additions & 6 deletions Geometry/HGCalMapping/plugins/HGCalMappingIndexESSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#include "FWCore/Framework/interface/ESProducts.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "CondFormats/DataRecord/interface/HGCalMappingModuleIndexerRcd.h"
#include "CondFormats/DataRecord/interface/HGCalMappingCellIndexerRcd.h"
#include "CondFormats/DataRecord/interface/HGCalElectronicsMappingRcd.h"
#include "CondFormats/HGCalObjects/interface/HGCalMappingModuleIndexer.h"
#include "CondFormats/HGCalObjects/interface/HGCalMappingCellIndexer.h"

Expand All @@ -28,17 +27,16 @@ class HGCalMappingIndexESSource : public edm::ESProducer, public edm::EventSetup
setWhatProduced(this, &HGCalMappingIndexESSource::produceCellMapIndexer);
setWhatProduced(this, &HGCalMappingIndexESSource::produceModuleMapIndexer);

findingRecord<HGCalMappingModuleIndexerRcd>();
findingRecord<HGCalMappingCellIndexerRcd>();
findingRecord<HGCalElectronicsMappingRcd>();

buildCellMapperIndexer();
buildModuleMapperIndexer();
}

std::unique_ptr<HGCalMappingModuleIndexer> produceModuleMapIndexer(const HGCalMappingModuleIndexerRcd&) {
std::unique_ptr<HGCalMappingModuleIndexer> produceModuleMapIndexer(const HGCalElectronicsMappingRcd&) {
return std::make_unique<HGCalMappingModuleIndexer>(modIndexer_);
}
std::unique_ptr<HGCalMappingCellIndexer> produceCellMapIndexer(const HGCalMappingCellIndexerRcd&) {
std::unique_ptr<HGCalMappingCellIndexer> produceCellMapIndexer(const HGCalElectronicsMappingRcd&) {
return std::make_unique<HGCalMappingCellIndexer>(cellIndexer_);
}

Expand Down
17 changes: 8 additions & 9 deletions Geometry/HGCalMapping/test/alpaka/HGCalMappingESSourceTester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h"
#include "DataFormats/PortableTestObjects/interface/alpaka/TestDeviceCollection.h"

#include "CondFormats/DataRecord/interface/HGCalMappingModuleIndexerRcd.h"
#include "CondFormats/DataRecord/interface/HGCalMappingCellIndexerRcd.h"
#include "CondFormats/DataRecord/interface/HGCalElectronicsMappingRcd.h"
#include "CondFormats/HGCalObjects/interface/HGCalMappingModuleIndexer.h"
#include "CondFormats/HGCalObjects/interface/HGCalMappingCellIndexer.h"
#include "CondFormats/HGCalObjects/interface/alpaka/HGCalMappingParameterDeviceCollection.h"
Expand Down Expand Up @@ -50,19 +49,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
private:
void produce(device::Event&, device::EventSetup const&) override;

edm::ESWatcher<HGCalMappingModuleIndexerRcd> cfgWatcher_;
edm::ESGetToken<HGCalMappingCellIndexer, HGCalMappingCellIndexerRcd> cellIndexTkn_;
device::ESGetToken<hgcal::HGCalMappingCellParamDeviceCollection, HGCalMappingCellIndexerRcd> cellTkn_;
edm::ESGetToken<HGCalMappingModuleIndexer, HGCalMappingModuleIndexerRcd> moduleIndexTkn_;
device::ESGetToken<hgcal::HGCalMappingModuleParamDeviceCollection, HGCalMappingModuleIndexerRcd> moduleTkn_;
edm::ESWatcher<HGCalElectronicsMappingRcd> cfgWatcher_;
edm::ESGetToken<HGCalMappingCellIndexer, HGCalElectronicsMappingRcd> cellIndexTkn_;
device::ESGetToken<hgcal::HGCalMappingCellParamDeviceCollection, HGCalElectronicsMappingRcd> cellTkn_;
edm::ESGetToken<HGCalMappingModuleIndexer, HGCalElectronicsMappingRcd> moduleIndexTkn_;
device::ESGetToken<hgcal::HGCalMappingModuleParamDeviceCollection, HGCalElectronicsMappingRcd> moduleTkn_;
const device::EDPutToken<portabletest::TestDeviceCollection> testCollToken_;
};

//
HGCalMappingESSourceTester::HGCalMappingESSourceTester(const edm::ParameterSet& iConfig)
: cellIndexTkn_(esConsumes<HGCalMappingCellIndexer, HGCalMappingCellIndexerRcd>()),
: cellIndexTkn_(esConsumes<HGCalMappingCellIndexer, HGCalElectronicsMappingRcd>()),
cellTkn_(esConsumes(edm::ESInputTag(""))),
moduleIndexTkn_(esConsumes<HGCalMappingModuleIndexer, HGCalMappingModuleIndexerRcd>()),
moduleIndexTkn_(esConsumes<HGCalMappingModuleIndexer, HGCalElectronicsMappingRcd>()),
moduleTkn_(esConsumes(edm::ESInputTag(""))),
testCollToken_{produces()} {}

Expand Down

0 comments on commit a21eec7

Please sign in to comment.