CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuonSeedMerger Class Reference

#include <MuonSeedMerger.h>

Inheritance diagram for MuonSeedMerger:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MuonSeedMerger (const edm::ParameterSet &)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
virtual ~MuonSeedMerger ()
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens
 
std::vector< edm::InputTagtheSeedCollectionLabels
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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.

Author
R. Bellan - CERN ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 22 of file MuonSeedMerger.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 22 of file MuonSeedMerger.cc.

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

22  {
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();
30  LogTrace(metname) << *label;
31 
32  for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin();
33  label != theSeedCollectionLabels.end(); ++label){
35  }
36 
37  produces<TrajectorySeedCollection>();
38 }
T getParameter(std::string const &) const
const std::string metname
std::vector< edm::InputTag > theSeedCollectionLabels
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens
#define LogTrace(id)
MuonSeedMerger::~MuonSeedMerger ( )
virtual

Destructor.

Definition at line 41 of file MuonSeedMerger.cc.

41 {}

Member Function Documentation

void MuonSeedMerger::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Definition at line 43 of file MuonSeedMerger.cc.

References mps_fire::i, LogTrace, metname, eostools::move(), convertSQLitetoXML_cfg::output, and SurveyInfoScenario_cff::seed.

43  {
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 }
const std::string metname
std::vector< edm::InputTag > theSeedCollectionLabels
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens
#define LogTrace(id)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > MuonSeedMerger::seedTokens
private

Definition at line 38 of file MuonSeedMerger.h.

std::vector<edm::InputTag> MuonSeedMerger::theSeedCollectionLabels
private

Definition at line 37 of file MuonSeedMerger.h.