CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< HGCalTowerProcessorBase
towersProcess_
 
edm::ESHandle
< HGCalTriggerGeometryBase
triggerGeometry_
 
edm::ESGetToken
< HGCalTriggerGeometryBase,
CaloGeometryRecord
triggerGeomToken_
 

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 ( const edm::ParameterSet conf)

Definition at line 37 of file HGCalTowerProducer.cc.

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

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 }
edm::EDGetToken input_trigger_cells_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
edm::EDGetToken input_towers_map_
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
HGCalTowerProducer::~HGCalTowerProducer ( )
inlineoverride

Definition at line 21 of file HGCalTowerProducer.cc.

21 {}

Member Function Documentation

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

Definition at line 50 of file HGCalTowerProducer.cc.

References edm::EventSetup::getHandle(), edm::ESHandle< class >::product(), towersProcess_, triggerGeometry_, and triggerGeomToken_.

50  {
52  towersProcess_->setGeometry(triggerGeometry_.product());
53 }
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_
void HGCalTowerProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 55 of file HGCalTowerProducer.cc.

References edm::Event::getByToken(), input_towers_map_, input_trigger_cells_, eostools::move(), edm::Event::put(), and towersProcess_.

55  {
56  // Output collections
57  auto towers_output = std::make_unique<l1t::HGCalTowerBxCollection>();
58 
59  // Input collections
60  std::pair<edm::Handle<l1t::HGCalTowerMapBxCollection>, edm::Handle<l1t::HGCalClusterBxCollection> > inputsColl;
61  auto& towersMapBxColl = inputsColl.first;
62  auto& clustersBxColl = inputsColl.second;
63 
64  e.getByToken(input_towers_map_, towersMapBxColl);
65  e.getByToken(input_trigger_cells_, clustersBxColl);
66 
67  towersProcess_->run(inputsColl, *towers_output);
68 
69  e.put(std::move(towers_output), towersProcess_->name());
70 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetToken input_trigger_cells_
def move
Definition: eostools.py:511
edm::EDGetToken input_towers_map_
std::unique_ptr< HGCalTowerProcessorBase > towersProcess_

Member Data Documentation

edm::EDGetToken HGCalTowerProducer::input_towers_map_
private

Definition at line 28 of file HGCalTowerProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalTowerProducer::input_trigger_cells_
private

Definition at line 29 of file HGCalTowerProducer.cc.

Referenced by produce().

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

Definition at line 32 of file HGCalTowerProducer.cc.

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

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

Definition at line 30 of file HGCalTowerProducer.cc.

Referenced by beginRun().

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

Definition at line 31 of file HGCalTowerProducer.cc.

Referenced by beginRun().