test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  std::auto_ptr<TrajectorySeedCollection> output(new 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(output);
60 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
const std::string metname
MuonSeedMerger(const edm::ParameterSet &)
Constructor.
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< TrajectorySeed > TrajectorySeedCollection
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define LogTrace(id)
virtual ~MuonSeedMerger()
Destructor.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:85
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11