CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentCSCOverlapSelectorModule.cc
Go to the documentation of this file.
1 
5 
6 // the following include is necessary to clone all track branches
7 // including recoTrackExtras and TrackingRecHitsOwned.
8 // if you remove it the code will compile, but the cloned
9 // tracks have only the recoTracks branch!
11 
13 
14  typedef std::vector<const reco::Track*> container;
15  typedef container::const_iterator const_iterator;
17 
19  theSelector(cfg) {}
20 
21  const_iterator begin() const { return selected_.begin(); }
22  const_iterator end() const { return selected_.end(); }
23  size_t size() const { return selected_.size(); }
24 
26  const edm::EventSetup &/*dummy*/)
27  {
28  all_.clear();
29  selected_.clear();
30  for (collection::const_iterator i = c.product()->begin(), iE = c.product()->end();
31  i != iE; ++i){
32  all_.push_back(& * i );
33  }
34  selected_ = theSelector.select(all_, evt); // might add dummy...
35  }
36 
37 private:
40 };
41 
43 
int i
Definition: DBlmapReader.cc:9
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
ObjectSelector< CSCOverlapConfigSelector > AlignmentCSCOverlapSelectorModule
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
AlignmentCSCOverlapSelector theSelector
std::vector< const reco::Track * > container
T const * product() const
Definition: Handle.h:74
Tracks select(const Tracks &tracks, const edm::Event &iEvent) const
select tracks
CSCOverlapConfigSelector(const edm::ParameterSet &cfg)