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
 
 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 inputbh_
 
edm::EDGetToken inputee_
 
edm::EDGetToken inputfh_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecordtriggerGeomToken_
 
std::unique_ptr< HGCalVFEProcessorBasevfeProcess_
 

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

Constructor & Destructor Documentation

◆ HGCalVFEProducer()

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

Definition at line 36 of file HGCalVFEProducer.cc.

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

37  : inputee_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("eeDigis"))),
38  inputfh_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("fhDigis"))),
39  inputbh_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("bhDigis"))),
40  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetToken inputbh_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
edm::EDGetToken inputee_
edm::EDGetToken inputfh_
#define get

◆ ~HGCalVFEProducer()

HGCalVFEProducer::~HGCalVFEProducer ( )
inlineoverride

Definition at line 21 of file HGCalVFEProducer.cc.

21 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 50 of file HGCalVFEProducer.cc.

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

50  {
52  vfeProcess_->setGeometry(triggerGeometry_.product());
53 }
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
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:151
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_

◆ produce()

void HGCalVFEProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 55 of file HGCalVFEProducer.cc.

References MillePedeFileConverter_cfg::e, inputbh_, inputee_, inputfh_, edm::HandleBase::isValid(), eostools::move(), and vfeProcess_.

55  {
56  // Output collection
57  auto vfe_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
58 
59  // Input collections
63 
64  e.getByToken(inputee_, ee_digis_h);
65  e.getByToken(inputfh_, fh_digis_h);
66  e.getByToken(inputbh_, bh_digis_h);
67 
68  // Processing DigiCollections and putting the results into the HGCalTriggerCellBxCollectio
69  if (ee_digis_h.isValid()) {
70  const HGCalDigiCollection& ee_digis = *ee_digis_h;
71  vfeProcess_->run(ee_digis, *vfe_trigcell_output);
72  }
73 
74  if (fh_digis_h.isValid()) {
75  const HGCalDigiCollection& fh_digis = *fh_digis_h;
76  vfeProcess_->run(fh_digis, *vfe_trigcell_output);
77  }
78 
79  if (bh_digis_h.isValid()) {
80  const HGCalDigiCollection& bh_digis = *bh_digis_h;
81  vfeProcess_->run(bh_digis, *vfe_trigcell_output);
82  }
83 
84  // Put in the event
85  e.put(std::move(vfe_trigcell_output), vfeProcess_->name());
86 }
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::EDGetToken inputbh_
edm::EDGetToken inputee_
edm::EDGetToken inputfh_
bool isValid() const
Definition: HandleBase.h:70
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ inputbh_

edm::EDGetToken HGCalVFEProducer::inputbh_
private

Definition at line 28 of file HGCalVFEProducer.cc.

Referenced by produce().

◆ inputee_

edm::EDGetToken HGCalVFEProducer::inputee_
private

Definition at line 28 of file HGCalVFEProducer.cc.

Referenced by produce().

◆ inputfh_

edm::EDGetToken HGCalVFEProducer::inputfh_
private

Definition at line 28 of file HGCalVFEProducer.cc.

Referenced by produce().

◆ triggerGeometry_

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

Definition at line 29 of file HGCalVFEProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

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

Definition at line 30 of file HGCalVFEProducer.cc.

Referenced by beginRun().

◆ vfeProcess_

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

Definition at line 31 of file HGCalVFEProducer.cc.

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