Classes | Public Types | Public Member Functions | Private Attributes | List of all members
art::ValidHandle< T > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Principal/Handle.h"

Classes

class  HandleTag
 

Public Types

typedef T element_type
 

Public Member Functions

 ValidHandle ()=delete
 
 ValidHandle (T const *prod, Provenance prov)
 
 ValidHandle (ValidHandle const &)=default
 
ValidHandleoperator= (ValidHandle const &)&=default
 
 operator T const * () const
 
T const & operator* () const
 
T const * operator-> () const
 
T const * product () const
 
bool isValid () const
 
bool failedToGet () const
 
Provenance const * provenance () const
 
ProductID id () const
 
std::shared_ptr< art::Exception const > whyFailed () const
 
void swap (ValidHandle< T > &other)
 

Private Attributes

T const * prod_
 
Provenance prov_
 

Detailed Description

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

Definition at line 48 of file Handle.h.

Member Typedef Documentation

template<typename T>
typedef T art::ValidHandle< T >::element_type

Definition at line 258 of file Handle.h.

Constructor & Destructor Documentation

template<typename T>
art::ValidHandle< T >::ValidHandle ( )
delete
template<class T >
art::ValidHandle< T >::ValidHandle ( T const *  prod,
Provenance  prov 
)
explicit

Definition at line 291 of file Handle.h.

References art::errors::NullPointerError, stan::math::prod(), and art::ValidHandle< T >::prov_.

292  : prod_{prod}, prov_{prov}
293 {
294  if (prod == nullptr)
296  << "Attempt to create ValidHandle with null pointer";
297 }
Provenance prov_
Definition: Handle.h:287
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
T const * prod_
Definition: Handle.h:286
template<typename T>
art::ValidHandle< T >::ValidHandle ( ValidHandle< T > const &  )
default

Member Function Documentation

template<class T >
bool art::ValidHandle< T >::failedToGet ( ) const
inline

Definition at line 333 of file Handle.h.

334 {
335  return false;
336 }
template<class T >
art::ProductID art::ValidHandle< T >::id ( ) const
inline

Definition at line 347 of file Handle.h.

References art::Provenance::productID(), and art::ValidHandle< T >::prov_.

348 {
349  return prov_.productID();
350 }
Provenance prov_
Definition: Handle.h:287
ProductID const & productID() const
Definition: Provenance.h:113
template<class T >
bool art::ValidHandle< T >::isValid ( ) const
inline

Definition at line 326 of file Handle.h.

Referenced by fnex::EventListMaker::analyze().

327 {
328  return true;
329 }
template<class T >
art::ValidHandle< T >::operator T const * ( ) const
inline

Definition at line 300 of file Handle.h.

References art::ValidHandle< T >::prod_.

301 {
302  return prod_;
303 }
T const * prod_
Definition: Handle.h:286
template<class T >
T const & art::ValidHandle< T >::operator* ( ) const
inline

Definition at line 306 of file Handle.h.

References art::ValidHandle< T >::prod_.

307 {
308  return *prod_;
309 }
T const * prod_
Definition: Handle.h:286
template<class T >
T const * art::ValidHandle< T >::operator-> ( ) const
inline

Definition at line 312 of file Handle.h.

References art::ValidHandle< T >::prod_, and T.

313 {
314  return prod_;
315 }
T const * prod_
Definition: Handle.h:286
template<typename T>
ValidHandle& art::ValidHandle< T >::operator= ( ValidHandle< T > const &  )
default
template<class T >
T const * art::ValidHandle< T >::product ( ) const
inline

Definition at line 319 of file Handle.h.

References art::ValidHandle< T >::prod_.

320 {
321  return prod_;
322 }
T const * prod_
Definition: Handle.h:286
template<class T >
art::Provenance const * art::ValidHandle< T >::provenance ( ) const
inline

Definition at line 340 of file Handle.h.

References art::ValidHandle< T >::prov_.

Referenced by art::DataViewImpl::getValidHandle().

341 {
342  return &prov_;
343 }
Provenance prov_
Definition: Handle.h:287
template<class T >
void art::ValidHandle< T >::swap ( art::ValidHandle< T > &  other)
inline

Definition at line 361 of file Handle.h.

References a, b, art::disjoint_ranges(), novadaq::messages::error::rc::errMsg, make_syst_table_plots::h, art::overlapping_ranges(), art::range_of_validity(), art::same_ranges(), string, std::swap(), T, and art::detail::throw_if_invalid().

362 {
363  std::swap(*this, other);
364 }
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
template<class T >
std::shared_ptr< art::Exception const > art::ValidHandle< T >::whyFailed ( ) const
inline

Definition at line 354 of file Handle.h.

355 {
356  return std::shared_ptr<art::Exception const>();
357 }

Member Data Documentation

template<typename T>
T const* art::ValidHandle< T >::prod_
private
template<typename T>
Provenance art::ValidHandle< T >::prov_
private

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