CMS 3D CMS Logo

TrackMergeremb.h
Go to the documentation of this file.
1 
12 #ifndef TauAnalysis_MCEmbeddingTools_TrackMergeremb_H
13 #define TauAnalysis_MCEmbeddingTools_TrackMergeremb_H
14 
20 
23 
28 
29 #include <string>
30 #include <iostream>
31 #include <map>
32 
33 template <typename T1>
35 public:
36  explicit TrackMergeremb(const edm::ParameterSet&);
37  ~TrackMergeremb() override;
38 
39 private:
40  void produce(edm::Event&, const edm::EventSetup&) override;
41 
42  typedef T1 TrackCollectionemb;
43 
45  void willconsume(const edm::ParameterSet& iConfig);
47 
48  std::map<std::string, std::vector<edm::EDGetTokenT<TrackCollectionemb> > > inputs_;
49  std::map<std::string, std::vector<edm::EDGetTokenT<edm::ValueMap<reco::MuonQuality> > > > inputs_qual_;
50 
51  //typedef edm::ValueMap<reco::TrackRef> TrackToTrackMapnew;
53 
56 
59 };
60 
61 template <typename T1>
63  std::string alias(iConfig.getParameter<std::string>("@module_label"));
64  std::vector<edm::InputTag> inCollections = iConfig.getParameter<std::vector<edm::InputTag> >("mergCollections");
65  for (auto inCollection : inCollections) {
66  inputs_[inCollection.instance()].push_back(consumes<TrackCollectionemb>(inCollection));
67  }
68  willconsume(iConfig);
69  for (auto toproduce : inputs_) {
70  willproduce(toproduce.first, alias);
71  }
72 }
73 
74 template <typename T1>
76  // nothing to be done yet...
77 }
78 
79 template <typename T1>
81  for (auto input_ : inputs_) {
82  merg_and_put(iEvent, input_.first, input_.second);
83 
84  } // end instance
85 }
86 #endif
TrackMergeremb::inputs_fixmurefs_
edm::EDGetTokenT< reco::MuonToMuonMap > inputs_fixmurefs_
Definition: TrackMergeremb.h:57
TrackMergeremb::TrackMergeremb
TrackMergeremb(const edm::ParameterSet &)
Definition: TrackMergeremb.h:62
Handle.h
TrackMergeremb::willconsume
void willconsume(const edm::ParameterSet &iConfig)
Definition: TrackMergeremb.cc:55
edm::EDGetTokenT
Definition: EDGetToken.h:33
TrackMergeremb::inputs_
std::map< std::string, std::vector< edm::EDGetTokenT< TrackCollectionemb > > > inputs_
Definition: TrackMergeremb.h:48
TrackMergeremb::inputs_fixtrackrefs_
edm::EDGetTokenT< TrackToTrackMapnew > inputs_fixtrackrefs_
Definition: TrackMergeremb.h:54
EDProducer.h
TrackMergeremb::~TrackMergeremb
~TrackMergeremb() override
Definition: TrackMergeremb.h:75
TrackMergeremb::inputs_fixmucol_
edm::EDGetTokenT< reco::MuonCollection > inputs_fixmucol_
Definition: TrackMergeremb.h:58
MakerMacros.h
Track.h
TrackFwd.h
TrackMergeremb::inputs_qual_
std::map< std::string, std::vector< edm::EDGetTokenT< edm::ValueMap< reco::MuonQuality > > > > inputs_qual_
Definition: TrackMergeremb.h:49
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackMergeremb::willproduce
void willproduce(std::string instance, std::string alias)
Definition: TrackMergeremb.cc:50
edm::ParameterSet
Definition: ParameterSet.h:47
TrackMergeremb::TrackToTrackMapnew
edm::ValueMap< reco::TrackRefVector > TrackToTrackMapnew
Definition: TrackMergeremb.h:52
Event.h
TrackMergeremb::inputs_fixtrackcol_
edm::EDGetTokenT< reco::TrackCollection > inputs_fixtrackcol_
Definition: TrackMergeremb.h:55
iEvent
int iEvent
Definition: GenABIO.cc:224
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
MuonQuality.h
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
ValueMap.h
TrackMergeremb
Definition: TrackMergeremb.h:34
TrackMergeremb::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: TrackMergeremb.h:80
edm::ValueMap
Definition: ValueMap.h:107
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
TrackMergeremb::TrackCollectionemb
T1 TrackCollectionemb
Definition: TrackMergeremb.h:42
MuonToMuonMap.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet.h
edm::Event
Definition: Event.h:73
TrackToTrackMap.h
TrackMergeremb::merg_and_put
void merg_and_put(edm::Event &, std::string, std::vector< edm::EDGetTokenT< TrackCollectionemb > > &)
Definition: TrackMergeremb.cc:58