CMS 3D CMS Logo

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

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalConcentratorProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HGCalConcentratorProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

std::unique_ptr< HGCalConcentratorProcessorBaseconcentratorProcess_
 
edm::EDGetToken input_cell_
 
edm::EDGetToken input_sums_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 18 of file HGCalConcentratorProducer.cc.

Constructor & Destructor Documentation

HGCalConcentratorProducer::HGCalConcentratorProducer ( const edm::ParameterSet conf)

Definition at line 36 of file HGCalConcentratorProducer.cc.

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

37  : input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
38  input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums"))) {
39  //setup Concentrator parameters
40  const edm::ParameterSet& concParamConfig = conf.getParameterSet("ProcessorParameters");
41  const std::string& concProcessorName = concParamConfig.getParameter<std::string>("ProcessorName");
42  concentratorProcess_ = std::unique_ptr<HGCalConcentratorProcessorBase>{
43  HGCalConcentratorFactory::get()->create(concProcessorName, concParamConfig)};
44 
45  produces<l1t::HGCalTriggerCellBxCollection>(concentratorProcess_->name());
46  produces<l1t::HGCalTriggerSumsBxCollection>(concentratorProcess_->name());
47 }
T getParameter(std::string const &) const
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
ParameterSet const & getParameterSet(std::string const &) const
T get(const Candidate &c)
Definition: component.h:55
HGCalConcentratorProducer::~HGCalConcentratorProducer ( )
inlineoverride

Definition at line 21 of file HGCalConcentratorProducer.cc.

References beginRun(), and produce().

21 {}

Member Function Documentation

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

Definition at line 49 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, edm::EventSetup::get(), edm::ESHandle< T >::product(), and triggerGeometry_.

Referenced by ~HGCalConcentratorProducer().

49  {
51 
53 }
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
void HGCalConcentratorProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 55 of file HGCalConcentratorProducer.cc.

References concentratorProcess_, edm::Event::getByToken(), input_cell_, eostools::move(), and edm::Event::put().

Referenced by ~HGCalConcentratorProducer().

55  {
56  // Output collections
57  auto cc_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
58  auto cc_trigsums_output = std::make_unique<l1t::HGCalTriggerSumsBxCollection>();
59 
60  // Input collections
62 
63  e.getByToken(input_cell_, trigCellBxColl);
64  concentratorProcess_->run(trigCellBxColl, *cc_trigcell_output, es);
65  // Put in the event
66  // At the moment the HGCalTriggerSumsBxCollection is empty
67  e.put(std::move(cc_trigcell_output), concentratorProcess_->name());
68  e.put(std::move(cc_trigsums_output), concentratorProcess_->name());
69 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

std::unique_ptr<HGCalConcentratorProcessorBase> HGCalConcentratorProducer::concentratorProcess_
private

Definition at line 31 of file HGCalConcentratorProducer.cc.

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

edm::EDGetToken HGCalConcentratorProducer::input_cell_
private

Definition at line 28 of file HGCalConcentratorProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalConcentratorProducer::input_sums_
private

Definition at line 28 of file HGCalConcentratorProducer.cc.

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

Definition at line 29 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().