CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

edm::ProductRegistryHelper Class Reference

#include <ProductRegistryHelper.h>

Inheritance diagram for edm::ProductRegistryHelper:
edm::InputSource edm::ProducerBase DQMRootSource edm::DaqSource edm::EDInputSource edm::ProducerSourceBase edm::RawInputSource edm::EDFilter edm::EDProducer edm::one::EDFilterBase edm::one::EDProducerBase

List of all members.

Classes

struct  TypeLabelItem

Public Types

typedef std::list< TypeLabelItemTypeLabelList

Public Member Functions

template<class ProductType >
TypeLabelItem const & produces ()
 declare what type of product will make and with which optional label
template<BranchType B>
TypeLabelItem const & produces (const TypeID &id, std::string const &instanceName=std::string())
template<class ProductType >
TypeLabelItem const & produces (std::string const &instanceName)
template<typename ProductType , BranchType B>
TypeLabelItem const & produces (std::string const &instanceName)
TypeLabelItem const & produces (const TypeID &id, std::string const &instanceName=std::string())
template<typename ProductType , BranchType B>
TypeLabelItem const & produces ()
 ProductRegistryHelper ()
TypeLabelListtypeLabelList ()
 used by the fwk to register the list of products of this module
 ~ProductRegistryHelper ()

Static Public Member Functions

static void addToRegistry (TypeLabelList::const_iterator const &iBegin, TypeLabelList::const_iterator const &iEnd, ModuleDescription const &iDesc, ProductRegistry &iReg, bool iIsListener=false)

Private Attributes

TypeLabelList typeLabelList_

Detailed Description

Definition at line 19 of file ProductRegistryHelper.h.


Member Typedef Documentation

Reimplemented in edm::InputSource, and edm::ProducerBase.

Definition at line 38 of file ProductRegistryHelper.h.


Constructor & Destructor Documentation

edm::ProductRegistryHelper::ProductRegistryHelper ( ) [inline]

Definition at line 22 of file ProductRegistryHelper.h.

edm::ProductRegistryHelper::~ProductRegistryHelper ( )

Definition at line 14 of file ProductRegistryHelper.cc.

{ }

Member Function Documentation

void edm::ProductRegistryHelper::addToRegistry ( TypeLabelList::const_iterator const &  iBegin,
TypeLabelList::const_iterator const &  iEnd,
ModuleDescription const &  iDesc,
ProductRegistry iReg,
bool  iIsListener = false 
) [static]

Definition at line 21 of file ProductRegistryHelper.cc.

References edm::ProductRegistry::addProduct(), edm::BranchDescription::branchAliases(), edm::dictionaryPlugInPrefix(), reco::get(), edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), AlCaHLTBitMon_ParallelJobs::p, edm::ModuleDescription::parameterSetID(), prof2calltree::prefix, edm::ModuleDescription::processName(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::ProducerBase::registerProducts(), and edm::InputSource::registerProducts().

                                                         {
    std::string const& prefix = dictionaryPlugInPrefix();
    for(TypeLabelList::const_iterator p = iBegin; p != iEnd; ++p) {
      TypeWithDict type(p->typeID_.typeInfo());
      if(!type.hasDictionary()) {
        //attempt to load
        edmplugin::PluginCapabilities::get()->tryToLoad(prefix + p->typeID_.userClassName());
      }
      BranchDescription pdesc(p->branchType_,
                              iDesc.moduleLabel(),
                              iDesc.processName(),
                              p->typeID_.userClassName(),
                              p->typeID_.friendlyClassName(),
                              p->productInstanceName_,
                              iDesc.moduleName(),
                              iDesc.parameterSetID(),
                              type);
      if (!p->branchAlias_.empty()) pdesc.branchAliases().insert(p->branchAlias_);
      iReg.addProduct(pdesc, iIsListener);
    }//for
  }
template<class ProductType >
TypeLabelItem const& edm::ProductRegistryHelper::produces ( std::string const &  instanceName) [inline]

Definition at line 64 of file ProductRegistryHelper.h.

                                                                 {
      return produces<ProductType, InEvent>(instanceName);
    }
TypeLabelItem const& edm::ProductRegistryHelper::produces ( const TypeID id,
std::string const &  instanceName = std::string() 
) [inline]

Definition at line 80 of file ProductRegistryHelper.h.

                                                                                               {
       return produces<InEvent>(id,instanceName);
    }
template<typename ProductType , BranchType B>
TypeLabelItem const& edm::ProductRegistryHelper::produces ( std::string const &  instanceName) [inline]

Definition at line 74 of file ProductRegistryHelper.h.

                                                                 {
      TypeID tid(typeid(ProductType));
      return produces<B>(tid,instanceName);
    }
template<typename ProductType , BranchType B>
TypeLabelItem const& edm::ProductRegistryHelper::produces ( ) [inline]

Definition at line 69 of file ProductRegistryHelper.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

                                    {
      return produces<ProductType, B>(std::string());
    }
template<BranchType B>
TypeLabelItem const& edm::ProductRegistryHelper::produces ( const TypeID id,
std::string const &  instanceName = std::string() 
) [inline]

Definition at line 85 of file ProductRegistryHelper.h.

References typeLabelList_.

                                                                                               {
       typeLabelList_.emplace_back(B, id, instanceName);
       return *typeLabelList_.rbegin();
    }
template<class ProductType >
TypeLabelItem const& edm::ProductRegistryHelper::produces ( ) [inline]

declare what type of product will make and with which optional label

the statement

           produces<ProductType>("optlabel");

should be added to the producer ctor for every product

Definition at line 59 of file ProductRegistryHelper.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by GoodSeedProducer::GoodSeedProducer(), MuonProducer::MuonProducer(), and PFCandidateMixer::PFCandidateMixer().

                                    {
      return produces<ProductType, InEvent>(std::string());
    }
ProductRegistryHelper::TypeLabelList & edm::ProductRegistryHelper::typeLabelList ( )

used by the fwk to register the list of products of this module

Definition at line 16 of file ProductRegistryHelper.cc.

References typeLabelList_.

Referenced by edm::ProducerBase::registerProducts(), and edm::InputSource::registerProducts().

                                                                            {
    return typeLabelList_;
  }

Member Data Documentation

Definition at line 90 of file ProductRegistryHelper.h.

Referenced by produces(), and typeLabelList().