CMS 3D CMS Logo

MuonSeedMerger.cc
Go to the documentation of this file.
2 
12 // Framework
17 
18 
19 using namespace std;
20 using namespace edm;
21 
23  const string metname = "Muon|RecoMuon|MuonSeedMerger";
24 
25  theSeedCollectionLabels = parameterSet.getParameter<vector<InputTag> >("SeedCollections");
26 
27  LogTrace(metname)<< "MuonSeedMerger will Merge the following seed collections:";
28  for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin();
29  label != theSeedCollectionLabels.end(); ++label)
30  LogTrace(metname) << *label;
31 
32  for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin();
33  label != theSeedCollectionLabels.end(); ++label){
34  seedTokens.push_back(consumes<edm::View<TrajectorySeed> >(*label));
35  }
36 
37  produces<TrajectorySeedCollection>();
38 }
39 
40 
42 
43 void MuonSeedMerger::produce(Event& event, const EventSetup& eventSetup){
44 
45  const string metname = "Muon|RecoMuon|MuonSeedMerger";
46 
47  auto output = std::make_unique<TrajectorySeedCollection>();
48 
50 
51  for(unsigned int i=0;i<theSeedCollectionLabels.size();++i) {
52  event.getByToken(seedTokens.at(i),seeds);
53 
54  LogTrace(metname) << theSeedCollectionLabels.at(i) << " has "<< seeds->size() <<" seeds";
55  for(View<TrajectorySeed>::const_iterator seed = seeds->begin(); seed != seeds->end(); ++seed)
56  output->push_back(*seed);
57  }
58 
59  event.put(std::move(output));
60 }
T getParameter(std::string const &) const
const std::string metname
MuonSeedMerger(const edm::ParameterSet &)
Constructor.
void produce(edm::Event &, const edm::EventSetup &) override
#define LogTrace(id)
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
~MuonSeedMerger() override
Destructor.
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
def move(src, dest)
Definition: eostools.py:510
Definition: event.py:1