CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SeedingLayersEDProducer.cc
Go to the documentation of this file.
2 
9 
12 
14 public:
17 
18  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
19 
20 private:
22 };
23 
25  builder_(iConfig, consumesCollector())
26 {
27  produces<SeedingLayerSetsHits>();
28 }
30 
32  if(builder_.check(iSetup)) {
33  builder_.updateEventSetup(iSetup);
34  }
35 
36  // Get hits
37  std::auto_ptr<SeedingLayerSetsHits> prod(new SeedingLayerSetsHits(builder_.numberOfLayersInSet(),
40  builder_.layerDets()));
41  std::pair<std::vector<unsigned int>, ctfseeding::SeedingLayer::Hits> idxHits = builder_.hits(iEvent, iSetup);
42  prod->swapHits(idxHits.first, idxHits.second);
43  //prod->print();
44 
45  iEvent.put(prod);
46 }
47 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool check(const edm::EventSetup &es)
const std::vector< std::string > & layerNames() const
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
int iEvent
Definition: GenABIO.cc:243
const std::vector< const DetLayer * > & layerDets() const
unsigned short numberOfLayersInSet() const
void updateEventSetup(const edm::EventSetup &es)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
SeedingLayersEDProducer(const edm::ParameterSet &iConfig)
SeedingLayerSetsBuilder builder_
std::vector< TransientTrackingRecHit::ConstRecHitPointer > Hits
Definition: SeedingLayer.h:22
std::pair< std::vector< unsigned int >, ctfseeding::SeedingLayer::Hits > hits(const edm::Event &ev, const edm::EventSetup &es) const
const std::vector< LayerSetIndex > & layerSetIndices() const