Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
TrackingTools
PatternTools
interface
TrackCollectionTokens.h
Go to the documentation of this file.
1
#ifndef TrackingToolsPatternToolsTrackCollectionTokens_H
2
#define TrackingToolsPatternToolsTrackCollectionTokens_H
3
4
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
5
#include "
FWCore/Utilities/interface/InputTag.h
"
6
7
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
8
#include "
TrackingTools/PatternTools/interface/Trajectory.h
"
9
#include "
TrackingTools/PatternTools/interface/TrajTrackAssociation.h
"
10
11
#include "
FWCore/Framework/interface/Event.h
"
12
13
14
struct
TrackCollectionTokens
{
15
TrackCollectionTokens
(
edm::InputTag
const
&
tag
,
edm::ConsumesCollector
&& iC) :
16
hTrackToken_
( iC.consumes<
reco
::
TrackCollection
>( tag ) ),
17
hTrajToken_
( iC.mayConsume< std::vector<
Trajectory
> >( tag ) ),
18
hTTAssToken_
( iC.mayConsume<
TrajTrackAssociationCollection
>( tag ) ){}
19
21
edm::EDGetTokenT<reco::TrackCollection>
hTrackToken_
;
22
edm::EDGetTokenT< std::vector<Trajectory>
>
hTrajToken_
;
23
edm::EDGetTokenT< TrajTrackAssociationCollection >
hTTAssToken_
;
24
25
26
reco::TrackCollection
const
&
tracks
(
edm::Event
& evt)
const
{
27
edm::Handle<reco::TrackCollection>
h
;
28
evt.
getByToken
(
hTrackToken_
, h);
29
return
*
h
;
30
}
31
32
std::vector<Trajectory>
const
&
trajectories
(
edm::Event
& evt)
const
{
33
edm::Handle<std::vector<Trajectory>
>
h
;
34
evt.
getByToken
(
hTrajToken_
, h );
35
return
*
h
;
36
}
37
38
39
};
40
41
42
#endif
43
Trajectory.h
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:464
Event.h
edm::Handle< reco::TrackCollection >
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition:
TrackFwd.h:14
TrackCollectionTokens::hTTAssToken_
edm::EDGetTokenT< TrajTrackAssociationCollection > hTTAssToken_
Definition:
TrackCollectionTokens.h:23
TrackFwd.h
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:106
edm::EDGetTokenT< reco::TrackCollection >
Trajectory
Definition:
Trajectory.h:38
GlobalPosition_Frontier_DevDB_cff.tag
tuple tag
Definition:
GlobalPosition_Frontier_DevDB_cff.py:11
TrackCollectionTokens::hTrackToken_
edm::EDGetTokenT< reco::TrackCollection > hTrackToken_
source collection label
Definition:
TrackCollectionTokens.h:21
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
TrackCollectionTokens::trajectories
std::vector< Trajectory > const & trajectories(edm::Event &evt) const
Definition:
TrackCollectionTokens.h:32
TrackCollectionTokens::tracks
reco::TrackCollection const & tracks(edm::Event &evt) const
Definition:
TrackCollectionTokens.h:26
TrackCollectionTokens::hTrajToken_
edm::EDGetTokenT< std::vector< Trajectory > > hTrajToken_
Definition:
TrackCollectionTokens.h:22
TrajTrackAssociation.h
edm::InputTag
Definition:
InputTag.h:18
InputTag.h
TrackCollectionTokens
Definition:
TrackCollectionTokens.h:14
edm::Event
Definition:
Event.h:64
ConsumesCollector.h
TrackCollectionTokens::TrackCollectionTokens
TrackCollectionTokens(edm::InputTag const &tag, edm::ConsumesCollector &&iC)
Definition:
TrackCollectionTokens.h:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:38
Generated for CMSSW Reference Manual by
1.8.5