CMS 3D CMS Logo

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ HFNoseVFEProducer()

HFNoseVFEProducer::HFNoseVFEProducer ( const edm::ParameterSet conf)

Definition at line 37 of file HFNoseVFEProducer.cc.

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

38  : inputnose_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("noseDigis"))),
39  triggerGeomToken_(esConsumes<HGCalTriggerGeometryBase, CaloGeometryRecord, edm::Transition::BeginRun>()) {
40  // setup VFE parameters
41  const edm::ParameterSet& vfeParamConfig = conf.getParameterSet("ProcessorParameters");
42  const std::string& vfeProcessorName = vfeParamConfig.getParameter<std::string>("ProcessorName");
43  vfeProcess_ = std::unique_ptr<HGCalVFEProcessorBase>{
44  HGCalVFEProcessorBaseFactory::get()->create(vfeProcessorName, vfeParamConfig)};
45 
46  produces<l1t::HGCalTriggerCellBxCollection>(vfeProcess_->name());
47 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
#define get
edm::EDGetToken inputnose_

◆ ~HFNoseVFEProducer()

HFNoseVFEProducer::~HFNoseVFEProducer ( )
inlineoverride

Definition at line 21 of file HFNoseVFEProducer.cc.

21 {}

Member Function Documentation

◆ beginRun()

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

Definition at line 49 of file HFNoseVFEProducer.cc.

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

49  {
51  vfeProcess_->setGeometry(triggerGeometry_.product());
52 }
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_

◆ produce()

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

Definition at line 54 of file HFNoseVFEProducer.cc.

References MillePedeFileConverter_cfg::e, inputnose_, eostools::move(), and vfeProcess_.

54  {
55  // Output collection
56  auto vfe_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
57 
59  e.getByToken(inputnose_, nose_digis_h);
60 
61  if (nose_digis_h.isValid()) {
62  const HGCalDigiCollection& nose_digis = *nose_digis_h;
63  vfeProcess_->run(nose_digis, *vfe_trigcell_output);
64  }
65 
66  // Put in the event
67  e.put(std::move(vfe_trigcell_output), vfeProcess_->name());
68 }
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::EDGetToken inputnose_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ inputnose_

edm::EDGetToken HFNoseVFEProducer::inputnose_
private

Definition at line 28 of file HFNoseVFEProducer.cc.

Referenced by produce().

◆ triggerGeometry_

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

Definition at line 29 of file HFNoseVFEProducer.cc.

Referenced by beginRun().

◆ triggerGeomToken_

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

Definition at line 30 of file HFNoseVFEProducer.cc.

Referenced by beginRun().

◆ vfeProcess_

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

Definition at line 32 of file HFNoseVFEProducer.cc.

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