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 
20 
21 // the following include is necessary to clone all track branches
22 // including recoTrackExtras and TrackingRecHitsOwned.
23 // if you remove it the code will compile, but the cloned
24 // tracks have only the recoMuons branch!
25 
27 
28  typedef std::vector<const reco::Muon*> container;
29  typedef container::const_iterator const_iterator;
31 
33  theSelector(cfg) {}
34 
35  const_iterator begin() const { return selected_.begin(); }
36  const_iterator end() const { return selected_.end(); }
37  size_t size() const { return selected_.size(); }
38 
39  void select( const edm::Handle<reco::MuonCollection> & c, const edm::Event & evt, const edm::EventSetup &/* dummy*/)
40  {
41  all_.clear();
42  selected_.clear();
43  for (collection::const_iterator i = c.product()->begin(), iE = c.product()->end();
44  i != iE; ++i){
45  all_.push_back(& * i );
46  }
47  selected_ = theSelector.select(all_, evt); // might add dummy
48  }
49 
50 private:
53 };
54 
56 
58 
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
const_iterator begin() const
T const * product() const
Definition: Handle.h:81
reco::MuonCollection collection
ObjectSelector< MuonConfigSelector > AlignmentMuonSelectorModule
Muons select(const Muons &muons, const edm::Event &evt) const
select muons
MuonConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)