CMS 3D CMS Logo

GEMSegmentProducer.cc
Go to the documentation of this file.
1 
15 
20 
23 
25 public:
27  explicit GEMSegmentProducer(const edm::ParameterSet&);
29  ~GEMSegmentProducer() override {}
31  void produce(edm::Event&, const edm::EventSetup&) override;
32 
33 private:
34  int iev; // events through
36  std::unique_ptr<GEMSegmentBuilder> segmentBuilder_;
38 };
39 
41  theGEMRecHitToken = consumes<GEMRecHitCollection>(ps.getParameter<edm::InputTag>("gemRecHitLabel"));
42  segmentBuilder_ = std::make_unique<GEMSegmentBuilder>(ps); // pass on the Parameter Set
43  gemGeomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
44  // register what this produces
45  produces<GEMSegmentCollection>();
46 }
47 
49  LogDebug("GEMSegmentProducer") << "start producing segments for " << ++iev << "th event with GEM data";
50 
51  // find the geometry (& conditions?) for this event & cache it in the builder
53  const GEMGeometry* mgeom = &*gemg;
54  segmentBuilder_->setGeometry(mgeom);
55 
56  // get the collection of GEMRecHit
58  ev.getByToken(theGEMRecHitToken, gemRecHits);
59 
60  // create empty collection of Segments
61  auto oc = std::make_unique<GEMSegmentCollection>();
62 
63  // fill the collection
64  segmentBuilder_->build(gemRecHits.product(), *oc); //@@ FILL oc
65 
66  // put collection in event
67  ev.put(std::move(oc));
68 }
69 
iev
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ uint32_t int iev
Definition: CAHitNtupletGeneratorKernelsImpl.h:544
GEMSegmentProducer
Definition: GEMSegmentProducer.cc:24
Handle.h
MessageLogger.h
ESHandle.h
edm::EDGetTokenT< GEMRecHitCollection >
EDProducer.h
GEMSegmentProducer::~GEMSegmentProducer
~GEMSegmentProducer() override
Destructor.
Definition: GEMSegmentProducer.cc:29
edm::Handle< GEMRecHitCollection >
ESGetToken.h
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
GEMSegmentProducer::gemGeomToken_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken_
Definition: GEMSegmentProducer.cc:37
MakerMacros.h
GEMSegmentProducer::iev
int iev
Definition: GEMSegmentProducer.cc:34
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ESHandle< GEMGeometry >
GEMSegmentProducer::segmentBuilder_
std::unique_ptr< GEMSegmentBuilder > segmentBuilder_
Definition: GEMSegmentProducer.cc:36
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::stream::EDProducer
Definition: EDProducer.h:38
GEMSegmentProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Produce the GEMSegment collection.
Definition: GEMSegmentProducer.cc:48
GEMRecHitCollection.h
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< GEMGeometry, MuonGeometryRecord >
InputTag.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
GEMSegmentCollection.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
GEMSegmentProducer::GEMSegmentProducer
GEMSegmentProducer(const edm::ParameterSet &)
Constructor.
Definition: GEMSegmentProducer.cc:40
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMGeometry
Definition: GEMGeometry.h:24
GEMSegmentBuilder.h
gemRecHits_cfi.gemRecHits
gemRecHits
Definition: gemRecHits_cfi.py:7
ParameterSet.h
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
GEMSegmentProducer::theGEMRecHitToken
edm::EDGetTokenT< GEMRecHitCollection > theGEMRecHitToken
Definition: GEMSegmentProducer.cc:35
GEMSegment.h