2020#include " DataFormats/GEMDigi/interface/ME0StubCollection.h"
2121#include " DataFormats/GEMDigi/interface/ME0Stub.h"
2222
23- // #include "RecoLocalMuon/GEMSegment/plugins/GEMSegmentBuilder.h"
2423#include " L1Trigger/L1TGEM/plugins/ME0StubBuilder.h"
2524#include " Geometry/Records/interface/MuonGeometryRecord.h"
2625
27- // using namespace l1t::me0;
28-
2926class ME0StubProducer : public edm ::stream::EDProducer<> {
3027public:
31- // / Constructor
3228 explicit ME0StubProducer (const edm::ParameterSet&);
33- // / Destructor
3429 ~ME0StubProducer () override {}
35- // / Produce the ME0Stub collection
30+
3631 void produce (edm::Event&, const edm::EventSetup&) override ;
3732
3833 static void fillDescriptions (edm::ConfigurationDescriptions& descriptions);
3934
4035private:
41- int iev; // events through
36+ int iev;
4237 edm::EDGetTokenT<GEMPadDigiCollection> theGEMPadDigiToken;
4338 std::unique_ptr<ME0StubBuilder> segmentBuilder_;
4439 edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemGeomToken_;
4540};
4641
4742ME0StubProducer::ME0StubProducer (const edm::ParameterSet& ps) : iev(0 ) {
4843 theGEMPadDigiToken = consumes<GEMPadDigiCollection>(ps.getParameter <edm::InputTag>(" InputCollection" ));
49- segmentBuilder_ = std::make_unique<ME0StubBuilder>(ps); // pass on the Parameter Set
44+ segmentBuilder_ = std::make_unique<ME0StubBuilder>(ps);
5045 gemGeomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
51- // register what this produces
5246 produces<ME0StubCollection>();
5347}
5448
@@ -62,17 +56,13 @@ void ME0StubProducer::fillDescriptions(edm::ConfigurationDescriptions& descripti
6256void ME0StubProducer::produce (edm::Event& ev, const edm::EventSetup& setup) {
6357 LogDebug (" ME0StubProducer" ) << " start producing segments for " << ++iev << " th event with GEM data" ;
6458
65- // get the collection of GEMDigi
6659 edm::Handle<GEMPadDigiCollection> gemPadDigis;
6760 ev.getByToken (theGEMPadDigiToken, gemPadDigis);
6861
69- // create empty collection of Segments
7062 auto oc = std::make_unique<ME0StubCollection>();
7163
72- // fill the collection
73- segmentBuilder_->build (gemPadDigis.product (), *oc); // @@ FILL oc
64+ segmentBuilder_->build (gemPadDigis.product (), *oc);
7465
75- // put collection in event
7666 ev.put (std::move (oc));
7767}
7868
0 commit comments