CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackCollectionTokens.h
Go to the documentation of this file.
1 #ifndef TrackingToolsPatternToolsTrackCollectionTokens_H
2 #define TrackingToolsPatternToolsTrackCollectionTokens_H
3 
6 
10 
12 
13 
16  hTrackToken_( iC.consumes<reco::TrackCollection>( tag ) ),
17  hTrajToken_( iC.mayConsume< std::vector<Trajectory> >( tag ) ),
18  hTTAssToken_( iC.mayConsume< TrajTrackAssociationCollection >( tag ) ){}
19 
24 
25 
26  reco::TrackCollection const & tracks(edm::Event& evt) const {
28  evt.getByToken( hTrackToken_, h);
29  return *h;
30  }
31 
32  std::vector<Trajectory> const & trajectories(edm::Event& evt) const {
34  evt.getByToken( hTrajToken_, h );
35  return *h;
36  }
37 
38 
39 };
40 
41 
42 #endif
43 
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::EDGetTokenT< TrajTrackAssociationCollection > hTTAssToken_
edm::EDGetTokenT< reco::TrackCollection > hTrackToken_
source collection label
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
std::vector< Trajectory > const & trajectories(edm::Event &evt) const
reco::TrackCollection const & tracks(edm::Event &evt) const
edm::EDGetTokenT< std::vector< Trajectory > > hTrajToken_
TrackCollectionTokens(edm::InputTag const &tag, edm::ConsumesCollector &&iC)