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
HGCalBackendLayer2Producer Class Reference
Inheritance diagram for HGCalBackendLayer2Producer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalBackendLayer2Producer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~HGCalBackendLayer2Producer () 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

std::unique_ptr
< HGCalBackendLayer2ProcessorBase
backendProcess_
 
edm::EDGetToken input_clusters_
 
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 21 of file HGCalBackendLayer2Producer.cc.

Constructor & Destructor Documentation

HGCalBackendLayer2Producer::HGCalBackendLayer2Producer ( const edm::ParameterSet conf)

Definition at line 40 of file HGCalBackendLayer2Producer.cc.

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

41  : input_clusters_(consumes<l1t::HGCalClusterBxCollection>(conf.getParameter<edm::InputTag>("InputCluster"))),
42  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
43  //setup Backend parameters
44  const edm::ParameterSet& beParamConfig = conf.getParameterSet("ProcessorParameters");
45  const std::string& beProcessorName = beParamConfig.getParameter<std::string>("ProcessorName");
46  backendProcess_ = std::unique_ptr<HGCalBackendLayer2ProcessorBase>{
47  HGCalBackendLayer2Factory::get()->create(beProcessorName, beParamConfig)};
48 
49  produces<l1t::HGCalMulticlusterBxCollection>(backendProcess_->name());
50  produces<l1t::HGCalClusterBxCollection>(backendProcess_->name() + "Unclustered");
51 }
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
std::unique_ptr< HGCalBackendLayer2ProcessorBase > backendProcess_
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
HGCalBackendLayer2Producer::~HGCalBackendLayer2Producer ( )
inlineoverride

Definition at line 24 of file HGCalBackendLayer2Producer.cc.

24 {}

Member Function Documentation

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

Definition at line 53 of file HGCalBackendLayer2Producer.cc.

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

53  {
56 }
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
std::unique_ptr< HGCalBackendLayer2ProcessorBase > backendProcess_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
void HGCalBackendLayer2Producer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 58 of file HGCalBackendLayer2Producer.cc.

References backendProcess_, edm::Event::getByToken(), input_clusters_, eostools::move(), and edm::Event::put().

58  {
59  // Output collections
60  std::pair<l1t::HGCalMulticlusterBxCollection, l1t::HGCalClusterBxCollection> be_output;
61 
62  // Input collections
64 
65  e.getByToken(input_clusters_, trigCluster2DBxColl);
66 
67  backendProcess_->run(trigCluster2DBxColl, be_output);
68 
69  e.put(std::make_unique<l1t::HGCalMulticlusterBxCollection>(std::move(be_output.first)), backendProcess_->name());
70  e.put(std::make_unique<l1t::HGCalClusterBxCollection>(std::move(be_output.second)),
71  backendProcess_->name() + "Unclustered");
72 }
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
def move
Definition: eostools.py:511
std::unique_ptr< HGCalBackendLayer2ProcessorBase > backendProcess_

Member Data Documentation

std::unique_ptr<HGCalBackendLayer2ProcessorBase> HGCalBackendLayer2Producer::backendProcess_
private

Definition at line 35 of file HGCalBackendLayer2Producer.cc.

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

edm::EDGetToken HGCalBackendLayer2Producer::input_clusters_
private

Definition at line 31 of file HGCalBackendLayer2Producer.cc.

Referenced by produce().

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

Definition at line 32 of file HGCalBackendLayer2Producer.cc.

Referenced by beginRun().

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

Definition at line 33 of file HGCalBackendLayer2Producer.cc.

Referenced by beginRun().