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 19 of file HGCalConcentratorProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 39 of file HGCalConcentratorProducer.cc.

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

39  :
40  input_cell_(consumes<l1t::HGCalTriggerCellBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerCells"))),
41  input_sums_(consumes<l1t::HGCalTriggerSumsBxCollection>(conf.getParameter<edm::InputTag>("InputTriggerSums")))
42 {
43  //setup Concentrator parameters
44  const edm::ParameterSet& concParamConfig = conf.getParameterSet("ProcessorParameters");
45  const std::string& concProcessorName = concParamConfig.getParameter<std::string>("ProcessorName");
46  HGCalConcentratorProcessorBase* concProc = HGCalConcentratorFactory::get()->create(concProcessorName, concParamConfig);
47  concentratorProcess_.reset(concProc);
48 
49  produces<l1t::HGCalTriggerCellBxCollection>(concentratorProcess_->name());
50  produces<l1t::HGCalTriggerSumsBxCollection>(concentratorProcess_->name());
51 
52 }
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 22 of file HGCalConcentratorProducer.cc.

References beginRun(), and produce().

22 { }

Member Function Documentation

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

Definition at line 54 of file HGCalConcentratorProducer.cc.

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

Referenced by ~HGCalConcentratorProducer().

55  {
57 
59 
60 }
std::unique_ptr< HGCalConcentratorProcessorBase > concentratorProcess_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
void HGCalConcentratorProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 62 of file HGCalConcentratorProducer.cc.

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

Referenced by ~HGCalConcentratorProducer().

62  {
63 
64  // Output collections
65  auto cc_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
66  auto cc_trigsums_output = std::make_unique<l1t::HGCalTriggerSumsBxCollection>();
67 
68  // Input collections
70 
71  e.getByToken(input_cell_,trigCellBxColl);
72  concentratorProcess_->run(trigCellBxColl, *cc_trigcell_output, es);
73  // Put in the event
74  // At the moment the HGCalTriggerSumsBxCollection is empty
75  e.put(std::move(cc_trigcell_output), concentratorProcess_->name());
76  e.put(std::move(cc_trigsums_output), concentratorProcess_->name());
77 
78 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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 33 of file HGCalConcentratorProducer.cc.

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

edm::EDGetToken HGCalConcentratorProducer::input_cell_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalConcentratorProducer::input_sums_
private

Definition at line 30 of file HGCalConcentratorProducer.cc.

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

Definition at line 31 of file HGCalConcentratorProducer.cc.

Referenced by beginRun().