CMS 3D CMS Logo

Public Member Functions | Private Attributes

MuonSeedMerger Class Reference

#include <MuonSeedMerger.h>

Inheritance diagram for MuonSeedMerger:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 MuonSeedMerger (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
virtual ~MuonSeedMerger ()
 Destructor.

Private Attributes

std::vector< edm::InputTagtheSeedCollectionLabels

Detailed Description

Module to merge two or more muon seed collections. Currently it does not contain any seed cleaner, so the number of ghosts seed can be high. This is still a preliminary implementation.

Date:
2008/10/17 22:36:09
Revision:
1.1
Author:
R. Bellan - CERN <riccardo.bellan@cern.ch>

Module to merge two or more muon seed collections. Currently it does not contain any seed cleaner, so the number of ghosts seed can be high. This is still a preliminary implementation.

Date:
2010/02/16 17:08:40
Revision:
1.2
Author:
R. Bellan - CERN <riccardo.bellan@cern.ch>

Definition at line 20 of file MuonSeedMerger.h.


Constructor & Destructor Documentation

MuonSeedMerger::MuonSeedMerger ( const edm::ParameterSet parameterSet)

Constructor.

Definition at line 28 of file MuonSeedMerger.cc.

References edm::ParameterSet::getParameter(), label, LogTrace, and metname.

                                                              {
  const string metname = "Muon|RecoMuon|MuonSeedMerger";  

  theSeedCollectionLabels = parameterSet.getParameter<vector<InputTag> >("SeedCollections");

  LogTrace(metname)<< "MuonSeedMerger will Merge the following seed collections:";
  for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin();
      label != theSeedCollectionLabels.end(); ++label)
    LogTrace(metname) << *label;
  

  produces<TrajectorySeedCollection>();
}
MuonSeedMerger::~MuonSeedMerger ( ) [virtual]

Destructor.

Definition at line 43 of file MuonSeedMerger.cc.

{}

Member Function Documentation

void MuonSeedMerger::produce ( edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 45 of file MuonSeedMerger.cc.

References label, LogTrace, metname, and convertSQLitetoXML_cfg::output.

                                                                      {
  
  const string metname = "Muon|RecoMuon|MuonSeedMerger";  

  std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection());
  
  Handle<View<TrajectorySeed> > seeds; 
  
  for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin();
      label != theSeedCollectionLabels.end(); ++label){ 
    event.getByLabel(*label,seeds);
    LogTrace(metname) << *label << " has "<< seeds->size() <<" seeds";
    for(View<TrajectorySeed>::const_iterator seed = seeds->begin(); seed != seeds->end(); ++seed)
      output->push_back(*seed);
  }
  
  event.put(output);
}

Member Data Documentation

Definition at line 35 of file MuonSeedMerger.h.