OutputHandle.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
4 #include "cetlib_except/exception.h"
5 
6 using namespace std;
7 
8 namespace art {
9 
10  OutputHandle::~OutputHandle() = default;
11 
12  OutputHandle::OutputHandle(
13  EDProduct const* prod,
14  BranchDescription const* desc,
16  RangeSet const& rs)
17  : desc_{desc}
19  , wrap_{prod}
21  {}
22 
23  /// Used when the attempt to get the data failed
25  : desc_{nullptr}
26  , productProvenance_{nullptr}
27  , wrap_{nullptr}
29  {}
30 
31  bool
33  {
34  return desc_ && productProvenance_ && wrap_;
35  }
36 
37  BranchDescription const*
39  {
40  return desc_;
41  }
42 
43  ProductProvenance const*
45  {
46  return productProvenance_.get();
47  }
48 
49  EDProduct const*
51  {
52  return wrap_;
53  }
54 
55  RangeSet const&
57  {
58  return rangeOfValidity_;
59  }
60 
61  void
63  {
64  using std::swap;
65  swap(wrap_, other.wrap_);
66  swap(desc_, other.desc_);
68  }
69 
70  void
72  {
73  a.swap(b);
74  }
75 
76 } // namespace art
OutputHandle(EDProduct const *, BranchDescription const *, cet::exempt_ptr< ProductProvenance const >, RangeSet const &)
Definition: OutputHandle.cc:12
EDProduct const * wrapper() const
Definition: OutputHandle.cc:50
STL namespace.
ProductProvenance const * productProvenance() const
Definition: OutputHandle.cc:44
const double a
bool isValid() const
Definition: OutputHandle.cc:32
RangeSet const & rangeOfValidity_
Definition: OutputHandle.h:69
BranchDescription const * desc_
Definition: OutputHandle.h:66
void swap(OutputHandle &)
Definition: OutputHandle.cc:62
EDProduct const * wrap_
Definition: OutputHandle.h:68
cet::exempt_ptr< ProductProvenance const > productProvenance_
Definition: OutputHandle.h:67
void swap(OutputHandle &a, OutputHandle &b)
Definition: OutputHandle.cc:71
static bool * b
Definition: config.cpp:1043
BranchDescription const * desc() const
Definition: OutputHandle.cc:38
RangeSet const & rangeOfValidity() const
Definition: OutputHandle.cc:56