CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentCSCBeamHaloSelectorModule.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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
ObjectSelector< CSCBeamHaloConfigSelector > AlignmentCSCBeamHaloSelectorModule
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
AlignmentCSCBeamHaloSelector theSelector
Tracks select(const Tracks &tracks, const edm::Event &iEvent) const
select tracks
std::vector< const reco::Track * > container
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
CSCBeamHaloConfigSelector(const edm::ParameterSet &cfg)
T const * product() const
Definition: Handle.h:74