Go to the documentation of this file.00001
00002
00003
00004
00005 #include "FWCore/Framework/interface/ProductRegistryHelper.h"
00006 #include "FWCore/PluginManager/interface/PluginCapabilities.h"
00007 #include "DataFormats/Provenance/interface/ProductRegistry.h"
00008 #include "DataFormats/Provenance/interface/BranchDescription.h"
00009 #include "DataFormats/Provenance/interface/ModuleDescription.h"
00010 #include "FWCore/Utilities/interface/DictionaryTools.h"
00011 #include "FWCore/Utilities/interface/TypeWithDict.h"
00012
00013 namespace edm {
00014 ProductRegistryHelper::~ProductRegistryHelper() { }
00015
00016 ProductRegistryHelper::TypeLabelList & ProductRegistryHelper::typeLabelList() {
00017 return typeLabelList_;
00018 }
00019
00020 void
00021 ProductRegistryHelper::addToRegistry(TypeLabelList::const_iterator const& iBegin,
00022 TypeLabelList::const_iterator const& iEnd,
00023 ModuleDescription const& iDesc,
00024 ProductRegistry& iReg,
00025 bool iIsListener) {
00026 std::string const& prefix = dictionaryPlugInPrefix();
00027 for(TypeLabelList::const_iterator p = iBegin; p != iEnd; ++p) {
00028 TypeWithDict type(p->typeID_.typeInfo());
00029 if(!type.hasDictionary()) {
00030
00031 edmplugin::PluginCapabilities::get()->tryToLoad(prefix + p->typeID_.userClassName());
00032 }
00033 BranchDescription pdesc(p->branchType_,
00034 iDesc.moduleLabel(),
00035 iDesc.processName(),
00036 p->typeID_.userClassName(),
00037 p->typeID_.friendlyClassName(),
00038 p->productInstanceName_,
00039 iDesc.moduleName(),
00040 iDesc.parameterSetID(),
00041 type);
00042 if (!p->branchAlias_.empty()) pdesc.branchAliases().insert(p->branchAlias_);
00043 iReg.addProduct(pdesc, iIsListener);
00044 }
00045 }
00046 }