LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::PtrMaker< T > Class Template Reference

#include "PtrMaker.h"

Public Member Functions

template<typename DataLevel , typename Module >
 PtrMaker (DataLevel const &evt, Module const &module, std::string const &instance={})
 
template<typename DataLevel >
 PtrMaker (DataLevel const &evt, ProductID prodId)
 
Ptr< T > operator() (std::size_t index) const
 

Static Public Member Functions

template<typename Container , typename DataLevel , typename Module >
static PtrMaker< T > create (DataLevel const &E, Module const &module, std::string const &instance={})
 

Private Attributes

ProductID const prodId_
 
EDProductGetter const * prodGetter_
 

Detailed Description

template<typename T>
class art::PtrMaker< T >

Definition at line 62 of file PtrMaker.h.

Constructor & Destructor Documentation

template<typename T >
template<typename DataLevel , typename Module >
art::PtrMaker< T >::PtrMaker ( DataLevel const &  evt,
Module const &  module,
std::string const &  instance = {} 
)

Definition at line 105 of file PtrMaker.h.

References tca::evt, and instance.

108  : PtrMaker{evt, module.template getProductID<std::vector<T>>(instance)}
109  {}
PtrMaker(DataLevel const &evt, Module const &module, std::string const &instance={})
Definition: PtrMaker.h:105
const std::string instance
TCEvent evt
Definition: DataStructs.cxx:5
template<typename T >
template<typename DataLevel >
art::PtrMaker< T >::PtrMaker ( DataLevel const &  evt,
ProductID  prodId 
)

Definition at line 113 of file PtrMaker.h.

References tca::evt, and art::PtrMaker< T >::prodGetter_.

114  : prodId_{pid}, prodGetter_{evt.productGetter(pid)}
115  {}
ProductID const prodId_
Definition: PtrMaker.h:88
TCEvent evt
Definition: DataStructs.cxx:5
EDProductGetter const * prodGetter_
Definition: PtrMaker.h:89

Member Function Documentation

template<typename T >
template<typename Container , typename DataLevel , typename Module >
PtrMaker< T > art::PtrMaker< T >::create ( DataLevel const &  E,
Module const &  module,
std::string const &  instance = {} 
)
static

Definition at line 95 of file PtrMaker.h.

References tca::evt, and instance.

98  {
99  auto const pid = module.template getProductID<Container>(instance);
100  return PtrMaker<T>{evt, pid};
101  }
const std::string instance
TCEvent evt
Definition: DataStructs.cxx:5
template<typename T>
Ptr< T > art::PtrMaker< T >::operator() ( std::size_t  index) const

Definition at line 119 of file PtrMaker.h.

References art::PtrMaker< T >::prodGetter_, and art::PtrMaker< T >::prodId_.

120  {
121  return Ptr<T>{prodId_, index, prodGetter_};
122  }
ProductID const prodId_
Definition: PtrMaker.h:88
EDProductGetter const * prodGetter_
Definition: PtrMaker.h:89

Member Data Documentation

template<typename T>
EDProductGetter const* art::PtrMaker< T >::prodGetter_
private

Definition at line 89 of file PtrMaker.h.

Referenced by art::PtrMaker< T >::operator()(), and art::PtrMaker< T >::PtrMaker().

template<typename T>
ProductID const art::PtrMaker< T >::prodId_
private

Definition at line 88 of file PtrMaker.h.

Referenced by art::PtrMaker< T >::operator()().


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