CMS 3D CMS Logo

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