CMS 3D CMS Logo

SeedingLayersEDProducer.cc
Go to the documentation of this file.
4 
5 
11 
12 
14 public:
16  ~SeedingLayersEDProducer() override;
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  auto prod = std::make_unique<SeedingLayerSetsHits>(builder_.numberOfLayersInSet(),
41  std::vector<unsigned int> idx; ctfseeding::SeedingLayer::Hits hits;
42  builder_.hits(iEvent, iSetup,idx,hits);
43  hits.shrink_to_fit();
44  prod->swapHits(idx,hits);
45  //prod->print();
46 
47  iEvent.put(std::move(prod));
48 }
49 
#define dso_hidden
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:127
virtual void produce(Event &, EventSetup const &)=0
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
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:230
const std::vector< const DetLayer * > & layerDets() const
unsigned short numberOfLayersInSet() const
void updateEventSetup(const edm::EventSetup &es)
SeedingLayersEDProducer(const edm::ParameterSet &iConfig)
SeedingLayerSetsBuilder builder_
void hits(const edm::Event &ev, const edm::EventSetup &es, std::vector< unsigned int > &indices, ctfseeding::SeedingLayer::Hits &hits) const
const std::vector< LayerSetIndex > & layerSetIndices() const
def move(src, dest)
Definition: eostools.py:510