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
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
< HGCalTriggerGeometryBase
triggerGeometry_
 
edm::ESGetToken
< HGCalTriggerGeometryBase,
CaloGeometryRecord
triggerGeomToken_
 
std::unique_ptr
< HGCalVFEProcessorBase
vfeProcess_
 

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 ( 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 }
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > triggerGeomToken_
#define get
edm::EDGetToken inputnose_
HFNoseVFEProducer::~HFNoseVFEProducer ( )
inlineoverride

Definition at line 21 of file HFNoseVFEProducer.cc.

21 {}

Member Function Documentation

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< class >::product(), triggerGeometry_, triggerGeomToken_, and vfeProcess_.

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

Definition at line 54 of file HFNoseVFEProducer.cc.

References edm::Event::getByToken(), inputnose_, eostools::move(), edm::Event::put(), 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 }
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< HGCalVFEProcessorBase > vfeProcess_
edm::EDGetToken inputnose_

Member Data Documentation

edm::EDGetToken HFNoseVFEProducer::inputnose_
private

Definition at line 28 of file HFNoseVFEProducer.cc.

Referenced by produce().

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

Definition at line 29 of file HFNoseVFEProducer.cc.

Referenced by beginRun().

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

Definition at line 30 of file HFNoseVFEProducer.cc.

Referenced by beginRun().

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

Definition at line 32 of file HFNoseVFEProducer.cc.

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