CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalTowerProducer Class Reference
Inheritance diagram for HGCalTowerProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalTowerProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HGCalTowerProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

edm::EDGetToken input_towers_map_
 
edm::EDGetToken input_trigger_cells_
 
std::unique_ptr< HGCalTowerProcessorBasetowersProcess_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecordtriggerGeomToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 18 of file HGCalTowerProducer.cc.

Constructor & Destructor Documentation

◆ HGCalTowerProducer()

HGCalTowerProducer::HGCalTowerProducer ( const edm::ParameterSet conf)

Definition at line 37 of file HGCalTowerProducer.cc.

38  : input_towers_map_(consumes<l1t::HGCalTowerMapBxCollection>(conf.getParameter<edm::InputTag>("InputTowerMaps"))),
40  consumes<l1t::HGCalClusterBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
41  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
42  //setup TowerMap parameters
43  const edm::ParameterSet& towerParamConfig = conf.getParameterSet("ProcessorParameters");
44  const std::string& towerProcessorName = towerParamConfig.getParameter<std::string>("ProcessorName");
45  towersProcess_ = HGCalTowerFactory::get()->create(towerProcessorName, towerParamConfig);
46 
47  produces<l1t::HGCalTowerBxCollection>(towersProcess_->name());
48 }

References get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), AlCaHLTBitMon_QueryRunRegistry::string, and towersProcess_.

◆ ~HGCalTowerProducer()

HGCalTowerProducer::~HGCalTowerProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerProducer.cc.

21 {}

Member Function Documentation

◆ beginRun()

void HGCalTowerProducer::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
override

◆ produce()

void HGCalTowerProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 56 of file HGCalTowerProducer.cc.

56  {
57  // Output collections
58  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
59 
60  // Input collections
61  std::pair<edm::Handle<l1t::HGCalTowerMapBxCollection>, edm::Handle<l1t::HGCalClusterBxCollection> > inputsColl;
62  auto& towersMapBxColl = inputsColl.first;
63  auto& clustersBxColl = inputsColl.second;
64 
65  e.getByToken(input_towers_map_, towersMapBxColl);
66  e.getByToken(input_trigger_cells_, clustersBxColl);
67 
68  towersProcess_->run(inputsColl, *towers_output, es);
69 
70  e.put(std::move(towers_output), towersProcess_->name());
71 }

References MillePedeFileConverter_cfg::e, input_towers_map_, input_trigger_cells_, eostools::move(), and towersProcess_.

Member Data Documentation

◆ input_towers_map_

edm::EDGetToken HGCalTowerProducer::input_towers_map_
private

Definition at line 28 of file HGCalTowerProducer.cc.

Referenced by produce().

◆ input_trigger_cells_

edm::EDGetToken HGCalTowerProducer::input_trigger_cells_
private

Definition at line 29 of file HGCalTowerProducer.cc.

Referenced by produce().

◆ towersProcess_

std::unique_ptr<HGCalTowerProcessorBase> HGCalTowerProducer::towersProcess_
private

Definition at line 32 of file HGCalTowerProducer.cc.

Referenced by beginRun(), HGCalTowerProducer(), and produce().

◆ triggerGeometry_

edm::ESHandle<HGCalTriggerGeometryBase> HGCalTowerProducer::triggerGeometry_
private

Definition at line 30 of file HGCalTowerProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

edm::ESGetToken<HGCalTriggerGeometryBase, CaloGeometryRecord> HGCalTowerProducer::triggerGeomToken_
private

Definition at line 31 of file HGCalTowerProducer.cc.

Referenced by beginRun().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HGCalTowerProducer::towersProcess_
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
Definition: HGCalTowerProducer.cc:32
edm::Handle
Definition: AssociativeIterator.h:50
HGCalTowerProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTowerProducer.cc:30
HGCalTowerProducer::input_trigger_cells_
edm::EDGetToken input_trigger_cells_
Definition: HGCalTowerProducer.cc:29
edm::ParameterSet
Definition: ParameterSet.h:47
HGCalTowerProducer::triggerGeomToken_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
Definition: HGCalTowerProducer.cc:31
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTowerProducer::input_towers_map_
edm::EDGetToken input_towers_map_
Definition: HGCalTowerProducer.cc:28
edm::InputTag
Definition: InputTag.h:15
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37