CMS 3D CMS Logo

HFNoseVFEProducer.cc
Go to the documentation of this file.
4 
7 
10 
13 
15 
16 #include <memory>
17 
19 public:
21  ~HFNoseVFEProducer() override {}
22 
23  void beginRun(const edm::Run&, const edm::EventSetup&) override;
24  void produce(edm::Event&, const edm::EventSetup&) override;
25 
26 private:
27  // inputs
30 
31  std::unique_ptr<HGCalVFEProcessorBase> vfeProcess_;
32 };
33 
35 
37  : inputnose_(consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("noseDigis"))) {
38  // setup VFE parameters
39  const edm::ParameterSet& vfeParamConfig = conf.getParameterSet("ProcessorParameters");
40  const std::string& vfeProcessorName = vfeParamConfig.getParameter<std::string>("ProcessorName");
41  vfeProcess_ = std::unique_ptr<HGCalVFEProcessorBase>{
42  HGCalVFEProcessorBaseFactory::get()->create(vfeProcessorName, vfeParamConfig)};
43 
44  produces<l1t::HGCalTriggerCellBxCollection>(vfeProcess_->name());
45 }
46 
47 void HFNoseVFEProducer::beginRun(const edm::Run& /*run*/, const edm::EventSetup& es) {
49  vfeProcess_->setGeometry(triggerGeometry_.product());
50 }
51 
53  // Output collection
54  auto vfe_trigcell_output = std::make_unique<l1t::HGCalTriggerCellBxCollection>();
55 
57  e.getByToken(inputnose_, nose_digis_h);
58 
59  if (nose_digis_h.isValid()) {
60  const HGCalDigiCollection& nose_digis = *nose_digis_h;
61  vfeProcess_->run(nose_digis, *vfe_trigcell_output, es);
62  }
63 
64  // Put in the event
65  e.put(std::move(vfe_trigcell_output), vfeProcess_->name());
66 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
EDProducer.h
edm::SortedCollection
Definition: SortedCollection.h:49
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalTriggerGeometryBase.h
edm::ESHandle< HGCalTriggerGeometryBase >
HFNoseVFEProducer::HFNoseVFEProducer
HFNoseVFEProducer(const edm::ParameterSet &)
Definition: HFNoseVFEProducer.cc:36
CaloGeometryRecord.h
HFNoseVFEProducer
Definition: HFNoseVFEProducer.cc:18
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HGCDigiCollections.h
edm::stream::EDProducer
Definition: EDProducer.h:36
edm::EventSetup
Definition: EventSetup.h:58
edm::EDGetToken
Definition: EDGetToken.h:35
get
#define get
HFNoseVFEProducer::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: HFNoseVFEProducer.cc:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
HGCalProcessorBase.h
HFNoseVFEProducer::inputnose_
edm::EDGetToken inputnose_
Definition: HFNoseVFEProducer.cc:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerCell.h
HFNoseVFEProducer::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HFNoseVFEProducer.cc:29
HFNoseVFEProducer::~HFNoseVFEProducer
~HFNoseVFEProducer() override
Definition: HFNoseVFEProducer.cc:21
ParameterSet.h
HFNoseVFEProducer::vfeProcess_
std::unique_ptr< HGCalVFEProcessorBase > vfeProcess_
Definition: HFNoseVFEProducer.cc:31
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
HFNoseVFEProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HFNoseVFEProducer.cc:52
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37