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 
41 void MuonSeedMerger::produce(Event& event, const EventSetup& eventSetup) {
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 }
MuonSeedMerger::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: MuonSeedMerger.cc:41
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
MuonSeedMerger.h
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
edm
HLT enums.
Definition: AlignableModifier.h:19
MuonSeedMerger::MuonSeedMerger
MuonSeedMerger(const edm::ParameterSet &)
Constructor.
Definition: MuonSeedMerger.cc:21
edm::Handle
Definition: AssociativeIterator.h:50
fileCollector.seed
seed
Definition: fileCollector.py:127
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:230
edm::View
Definition: CaloClusterFwd.h:14
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
edm::EventSetup
Definition: EventSetup.h:57
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
MuonSeedMerger::~MuonSeedMerger
~MuonSeedMerger() override
Destructor.
Definition: MuonSeedMerger.cc:39
label
const char * label
Definition: PFTauDecayModeTools.cc:11
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40