test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MaskedMeasurementTrackerEventProducer.cc
Go to the documentation of this file.
7 
9 public:
12 private:
13  void produce(edm::Event&, const edm::EventSetup&) override;
14 
17 
19 
22 };
23 
24 
26  src_(consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("src")))
27 {
28  edm::InputTag clustersToSkip = iConfig.getParameter<edm::InputTag>("clustersToSkip");
29  maskStrips_ = consumes<StripMask>(clustersToSkip);
30  maskPixels_ = consumes<PixelMask>(clustersToSkip);
31 
32  produces<MeasurementTrackerEvent>();
33 }
34 
35 void
37 {
39  iEvent.getByToken(src_, mte);
40 
41  // prepare output
42  std::auto_ptr<MeasurementTrackerEvent> out;
43 
44  edm::Handle<PixelMask> maskPixels;
45  iEvent.getByToken(maskPixels_, maskPixels);
46 
47  edm::Handle<StripMask> maskStrips;
48  iEvent.getByToken(maskStrips_, maskStrips);
49  out.reset(new MeasurementTrackerEvent(*mte, *maskStrips, *maskPixels));
50 
51  // put into event
52  iEvent.put(out);
53 }
54 
T getParameter(std::string const &) const
#define dso_hidden
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< MeasurementTrackerEvent > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
virtual void produce(Event &, EventSetup const &)=0
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MaskedMeasurementTrackerEventProducer(const edm::ParameterSet &iConfig)
int iEvent
Definition: GenABIO.cc:230
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > PixelMask
edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > StripMask