test
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 
6 
7 // the following include is necessary to clone all track branches
8 // including recoTrackExtras and TrackingRecHitsOwned.
9 // if you remove it the code will compile, but the cloned
10 // tracks have only the recoTracks branch!
12 
14 
15  typedef std::vector<const reco::Track*> container;
16  typedef container::const_iterator const_iterator;
18 
20  CSCBeamHaloConfigSelector(cfg, iC) {}
22  theSelector(cfg, iC) {}
23 
24  const_iterator begin() const { return selected_.begin(); }
25  const_iterator end() const { return selected_.end(); }
26  size_t size() const { return selected_.size(); }
27 
29  const edm::EventSetup &/*dummy*/)
30  {
31  all_.clear();
32  selected_.clear();
33  for (collection::const_iterator i = c.product()->begin(), iE = c.product()->end();
34  i != iE; ++i){
35  all_.push_back(& * i );
36  }
37  selected_ = theSelector.select(all_, evt); // might add dummy...
38  }
39 
40 private:
43 };
44 
46 
int i
Definition: DBlmapReader.cc:9
CSCBeamHaloConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
tuple cfg
Definition: looper.py:293
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
AlignmentCSCBeamHaloSelector theSelector
ObjectSelectorStream< CSCBeamHaloConfigSelector > AlignmentCSCBeamHaloSelectorModule
CSCBeamHaloConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
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 &)
T const * product() const
Definition: Handle.h:81