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

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

Public Types

using collection_type = std::vector< T const * >
 
using value_type = typename collection_type::value_type
 
using const_iterator = typename collection_type::const_iterator
 
using iterator = typename collection_type::iterator
 
using size_type = typename collection_type::size_type
 

Public Member Functions

 View ()=default
 
collection_typevals ()
 
collection_type const & vals () const
 
bool isValid () const
 
ProductID id () const
 
void fill (PtrVector< T > &pv) const
 
 operator collection_type & ()
 
 operator collection_type const & () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
size_type size () const
 

Private Member Functions

void set_innards (ProductID const &id, EDProduct const *p)
 

Private Attributes

collection_type vals_ {}
 
ProductID id_ {}
 
EDProduct const * prod_ {nullptr}
 

Friends

class DataViewImpl
 

Detailed Description

template<class T>
class art::View< T >

Definition at line 47 of file fwd.h.

Member Typedef Documentation

template<class T>
using art::View< T >::collection_type = std::vector<T const*>

Definition at line 26 of file View.h.

template<class T>
using art::View< T >::const_iterator = typename collection_type::const_iterator

Definition at line 28 of file View.h.

template<class T>
using art::View< T >::iterator = typename collection_type::iterator

Definition at line 29 of file View.h.

template<class T>
using art::View< T >::size_type = typename collection_type::size_type

Definition at line 30 of file View.h.

template<class T>
using art::View< T >::value_type = typename collection_type::value_type

Definition at line 27 of file View.h.

Constructor & Destructor Documentation

template<class T>
art::View< T >::View ( )
default

Member Function Documentation

template<class T>
iterator art::View< T >::begin ( )
inline

Definition at line 67 of file View.h.

References art::View< T >::vals_.

68  {
69  return vals_.begin();
70  }
collection_type vals_
Definition: View.h:104
template<class T>
const_iterator art::View< T >::begin ( ) const
inline

Definition at line 77 of file View.h.

References art::View< T >::vals_.

78  {
79  return vals_.begin();
80  }
collection_type vals_
Definition: View.h:104
template<class T>
const_iterator art::View< T >::cbegin ( ) const
inline

Definition at line 87 of file View.h.

References art::View< T >::vals_.

88  {
89  return vals_.cbegin();
90  }
collection_type vals_
Definition: View.h:104
template<class T>
const_iterator art::View< T >::cend ( ) const
inline

Definition at line 92 of file View.h.

References art::View< T >::vals_.

93  {
94  return vals_.cend();
95  }
collection_type vals_
Definition: View.h:104
template<class T>
iterator art::View< T >::end ( )
inline

Definition at line 72 of file View.h.

References art::View< T >::vals_.

73  {
74  return vals_.end();
75  }
collection_type vals_
Definition: View.h:104
template<class T>
const_iterator art::View< T >::end ( ) const
inline

Definition at line 82 of file View.h.

References art::View< T >::vals_.

83  {
84  return vals_.end();
85  }
collection_type vals_
Definition: View.h:104
template<class T >
void art::View< T >::fill ( PtrVector< T > &  pv) const

Definition at line 114 of file View.h.

References a, submit_syst::const, art::EDProduct::fillView(), MECModelEnuComparisons::i, art::View< T >::id_, art::View< T >::prod_, art::PtrVector< T >::push_back(), cet::search_all(), T, and art::View< T >::vals_.

Referenced by art::View< T >::id().

115 {
116  std::vector<void const*> addresses;
117  prod_->fillView(addresses);
118 
119  std::size_t i{};
120  for (auto a : addresses) {
121  if (cet::search_all(vals_, a)) {
122  auto p = reinterpret_cast<T const*>(a);
123  pv.push_back(Ptr<T>{id_, const_cast<T*>(p), i});
124  ++i;
125  }
126  }
127 }
EDProduct const * prod_
Definition: View.h:106
virtual void fillView(std::vector< void const * > &) const
Definition: EDProduct.h:38
const char * p
Definition: xmltok.h:285
collection_type vals_
Definition: View.h:104
ProductID id_
Definition: View.h:105
bool search_all(FwdCont const &, Datum const &)
const double a
double T
Definition: Xdiff_gwt.C:5
template<class T>
ProductID art::View< T >::id ( ) const
inline

Definition at line 53 of file View.h.

References art::View< T >::fill(), and art::View< T >::id_.

Referenced by art::View< T >::set_innards().

54  {
55  return id_;
56  }
ProductID id_
Definition: View.h:105
template<class T>
bool art::View< T >::isValid ( ) const
inline

Definition at line 47 of file View.h.

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

48  {
49  return prod_ != nullptr;
50  }
EDProduct const * prod_
Definition: View.h:106
template<class T>
art::View< T >::operator collection_type & ( )
inline

Definition at line 63 of file View.h.

References art::View< T >::vals_.

63 { return vals_; }
collection_type vals_
Definition: View.h:104
template<class T>
art::View< T >::operator collection_type const & ( ) const
inline

Definition at line 64 of file View.h.

References art::View< T >::vals_.

64 { return vals_; }
collection_type vals_
Definition: View.h:104
template<class T >
void art::View< T >::set_innards ( ProductID const &  id,
EDProduct const *  p 
)
inlineprivate

Definition at line 131 of file View.h.

References art::View< T >::id(), art::View< T >::id_, and art::View< T >::prod_.

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

132 {
133  id_ = id;
134  prod_ = p;
135 }
EDProduct const * prod_
Definition: View.h:106
const char * p
Definition: xmltok.h:285
ProductID id_
Definition: View.h:105
ProductID id() const
Definition: View.h:53
template<class T>
size_type art::View< T >::size ( void  ) const
inline

Definition at line 98 of file View.h.

References art::View< T >::vals_.

99  {
100  return vals_.size();
101  }
collection_type vals_
Definition: View.h:104
template<class T>
collection_type& art::View< T >::vals ( )
inline

Definition at line 34 of file View.h.

References art::View< T >::vals_.

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

35  {
36  return vals_;
37  }
collection_type vals_
Definition: View.h:104
template<class T>
collection_type const& art::View< T >::vals ( ) const
inline

Definition at line 39 of file View.h.

References art::View< T >::vals_.

40  {
41  return vals_;
42  }
collection_type vals_
Definition: View.h:104

Friends And Related Function Documentation

template<class T>
friend class DataViewImpl
friend

Definition at line 108 of file View.h.

Member Data Documentation

template<class T>
ProductID art::View< T >::id_ {}
private

Definition at line 105 of file View.h.

Referenced by art::View< T >::fill(), art::View< T >::id(), and art::View< T >::set_innards().

template<class T>
EDProduct const* art::View< T >::prod_ {nullptr}
private
template<class T>
collection_type art::View< T >::vals_ {}
private

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