CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentMuonSelectorModule.cc
Go to the documentation of this file.
1 
19 
20 // the following include is necessary to clone all track branches
21 // including recoTrackExtras and TrackingRecHitsOwned.
22 // if you remove it the code will compile, but the cloned
23 // tracks have only the recoMuons branch!
24 
26 
27  typedef std::vector<const reco::Muon*> container;
28  typedef container::const_iterator const_iterator;
30 
32  theSelector(cfg) {}
33 
34  const_iterator begin() const { return selected_.begin(); }
35  const_iterator end() const { return selected_.end(); }
36  size_t size() const { return selected_.size(); }
37 
38  void select( const edm::Handle<reco::MuonCollection> & c, const edm::Event & evt, const edm::EventSetup &/* dummy*/)
39  {
40  all_.clear();
41  selected_.clear();
42  for (collection::const_iterator i = c.product()->begin(), iE = c.product()->end();
43  i != iE; ++i){
44  all_.push_back(& * i );
45  }
46  selected_ = theSelector.select(all_, evt); // might add dummy
47  }
48 
49 private:
52 };
53 
55 
57 
int i
Definition: DBlmapReader.cc:9
void select(const edm::Handle< reco::MuonCollection > &c, const edm::Event &evt, const edm::EventSetup &)
const_iterator end() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< const reco::Muon * > container
AlignmentMuonSelector theSelector
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
container::const_iterator const_iterator
MuonConfigSelector(const edm::ParameterSet &cfg)
const_iterator begin() const
reco::MuonCollection collection
T const * product() const
Definition: Handle.h:74
ObjectSelector< MuonConfigSelector > AlignmentMuonSelectorModule
Muons select(const Muons &muons, const edm::Event &evt) const
select muons