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

#include <RefCore.h>

Classes

struct  RefCoreTransients
 

Public Member Functions

constexpr RefCore ()=default
 
 RefCore (ProductID const &theId, void const *prodPtr, EDProductGetter const *prodGetter)
 
constexpr bool isNonnull () const noexcept
 
constexpr bool isNull () const noexcept
 
constexpr bool operator! () const noexcept
 
bool isAvailable () const
 
constexpr ProductID id () const noexcept
 
void const * productPtr () const noexcept
 
EDProductGetter const * productGetter () const noexcept
 
void setProductPtr (void const *prodPtr) const noexcept
 
void setProductGetter (EDProductGetter const *) noexcept
 
void swap (RefCore &other)
 

Private Attributes

ProductID id_ {}
 
RefCoreTransients transients_ {}
 

Detailed Description

Definition at line 11 of file RefCore.h.

Constructor & Destructor Documentation

constexpr art::RefCore::RefCore ( )
default
art::RefCore::RefCore ( ProductID const &  theId,
void const *  prodPtr,
EDProductGetter const *  prodGetter 
)

Definition at line 17 of file RefCore.cc.

20  : id_{id}, transients_{prodPtr, prodGetter}
21  {}
RefCoreTransients transients_
Definition: RefCore.h:67
ProductID id_
Definition: RefCore.h:66

Member Function Documentation

constexpr ProductID art::RefCore::id ( ) const
inlinenoexcept

Definition at line 46 of file RefCore.h.

47  {
48  return id_;
49  }
ProductID id_
Definition: RefCore.h:66
bool art::RefCore::isAvailable ( ) const

Definition at line 24 of file RefCore.cc.

25  {
26  if (productPtr()) {
27  return true;
28  }
29  return id_.isValid() && productGetter() != nullptr &&
30  productGetter()->getIt() != nullptr;
31  }
EDProduct const * getIt() const
EDProductGetter const * productGetter() const noexcept
Definition: RefCore.cc:41
constexpr bool isValid() const noexcept
Definition: ProductID.h:34
ProductID id_
Definition: RefCore.h:66
void const * productPtr() const noexcept
Definition: RefCore.cc:34
constexpr bool art::RefCore::isNonnull ( ) const
inlinenoexcept

Definition at line 28 of file RefCore.h.

29  {
30  return id_.isValid();
31  }
constexpr bool isValid() const noexcept
Definition: ProductID.h:34
ProductID id_
Definition: RefCore.h:66
constexpr bool art::RefCore::isNull ( ) const
inlinenoexcept

Definition at line 33 of file RefCore.h.

34  {
35  return !isNonnull();
36  }
constexpr bool isNonnull() const noexcept
Definition: RefCore.h:28
constexpr bool art::RefCore::operator! ( ) const
inlinenoexcept

Definition at line 37 of file RefCore.h.

37 { return isNull(); }
constexpr bool isNull() const noexcept
Definition: RefCore.h:33
EDProductGetter const * art::RefCore::productGetter ( ) const
noexcept

Definition at line 41 of file RefCore.cc.

42  {
43  return transients_.prodGetter_;
44  }
RefCoreTransients transients_
Definition: RefCore.h:67
EDProductGetter const * prodGetter_
Definition: RefCore.h:19
void const * art::RefCore::productPtr ( ) const
noexcept

Definition at line 34 of file RefCore.cc.

35  {
36  return transients_.itemPtr_;
37  }
RefCoreTransients transients_
Definition: RefCore.h:67
void art::RefCore::setProductGetter ( EDProductGetter const *  prodGetter)
noexcept

Definition at line 57 of file RefCore.cc.

58  {
59  transients_.prodGetter_ = prodGetter;
60  }
RefCoreTransients transients_
Definition: RefCore.h:67
EDProductGetter const * prodGetter_
Definition: RefCore.h:19
void art::RefCore::setProductPtr ( void const *  prodPtr) const
noexcept

Definition at line 48 of file RefCore.cc.

49  {
50  transients_.itemPtr_ = prodPtr;
51  }
RefCoreTransients transients_
Definition: RefCore.h:67
void art::RefCore::swap ( RefCore other)

Definition at line 63 of file RefCore.cc.

64  {
65  std::swap(id_, other.id_);
66  std::swap(transients_, other.transients_);
67  }
RefCoreTransients transients_
Definition: RefCore.h:67
ProductID id_
Definition: RefCore.h:66
void swap(RefCore &lhs, RefCore &rhs)
Definition: RefCore.cc:70

Member Data Documentation

ProductID art::RefCore::id_ {}
private

Definition at line 66 of file RefCore.h.

RefCoreTransients art::RefCore::transients_ {}
private

Definition at line 67 of file RefCore.h.


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