CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Framework/src/ProductRegistryHelper.cc

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 
00011 namespace edm {
00012   ProductRegistryHelper::~ProductRegistryHelper() { }
00013 
00014   ProductRegistryHelper::TypeLabelList & ProductRegistryHelper::typeLabelList() {
00015     return typeLabelList_;
00016   }
00017 
00018   void
00019   ProductRegistryHelper::addToRegistry(TypeLabelList::const_iterator const& iBegin,
00020                                        TypeLabelList::const_iterator const& iEnd,
00021                                        ModuleDescription const& iDesc,
00022                                        ProductRegistry& iReg,
00023                                        bool iIsListener) {
00024     std::string const prefix("LCGReflex/");
00025     for (TypeLabelList::const_iterator p = iBegin; p != iEnd; ++p) {
00026       edmplugin::PluginCapabilities::get()->tryToLoad(prefix + p->typeID_.userClassName());
00027       BranchDescription pdesc(p->branchType_,
00028                               iDesc.moduleLabel(),
00029                               iDesc.processName(),
00030                               p->typeID_.userClassName(),
00031                               p->typeID_.friendlyClassName(),
00032                               p->productInstanceName_,
00033                               iDesc,
00034                               p->typeID_);
00035       if (!p->branchAlias_.empty()) pdesc.branchAliases().insert(p->branchAlias_);
00036       iReg.addProduct(pdesc, iIsListener);
00037     }//for
00038   }
00039 }