Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
art::FindOneP< ProdB, Data > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/canvas/v3_09_01/source/canvas/Persistency/Common/FindOneP.h"

Public Types

using dataColl_t = std::vector< Data const * >
 
using value_type = typename base::value_type
 
using size_type = typename base::size_type
 
using difference_type = typename base::difference_type
 
using const_reference = typename base::const_reference
 
using reference = typename base::reference
 
using assoc_t = typename base::assoc_t
 
using data_const_pointer = Data const *
 
using data_const_reference = Data const &
 
using data_reference = Data &
 
using data_t = Data
 

Public Member Functions

template<typename Handle , typename DataContainer , typename Tag >
 FindOneP (Handle const &aCollection, DataContainer const &dc, Tag const &tag, std::enable_if_t< detail::is_handle< Handle >::value > *=nullptr)
 
template<typename ProdAColl , typename DataContainer , typename Tag >
 FindOneP (ProdAColl const &view, DataContainer const &dc, Tag const &tag, std::enable_if_t< std::is_pointer< typename ProdAColl::value_type >::value > *=nullptr)
 
template<typename PtrProdAColl , typename DataContainer , typename Tag >
 FindOneP (PtrProdAColl const &aPtrColl, DataContainer const &dc, Tag const &tag, std::enable_if_t< std::is_same< typename PtrProdAColl::value_type, art::Ptr< typename PtrProdAColl::value_type::value_type > >::value > *=nullptr)
 
template<typename ProdA , typename DataContainer , typename Tag >
 FindOneP (std::initializer_list< Ptr< ProdA > > const &ptrs, DataContainer const &dc, Tag const &tag)
 
cet::maybe_ref< Data const > data (size_type i) const
 
void get (size_type i, art::Ptr< assoc_t > &item, cet::maybe_ref< Data const > &data) const
 
bool operator== (FindOneP< ProdB, Data > const &other) const
 
template<typename PtrProdAColl , typename DataContainer , typename Tag >
 FindOneP (PtrProdAColl const &aPtrColl, DataContainer const &dc, Tag const &tag, std::enable_if_t< std::is_same< typename PtrProdAColl::value_type, art::Ptr< typename PtrProdAColl::value_type::value_type >>::value > *)
 
template<typename ProdA , typename DataContainer , typename Tag >
 FindOneP (std::initializer_list< Ptr< ProdA >> const &ptrs, DataContainer const &dc, Tag const &tag)
 

Private Types

using base = FindOneP< ProdB, void >
 

Private Attributes

dataColl_t dataCollection_ {}
 

Detailed Description

template<typename ProdB, typename Data>
class art::FindOneP< ProdB, Data >

Definition at line 133 of file FindOneP.h.

Member Typedef Documentation

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::assoc_t = typename base::assoc_t

Definition at line 221 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::base = FindOneP<ProdB, void>
private

Definition at line 213 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::const_reference = typename base::const_reference

Definition at line 219 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::data_const_pointer = Data const*

Definition at line 223 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::data_const_reference = Data const&

Definition at line 224 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::data_reference = Data&

Definition at line 225 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::data_t = Data

Definition at line 226 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::dataColl_t = std::vector<Data const*>

Definition at line 215 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::difference_type = typename base::difference_type

Definition at line 218 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::reference = typename base::reference

Definition at line 220 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::size_type = typename base::size_type

Definition at line 217 of file FindOneP.h.

template<typename ProdB, typename Data>
using art::FindOneP< ProdB, Data >::value_type = typename base::value_type

Definition at line 216 of file FindOneP.h.

Constructor & Destructor Documentation

template<typename ProdB , typename Data >
template<typename Handle , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( Handle const &  aCollection,
DataContainer const &  dc,
Tag const &  tag,
std::enable_if_t< detail::is_handle< Handle >::value > *  = nullptr 
)

Definition at line 428 of file FindOneP.h.

References art::FindOneP< ProdB, void >::bCollection(), art::FindOneP< ProdB, Data >::dataCollection_, art::FindOneP< ProdB, void >::setStoredException(), and getGoodRuns4SAM::tag.

Referenced by art::FindOneP< ProdB, void >::FindOneP().

433 {
434  using ProdA = typename Handle::element_type::value_type;
435  detail::IPRHelper<ProdA, ProdB, Data, dataColl_t, DataContainer> finder{
436  dc, detail::input_tag<ProdA, ProdB, Data>(tag)};
438  finder(*aCollection, base::bCollection(), dataCollection_));
439 }
void setStoredException(std::shared_ptr< art::Exception const > &&e)
Definition: FindOneP.h:407
dataColl_t dataCollection_
Definition: FindOneP.h:272
template<typename ProdB , typename Data >
template<typename ProdAColl , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( ProdAColl const &  view,
DataContainer const &  dc,
Tag const &  tag,
std::enable_if_t< std::is_pointer< typename ProdAColl::value_type >::value > *  = nullptr 
)

Definition at line 443 of file FindOneP.h.

