CMS 3D CMS Logo

TrackingRegionEDProducerT.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkTrackingRegions_TrackingRegionEDProducerT_H
2 #define RecoTracker_TkTrackingRegions_TrackingRegionEDProducerT_H
3 
7 
10 
11 template <typename T_TrackingRegionProducer>
13 public:
14  // using OwnVector as vector<shared_ptr> and vector<unique_ptr> cause problems
15  // I can't get dictionary compiled with unique_ptr
16  // shared_ptr fails with runtime error "Class name 'TrackingRegionstdshared_ptrs' contains an underscore ('_'), which is illegal in the name of a product."
18 
19  TrackingRegionEDProducerT(const edm::ParameterSet& iConfig) : regionProducer_(iConfig, consumesCollector()) {
20  produces<ProductType>();
21  }
22 
23  ~TrackingRegionEDProducerT() override = default;
24 
25  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
27  }
28 
29  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override {
30  auto regions = regionProducer_.regions(iEvent, iSetup);
31  auto ret = std::make_unique<ProductType>();
32  ret->reserve(regions.size());
33  for (auto& regionPtr : regions) {
34  ret->push_back(regionPtr.release());
35  }
36 
37  iEvent.put(std::move(ret));
38  }
39 
40 private:
41  T_TrackingRegionProducer regionProducer_;
42 };
43 
44 #endif
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
TrackingRegionEDProducerT::~TrackingRegionEDProducerT
~TrackingRegionEDProducerT() override=default
EDProducer.h
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrackingRegionEDProducerT::TrackingRegionEDProducerT
TrackingRegionEDProducerT(const edm::ParameterSet &iConfig)
Definition: TrackingRegionEDProducerT.h:19
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
TrackingRegionEDProducerT::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: TrackingRegionEDProducerT.h:29
TrackingRegionEDProducerT
Definition: TrackingRegionEDProducerT.h:12
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
TrackingRegionEDProducerT::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TrackingRegionEDProducerT.h:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
ConsumesCollector.h
TrackingRegion.h
ParameterSet.h
OwnVector.h
edm::Event
Definition: Event.h:73
TrackingRegionEDProducerT::regionProducer_
T_TrackingRegionProducer regionProducer_
Definition: TrackingRegionEDProducerT.h:41
edm::OwnVector< TrackingRegion >