CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

edm::EDGetToken inputbh_
 
edm::EDGetToken inputee_
 
edm::EDGetToken inputfh_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
std::unique_ptr< HGCalVFEProcessorBasevfeProcess_
 

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 HGCalVFEProducer.cc.

Constructor & Destructor Documentation

HGCalVFEProducer::HGCalVFEProducer ( const edm::ParameterSet conf)

Definition at line 37 of file HGCalVFEProducer.cc.

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

38  : inputee_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("eeDigis"))),
39  inputfh_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("fhDigis"))),
40  inputbh_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("bhDigis"))) {
41  //setup VFE parameters
42  const edm::ParameterSet& vfeParamConfig = conf.getParameterSet("ProcessorParameters");
43  const std::string& vfeProcessorName = vfeParamConfig.getParameter<std::string>("ProcessorName");
44  vfeProcess_ = std::unique_ptr<HGCalVFEProcessorBase>{
45  HGCalVFEProcessorBaseFactory::get()->create(vfeProcessorName, vfeParamConfig)};
46 
47  produces<l1t::HGCalTriggerCellBxCollection>(vfeProcess_->name());
48  produces<l1t::HGCalTriggerSumsBxCollection>(vfeProcess_->name());
49 }
T getParameter(std::string const &) const
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::EDGetToken inputbh_
edm::EDGetToken inputee_
edm::EDGetToken inputfh_
ParameterSet const & getParameterSet(std::string const &) const
T get(const Candidate &c)
Definition: component.h:55
HGCalVFEProducer::~HGCalVFEProducer ( )
inlineoverride

Definition at line 22 of file HGCalVFEProducer.cc.

References beginRun(), and produce().

22 {}

Member Function Documentation

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

Definition at line 51 of file HGCalVFEProducer.cc.

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

Referenced by ~HGCalVFEProducer().

51  {
53  vfeProcess_->setGeometry(triggerGeometry_.product());
54 }
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
T get() const
Definition: EventSetup.h:71
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
T const * product() const
Definition: ESHandle.h:86
void HGCalVFEProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 56 of file HGCalVFEProducer.cc.

References edm::Event::getByToken(), inputbh_, inputee_, inputfh_, eostools::move(), edm::Event::put(), and vfeProcess_.

Referenced by ~HGCalVFEProducer().

56  {
57  // Output collections
58  auto vfe_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
59  auto vfe_trigsums_output = std::make_unique<l1t::HGCalTriggerSumsBxCollection>();
60 
61  // Input collections
65 
66  e.getByToken(inputee_, ee_digis_h);
67  e.getByToken(inputfh_, fh_digis_h);
68  e.getByToken(inputbh_, bh_digis_h);
69 
70  const HGCalDigiCollection& ee_digis = *ee_digis_h;
71  const HGCalDigiCollection& fh_digis = *fh_digis_h;
72  const HGCalDigiCollection& bh_digis = *bh_digis_h;
73 
74  // Processing DigiCollections and putting the results into the HGCalTriggerCellBxCollection
75  vfeProcess_->run(ee_digis, *vfe_trigcell_output, es);
76  vfeProcess_->run(fh_digis, *vfe_trigcell_output, es);
77  vfeProcess_->run(bh_digis, *vfe_trigcell_output, es);
78 
79  // Put in the event
80  e.put(std::move(vfe_trigcell_output), vfeProcess_->name());
81  // At the moment the HGCalTriggerSumsBxCollection is empty
82  e.put(std::move(vfe_trigsums_output), vfeProcess_->name());
83 }
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< HGCalVFEProcessorBase > vfeProcess_
edm::EDGetToken inputbh_
edm::EDGetToken inputee_
edm::EDGetToken inputfh_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

edm::EDGetToken HGCalVFEProducer::inputbh_
private

Definition at line 29 of file HGCalVFEProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalVFEProducer::inputee_
private

Definition at line 29 of file HGCalVFEProducer.cc.

Referenced by produce().

edm::EDGetToken HGCalVFEProducer::inputfh_
private

Definition at line 29 of file HGCalVFEProducer.cc.

Referenced by produce().

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

Definition at line 30 of file HGCalVFEProducer.cc.

Referenced by beginRun().

std::unique_ptr<HGCalVFEProcessorBase> HGCalVFEProducer::vfeProcess_
private

Definition at line 32 of file HGCalVFEProducer.cc.

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