CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTrackAccumulator.cc
Go to the documentation of this file.
1 #include "RecoTrackAccumulator.h"
4 
6  GeneralTrackInput_(conf.getParameter<edm::InputTag>("GeneralTrackInput")),
7  GeneralTrackOutput_(conf.getParameter<std::string>("GeneralTrackOutput"))
8 {
9 
12 }
13 
15 
16 }
17 
19 
20  NewTrackList_ = std::auto_ptr<reco::TrackCollection>(new reco::TrackCollection());
21 
22 }
23 
25 
26 
28  e.getByLabel(GeneralTrackInput_, tracks);
29 
30  if (tracks.isValid()) {
31  for (auto const& track : *tracks) {
32  NewTrackList_->push_back(track);
33  }
34  }
35 
36 }
37 
39 
40  if (e.bunchCrossing()==0) {
42  e.getByLabel(GeneralTrackInput_, tracks);
43 
44  if (tracks.isValid()) {
45  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
46  NewTrackList_->push_back(*track);
47  }
48  }
49  }
50 
51 }
52 
54 
56 
57 }
58 
59 
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::InputTag GeneralTrackInput_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
std::auto_ptr< reco::TrackCollection > NewTrackList_
RecoTrackAccumulator(const edm::ParameterSet &conf, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
tuple conf
Definition: dbtoconf.py:185
tuple tracks
Definition: testEve_cfg.py:39
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c)
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const