CMS 3D CMS Logo

ProductRegistryHelper.cc

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------
00002   
00003 ----------------------------------------------------------------------*/
00004 
00005 #include "DataFormats/Provenance/interface/ModuleDescriptionRegistry.h"
00006 #include "FWCore/Framework/interface/ProductRegistryHelper.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     for (TypeLabelList::const_iterator p = iBegin; p != iEnd; ++p) {
00025       BranchDescription pdesc(p->branchType_,
00026                               iDesc.moduleLabel(),
00027                               iDesc.processName(),
00028                               p->typeID_.userClassName(),
00029                               p->typeID_.friendlyClassName(), 
00030                               p->productInstanceName_,
00031                               iDesc);
00032       if (!p->branchAlias_.empty()) pdesc.branchAliases().insert(p->branchAlias_);
00033       iReg.addProduct(pdesc, iIsListener);
00034       ModuleDescriptionRegistry::instance()->insertMapped(iDesc);
00035     }//for
00036   }
00037 }

Generated on Tue Jun 9 17:36:11 2009 for CMSSW by  doxygen 1.5.4