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

#include <GroupQueryResult.h>

Public Member Functions

 GroupQueryResult (group_ptr_t)
 
 GroupQueryResult (exception_ptr_t)
 
bool succeeded () const
 
bool failed () const
 
cet::exempt_ptr< Group const > result () const
 
std::shared_ptr< art::Exception const > whyFailed () const
 

Private Attributes

std::variant< group_ptr_t, exception_ptr_tgroupOrException_
 

Detailed Description

Definition at line 27 of file GroupQueryResult.h.

Constructor & Destructor Documentation

art::GroupQueryResult::GroupQueryResult ( group_ptr_t  g)
explicit

Definition at line 10 of file GroupQueryResult.cc.

10 : groupOrException_{g} {}
static constexpr double g
Definition: Units.h:144
std::variant< group_ptr_t, exception_ptr_t > groupOrException_
art::GroupQueryResult::GroupQueryResult ( exception_ptr_t  e)
explicit

Definition at line 12 of file GroupQueryResult.cc.

14 {}
const double e
std::variant< group_ptr_t, exception_ptr_t > groupOrException_

Member Function Documentation

bool art::GroupQueryResult::failed ( ) const
inline

Definition at line 39 of file GroupQueryResult.h.

40  {
41  return std::holds_alternative<exception_ptr_t>(groupOrException_);
42  }
std::variant< group_ptr_t, exception_ptr_t > groupOrException_
cet::exempt_ptr<Group const> art::GroupQueryResult::result ( ) const
inline

Definition at line 46 of file GroupQueryResult.h.

47  {
48  auto result = std::get_if<group_ptr_t>(&groupOrException_);
49  return result ? *result : nullptr;
50  }
std::variant< group_ptr_t, exception_ptr_t > groupOrException_
cet::exempt_ptr< Group const > result() const
bool art::GroupQueryResult::succeeded ( ) const
inline

Definition at line 34 of file GroupQueryResult.h.

35  {
36  return std::holds_alternative<group_ptr_t>(groupOrException_);
37  }
std::variant< group_ptr_t, exception_ptr_t > groupOrException_
std::shared_ptr<art::Exception const> art::GroupQueryResult::whyFailed ( ) const
inline

Definition at line 52 of file GroupQueryResult.h.

53  {
54  auto result = std::get_if<exception_ptr_t>(&groupOrException_);
55  return result ? *result : nullptr;
56  }
std::variant< group_ptr_t, exception_ptr_t > groupOrException_
cet::exempt_ptr< Group const > result() const

Member Data Documentation

std::variant<group_ptr_t, exception_ptr_t> art::GroupQueryResult::groupOrException_
private

Definition at line 59 of file GroupQueryResult.h.


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