CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
RecoTrackAccumulator Class Reference

#include <RecoTrackAccumulator.h>

Inheritance diagram for RecoTrackAccumulator:
DigiAccumulatorMixMod

Public Member Functions

virtual void accumulate (edm::Event const &e, edm::EventSetup const &c)
 
virtual void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c)
 
virtual void finalizeEvent (edm::Event &e, edm::EventSetup const &c)
 
virtual void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
 RecoTrackAccumulator (const edm::ParameterSet &conf, edm::EDProducer &mixMod)
 
virtual ~RecoTrackAccumulator ()
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual ~DigiAccumulatorMixMod ()
 

Private Attributes

edm::InputTag GeneralTrackInput_
 
std::string GeneralTrackOutput_
 
std::auto_ptr
< reco::TrackCollection
NewTrackList_
 

Detailed Description

RecoTrackAccumulator accumulates generalTracks from the hard and the pileup events

Author
Andrea Giammanco
Version
Mar 11 2013

Definition at line 40 of file RecoTrackAccumulator.h.

Constructor & Destructor Documentation

RecoTrackAccumulator::RecoTrackAccumulator ( const edm::ParameterSet conf,
edm::EDProducer mixMod 
)
explicit

Definition at line 4 of file RecoTrackAccumulator.cc.

References GeneralTrackInput_, GeneralTrackOutput_, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

4  {
5 
6  GeneralTrackInput_ = conf.getParameter<edm::InputTag>("GeneralTrackInput");
7  GeneralTrackOutput_ = conf.getParameter<std::string>("GeneralTrackOutput");
8 
10 }
T getParameter(std::string const &) const
edm::InputTag GeneralTrackInput_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
RecoTrackAccumulator::~RecoTrackAccumulator ( )
virtual

Definition at line 12 of file RecoTrackAccumulator.cc.

12  {
13 
14 }

Member Function Documentation

void RecoTrackAccumulator::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 22 of file RecoTrackAccumulator.cc.

References GeneralTrackInput_, edm::Event::getByLabel(), edm::HandleBase::isValid(), NewTrackList_, and testEve_cfg::tracks.

22  {
23 
24 
26  e.getByLabel(GeneralTrackInput_, tracks);
27 
28  if (tracks.isValid()) {
29  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
30  NewTrackList_->push_back(*track);
31  }
32  }
33 
34 }
edm::InputTag GeneralTrackInput_
std::auto_ptr< reco::TrackCollection > NewTrackList_
bool isValid() const
Definition: HandleBase.h:76
tuple tracks
Definition: testEve_cfg.py:39
void RecoTrackAccumulator::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 36 of file RecoTrackAccumulator.cc.

References GeneralTrackInput_, PileUpEventPrincipal::getByLabel(), edm::HandleBase::isValid(), NewTrackList_, and testEve_cfg::tracks.

36  {
37 
38 
40  e.getByLabel(GeneralTrackInput_, tracks);
41 
42  if (tracks.isValid()) {
43  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
44  NewTrackList_->push_back(*track);
45  }
46  }
47 
48 }
edm::InputTag GeneralTrackInput_
std::auto_ptr< reco::TrackCollection > NewTrackList_
bool isValid() const
Definition: HandleBase.h:76
tuple tracks
Definition: testEve_cfg.py:39
void RecoTrackAccumulator::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 50 of file RecoTrackAccumulator.cc.

References GeneralTrackOutput_, NewTrackList_, and edm::Event::put().

50  {
51 
53 
54 }
std::auto_ptr< reco::TrackCollection > NewTrackList_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
void RecoTrackAccumulator::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
virtual

Implements DigiAccumulatorMixMod.

Definition at line 16 of file RecoTrackAccumulator.cc.

References NewTrackList_.

16  {
17 
18  NewTrackList_ = std::auto_ptr<reco::TrackCollection>(new reco::TrackCollection());
19 
20 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
std::auto_ptr< reco::TrackCollection > NewTrackList_

Member Data Documentation

edm::InputTag RecoTrackAccumulator::GeneralTrackInput_
private

Definition at line 53 of file RecoTrackAccumulator.h.

Referenced by accumulate(), and RecoTrackAccumulator().

std::string RecoTrackAccumulator::GeneralTrackOutput_
private

Definition at line 54 of file RecoTrackAccumulator.h.

Referenced by finalizeEvent(), and RecoTrackAccumulator().

std::auto_ptr<reco::TrackCollection> RecoTrackAccumulator::NewTrackList_
private

Definition at line 52 of file RecoTrackAccumulator.h.

Referenced by accumulate(), finalizeEvent(), and initializeEvent().