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::ConfigurableInputSource edm::DaqSource edm::EDInputSource edm::RawInputSource edm::StreamerInputSource edm::EDFilter edm::EDProducer

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 22 of file ProductRegistryHelper.h.


Member Typedef Documentation

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

Definition at line 41 of file ProductRegistryHelper.h.


Constructor & Destructor Documentation

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

Definition at line 25 of file ProductRegistryHelper.h.

edm::ProductRegistryHelper::~ProductRegistryHelper ( )

Definition at line 12 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 19 of file ProductRegistryHelper.cc.

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

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

                                                         {
    std::string const prefix("LCGReflex/");
    Reflex::Type null;
    for(TypeLabelList::const_iterator p = iBegin; p != iEnd; ++p) {
      if(null == Reflex::Type::ByName(p->typeID_.userClassName()) ) {
        //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(),
                              p->typeID_);
      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 67 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 83 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 77 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 72 of file ProductRegistryHelper.h.

                                    {
      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 88 of file ProductRegistryHelper.h.

References typeLabelList_.

                                                                                               {
       TypeLabelItem tli(B, id, instanceName);
       typeLabelList_.push_back(tli);
       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 62 of file ProductRegistryHelper.h.

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

                                    {
      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 14 of file ProductRegistryHelper.cc.

References typeLabelList_.

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

                                                                            {
    return typeLabelList_;
  }

Member Data Documentation

Definition at line 94 of file ProductRegistryHelper.h.

Referenced by produces(), and typeLabelList().