References art::FindOneP< ProdB, void >::bCollection(), art::FindOneP< ProdB, Data >::dataCollection_, art::FindOneP< ProdB, void >::setStoredException(), and getGoodRuns4SAM::tag.

448 {
449  using ProdA =
450  std::remove_const_t<std::remove_pointer_t<typename ProdAColl::value_type>>;
451  detail::IPRHelper<ProdA, ProdB, Data, dataColl_t, DataContainer> finder{
452  dc, detail::input_tag<ProdA, ProdB, Data>(tag)};
454 }
void setStoredException(std::shared_ptr< art::Exception const > &&e)
Definition: FindOneP.h:407
dataColl_t dataCollection_
Definition: FindOneP.h:272
template<typename ProdB, typename Data>
template<typename PtrProdAColl , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( PtrProdAColl const &  aPtrColl,
DataContainer const &  dc,
Tag const &  tag,
std::enable_if_t< std::is_same< typename PtrProdAColl::value_type, art::Ptr< typename PtrProdAColl::value_type::value_type > >::value > *  = nullptr 
)
template<typename ProdB, typename Data>
template<typename ProdA , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( std::initializer_list< Ptr< ProdA > > const &  ptrs,
DataContainer const &  dc,
Tag const &  tag 
)
template<typename ProdB, typename Data>
template<typename PtrProdAColl , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( PtrProdAColl const &  aPtrColl,
DataContainer const &  dc,
Tag const &  tag,
std::enable_if_t< std::is_same< typename PtrProdAColl::value_type, art::Ptr< typename PtrProdAColl::value_type::value_type >>::value > *   
)

Definition at line 458 of file FindOneP.h.

References art::FindOneP< ProdB, void >::bCollection(), art::FindOneP< ProdB, Data >::dataCollection_, art::FindOneP< ProdB, void >::setStoredException(), and getGoodRuns4SAM::tag.

465 {
466  using ProdA = typename PtrProdAColl::value_type::value_type;
467  detail::IPRHelper<ProdA, ProdB, Data, dataColl_t, DataContainer> finder{
468  dc, detail::input_tag<ProdA, ProdB, Data>(tag)};
470  finder(aPtrColl, base::bCollection(), dataCollection_));
471 }
void setStoredException(std::shared_ptr< art::Exception const > &&e)
Definition: FindOneP.h:407
dataColl_t dataCollection_
Definition: FindOneP.h:272
template<typename ProdB, typename Data>
template<typename ProdA , typename DataContainer , typename Tag >
art::FindOneP< ProdB, Data >::FindOneP ( std::initializer_list< Ptr< ProdA >> const &  ptrs,
DataContainer const &  dc,
Tag const &  tag 
)

Definition at line 475 of file FindOneP.h.

References art::FindOneP< ProdB, void >::bCollection(), art::FindOneP< ProdB, Data >::dataCollection_, art::FindOneP< ProdB, void >::setStoredException(), and getGoodRuns4SAM::tag.

479 {
480  detail::IPRHelper<ProdA, ProdB, Data, dataColl_t, DataContainer> finder{
481  dc, detail::input_tag<ProdA, ProdB, Data>(tag)};
483 }
void setStoredException(std::shared_ptr< art::Exception const > &&e)
Definition: FindOneP.h:407
dataColl_t dataCollection_
Definition: FindOneP.h:272

Member Function Documentation

template<typename ProdB , typename Data >
cet::maybe_ref< Data const > art::FindOneP< ProdB, Data >::data ( size_type  i) const
inline
template<typename ProdB , typename Data>
void art::FindOneP< ProdB, Data >::get ( size_type  i,
art::Ptr< assoc_t > &  item,
cet::maybe_ref< Data const > &  data 
) const
inline

Definition at line 493 of file FindOneP.h.

References art::FindOneP< ProdB, Data >::dataCollection_, and art::FindOneP< ProdB, void >::get().

Referenced by art::FindOneP< ProdB, void >::at(), and art::FindOneP< ProdB, void >::isValid().

500 {
501  base::get(i, item); // Will check validity.
502  data.reseat(*dataCollection_.at(i));
503 }
dataColl_t dataCollection_
Definition: FindOneP.h:272
void get(size_type i, Ptr< assoc_t > &item) const
Definition: FindOneP.h:377
void reseat()
Definition: maybe_ref.h:67
template<typename ProdB, typename Data>
bool art::FindOneP< ProdB, Data >::operator== ( FindOneP< ProdB, Data > const &  other) const
inline

Definition at line 506 of file FindOneP.h.

References art::FindOneP< ProdB, Data >::dataCollection_, and art::FindOneP< ProdB, void >::operator==().

Referenced by art::FindOneP< ProdB, void >::get().

507 {
508  return this->base::operator==(other) && // Will check validity.
509  dataCollection_ == other.dataCollection_;
510 }
dataColl_t dataCollection_
Definition: FindOneP.h:272
bool operator==(FindOneP< ProdB, void > const &other) const
Definition: FindOneP.h:397

Member Data Documentation

template<typename ProdB, typename Data>
dataColl_t art::FindOneP< ProdB, Data >::dataCollection_ {}
private

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