Public Member Functions | Private Member Functions | Private Attributes | List of all members
art::ProductRegistryHelper Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Core/ProductRegistryHelper.h"

Inheritance diagram for art::ProductRegistryHelper:
art::ProducerBase art::ProducingService art::ResultsProducer art::EDFilter art::EDProducer calib::AttenuationFit calib::MakeAttenuationProfiles calib::SumAttenuationProfiles cmf::CMFDecorrelator cmf::CombineResults cmf::ContourFromLibrary cmf::CovarianceMatrixFitter cmf::CovarianceMatrixMaker cmf::FitFeldmanCousinsPoint cmf::PredictionLibraryMaker cmf::RandomUniverses fnex::ContourMaker fnex::CovarianceMatrixFitter fnex::CovarianceMatrixMaker fnex::FakePointResultMaker fnex::FitPoint fnex::PlotPoint fnex::ReadFitResults fnex::SensitivityPointsMaker fnex::StarPlot skim::POTSummary

Public Member Functions

void productList (ProductList *p)
 
void registerProducts (MasterProductRegistry &mpr, ProductDescriptions &productsToRegister, ModuleDescription const &md)
 
template<typename P , BranchType B = InEvent>
void produces (std::string const &instanceName={}, Persistable const persistable=Persistable::Yes)
 
template<typename P , BranchType B>
TypeLabel const & reconstitutes (std::string const &modLabel, std::string const &instanceName={})
 
template<BranchType B>
std::set< TypeLabel > const & expectedProducts () const
 
template<typename P , art::BranchType B>
art::TypeLabel const & reconstitutes (std::string const &emulatedModule, std::string const &instanceName)
 

Private Member Functions

TypeLabel const & insertOrThrow (BranchType const bt, TypeLabel const &tl)
 

Private Attributes

std::array< std::set< TypeLabel >, NumBranchTypestypeLabelList_
 
std::unique_ptr< ProductListproductList_
 

Detailed Description

Definition at line 81 of file ProductRegistryHelper.h.

Member Function Documentation

template<BranchType B>
std::set<TypeLabel> const& art::ProductRegistryHelper::expectedProducts ( ) const
inline

Definition at line 111 of file ProductRegistryHelper.h.

References typeLabelList_.

112  {
113  return typeLabelList_[B];
114  }
std::array< std::set< TypeLabel >, NumBranchTypes > typeLabelList_
TypeLabel const& art::ProductRegistryHelper::insertOrThrow ( BranchType const  bt,
TypeLabel const &  tl 
)
inlineprivate

Definition at line 118 of file ProductRegistryHelper.h.

References art::TypeLabel::friendlyClassName(), art::errors::LogicError, art::TypeLabel::productInstanceName(), fillBadChanDBTables::result, and typeLabelList_.

Referenced by produces(), and reconstitutes().

119  {
120  auto result = typeLabelList_[bt].insert(tl);
121  if (!result.second) {
122  throw Exception(errors::LogicError, "RegistrationFailure")
123  << "The module being constructed attempted to "
124  << "register conflicting products with:\n"
125  << "friendlyClassName: " << tl.friendlyClassName()
126  << " and instanceName: " << tl.productInstanceName() << ".\n";
127  }
128  return *result.first;
129  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::array< std::set< TypeLabel >, NumBranchTypes > typeLabelList_
template<typename P , art::BranchType B>
void art::ProductRegistryHelper::produces ( std::string const &  instanceName = {},
Persistable const  persistable = Persistable::Yes 
)
inline

Definition at line 141 of file ProductRegistryHelper.h.

References insertOrThrow(), art::No, P, art::detail::verifyFriendlyClassName(), and art::detail::verifyInstanceName().

Referenced by caf::CAFMaker::CAFMaker(), art::MixHelper::produces(), and productList().

143 {
144  verifyInstanceName(instanceName);
145  TypeID const productType{typeid(P)};
146  verifyFriendlyClassName(productType.friendlyClassName());
147  bool const isTransient = (persistable == Persistable::No);
149  B,
150  TypeLabel{productType, instanceName, SupportsView<P>::value, isTransient});
151 }
void verifyFriendlyClassName(std::string const &fcn)
#define P(a, b, c, d, e, x)
const XML_Char int const XML_Char * value
Definition: expat.h:331
TypeLabel const & insertOrThrow(BranchType const bt, TypeLabel const &tl)
void verifyInstanceName(std::string const &in)
void art::ProductRegistryHelper::productList ( ProductList p)
inline

Definition at line 86 of file ProductRegistryHelper.h.

References fetch_tb_beamline_files::md, produces(), productList_, reconstitutes(), registerProducts(), and art::Yes.

87  {
88  productList_.reset(p);
89  }
const char * p
Definition: xmltok.h:285
std::unique_ptr< ProductList > productList_
template<typename P , BranchType B>
TypeLabel const& art::ProductRegistryHelper::reconstitutes ( std::string const &  modLabel,
std::string const &  instanceName = {} 
)
template<typename P , art::BranchType B>
art::TypeLabel const& art::ProductRegistryHelper::reconstitutes ( std::string const &  emulatedModule,
std::string const &  instanceName 
)

Definition at line 155 of file ProductRegistryHelper.h.

References insertOrThrow(), P, art::detail::verifyFriendlyClassName(), and art::detail::verifyInstanceName().

157 {
158  verifyModuleLabel(emulatedModule);
159  verifyInstanceName(instanceName);
160  TypeID const productType{typeid(P)};
161  verifyFriendlyClassName(productType.friendlyClassName());
162  return insertOrThrow(
163  B,
164  TypeLabel{
165  productType, instanceName, SupportsView<P>::value, emulatedModule});
166 }
void verifyFriendlyClassName(std::string const &fcn)
#define P(a, b, c, d, e, x)
const XML_Char int const XML_Char * value
Definition: expat.h:331
TypeLabel const & insertOrThrow(BranchType const bt, TypeLabel const &tl)
void verifyInstanceName(std::string const &in)
void art::ProductRegistryHelper::registerProducts ( MasterProductRegistry mpr,
ProductDescriptions productsToRegister,
ModuleDescription const &  md 
)

Member Data Documentation

std::unique_ptr<ProductList> art::ProductRegistryHelper::productList_
private

Definition at line 136 of file ProductRegistryHelper.h.

Referenced by productList().

std::array<std::set<TypeLabel>, NumBranchTypes> art::ProductRegistryHelper::typeLabelList_
private

Definition at line 131 of file ProductRegistryHelper.h.

Referenced by expectedProducts(), and insertOrThrow().


The documentation for this class was generated from the following file: