CMS 3D CMS Logo

ME0TriggerPseudoProducer.cc
Go to the documentation of this file.
1 
25 
27 
29 public:
31  ~ME0TriggerPseudoProducer() override;
32 
33  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
34 
35 private:
39 };
40 
42  me0segmentProducer_ = conf.getParameter<edm::InputTag>("ME0SegmentProducer");
43  me0segment_token_ = consumes<ME0SegmentCollection>(me0segmentProducer_);
44  config_ = conf;
45 
46  // register what this produces
47  produces<ME0TriggerDigiCollection>();
48 }
49 
51 
54  setup.get<MuonGeometryRecord>().get(h_me0);
55 
56  edm::Handle<ME0SegmentCollection> me0Segmentcoll;
57  ev.getByToken(me0segment_token_, me0Segmentcoll);
58  const ME0SegmentCollection* me0segments = me0Segmentcoll.product();
59 
60  // Create empty collection
61  auto oc_trig = std::make_unique<ME0TriggerDigiCollection>();
62 
63  auto trigBuilder = std::make_unique<ME0TriggerPseudoBuilder>(config_);
64  trigBuilder->setME0Geometry(&*h_me0);
65 
66  // Fill output collections if valid input collection is available.
67  if (me0Segmentcoll.isValid()) {
68  trigBuilder->build(me0segments, *oc_trig);
69  }
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
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
ME0TriggerPseudoProducer::me0segmentProducer_
edm::InputTag me0segmentProducer_
Definition: ME0TriggerPseudoProducer.cc:36
edm::EDGetTokenT< ME0SegmentCollection >
ME0TriggerPseudoProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: ME0TriggerPseudoProducer.cc:52
ME0TriggerDigiCollection.h
ME0SegmentCollection.h
ME0TriggerPseudoProducer::~ME0TriggerPseudoProducer
~ME0TriggerPseudoProducer() override
Definition: ME0TriggerPseudoProducer.cc:50
ME0TriggerPseudoProducer
Definition: ME0TriggerPseudoProducer.cc:28
ME0TriggerPseudoProducer::config_
edm::ParameterSet config_
Definition: ME0TriggerPseudoProducer.cc:38
edm::Handle< ME0SegmentCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ME0TriggerPseudoBuilder.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle< ME0Geometry >
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
ME0TriggerPseudoProducer::me0segment_token_
edm::EDGetTokenT< ME0SegmentCollection > me0segment_token_
Definition: ME0TriggerPseudoProducer.cc:37
ME0TriggerPseudoProducer::ME0TriggerPseudoProducer
ME0TriggerPseudoProducer(const edm::ParameterSet &)
Definition: ME0TriggerPseudoProducer.cc:41
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
InputTag.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ME0Geometry.h
ME0TriggerPseudoBuilder
Definition: ME0TriggerPseudoBuilder.h:20
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
ConsumesCollector.h
ParameterSet.h
EDProducer.h
MuonGeometryRecord.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
ME0SegmentCollection
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
edm::InputTag
Definition: InputTag.h:15