CMS 3D CMS Logo

ME0TriggerProducer.cc
Go to the documentation of this file.
1 
26 
27 class ME0TriggerBuilder;
28 
30 public:
31  explicit ME0TriggerProducer(const edm::ParameterSet&);
32  ~ME0TriggerProducer() override;
33 
34  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
35 
36 private:
41 };
42 
44  me0PadDigis_ = conf.getParameter<edm::InputTag>("ME0PadDigis");
45  me0_pad_token_ = consumes<ME0PadDigiCollection>(me0PadDigis_);
46  me0_geom_token_ = esConsumes<ME0Geometry, MuonGeometryRecord>();
47  config_ = conf;
48 
49  // register what this produces
50  produces<ME0TriggerDigiCollection>();
51 }
52 
54 
57 
59  ev.getByToken(me0_pad_token_, me0PadDigis);
60  const ME0PadDigiCollection* me0Pads = me0PadDigis.product();
61 
62  // Create empty collection
63  std::unique_ptr<ME0TriggerDigiCollection> oc_trig(new ME0TriggerDigiCollection);
64 
65  std::unique_ptr<ME0TriggerBuilder> trigBuilder(new ME0TriggerBuilder(config_));
66  trigBuilder->setME0Geometry(&*h_me0);
67 
68  // Fill output collections if valid input collection is available.
69  trigBuilder->build(me0Pads, *oc_trig);
70 
71  // Put collections in event.
72  ev.put(std::move(oc_trig));
73 }
74 
edm::StreamID
Definition: StreamID.h:30
Handle.h
MessageLogger.h
ME0TriggerBuilder
Definition: ME0TriggerBuilder.h:20
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ME0PadDigiCollection
ESHandle.h
edm::EDGetTokenT< ME0PadDigiCollection >
ME0TriggerProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: ME0TriggerProducer.cc:55
ME0TriggerDigiCollection.h
ME0TriggerProducer::me0_pad_token_
edm::EDGetTokenT< ME0PadDigiCollection > me0_pad_token_
Definition: ME0TriggerProducer.cc:38
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MakerMacros.h
ME0TriggerProducer
Definition: ME0TriggerProducer.cc:29
ME0TriggerProducer::me0PadDigis_
edm::InputTag me0PadDigis_
Definition: ME0TriggerProducer.cc:37
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle< ME0Geometry >
ME0TriggerBuilder.h
ME0PadDigiCollection.h
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::EventSetup
Definition: EventSetup.h:57
ME0TriggerProducer::~ME0TriggerProducer
~ME0TriggerProducer() override
Definition: ME0TriggerProducer.cc:53
edm::ESGetToken< ME0Geometry, MuonGeometryRecord >
InputTag.h
ME0TriggerProducer::config_
edm::ParameterSet config_
Definition: ME0TriggerProducer.cc:40
ME0Geometry.h
ME0TriggerDigiCollection
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ME0TriggerProducer::ME0TriggerProducer
ME0TriggerProducer(const edm::ParameterSet &)
Definition: ME0TriggerProducer.cc:43
ConsumesCollector.h
ParameterSet.h
EDProducer.h
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
ME0TriggerProducer::me0_geom_token_
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > me0_geom_token_
Definition: ME0TriggerProducer.cc:39