Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
art::PtrVector< T > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/canvas/v3_09_01/source/canvas/Persistency/Common/fwd.h"

Inheritance diagram for art::PtrVector< T >:
art::PtrVectorBase

Public Types

using value_type = typename data_t::value_type
 
using allocator_type = typename data_t::allocator_type
 
using reference = typename data_t::reference
 
using const_reference = typename data_t::const_reference
 
using pointer = typename data_t::pointer
 
using const_pointer = typename data_t::const_pointer
 
using iterator = typename data_t::iterator
 
using const_iterator = typename data_t::const_iterator
 
using reverse_iterator = typename data_t::reverse_iterator
 
using const_reverse_iterator = typename data_t::const_reverse_iterator
 
using difference_type = typename data_t::difference_type
 
using size_type = typename data_t::size_type
 
using key_type = unsigned long
 
using indices_t = std::vector< key_type >
 

Public Member Functions

 PtrVector ()
 
template<typename U >
 PtrVector (PtrVector< U > const &other)
 
template<typename U >
 PtrVector (std::initializer_list< Ptr< U >> il)
 
template<typename U >
PtrVector< T > & operator= (std::initializer_list< Ptr< U >> il)
 
template<typename U >
PtrVector< T > & operator= (PtrVector< U > const &other)&
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
size_type size () const
 
size_type max_size () const
 
void resize (size_type n)
 
size_type capacity () const
 
bool empty () const
 
void reserve (size_type n)
 
void shrink_to_fit ()
 
Ptr< T > const & operator[] (unsigned long const idx) const
 
reference at (size_type n)
 
const_reference at (size_type n) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
template<typename U >
void assign (size_type n, Ptr< U > const &p)
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 
template<typename U >
void assign (std::initializer_list< Ptr< U >> il)
 
template<typename U >
void push_back (Ptr< U > const &p)
 
template<typename... Args>
void emplace_back (Args &&...args)
 
void pop_back ()
 
template<typename U >
iterator insert (iterator position, Ptr< U > const &p)
 
template<typename U >
void insert (iterator position, size_type n, Ptr< U > const &p)
 
template<typename InputIterator >
iterator insert (const_iterator position, InputIterator first, InputIterator last)
 
iterator erase (iterator position)
 
iterator erase (iterator first, iterator last)
 
void swap (PtrVector &other)
 
void swap (key_type k1, key_type k2)
 
void clear ()
 
bool operator== (PtrVector const &other) const
 
void sort ()
 
template<class Comp >
void sort (Comp comp)
 
template<typename U >
art::PtrVector< T > & operator= (std::initializer_list< Ptr< U >> const il)
 
template<typename U >
art::PtrVector< T > & operator= (PtrVector< U > const &other)&
 
template<typename U >
art::PtrVector< T >::iterator insert (iterator const position, Ptr< U > const &p)
 
template<typename InputIterator >
auto insert (const_iterator position, InputIterator first, InputIterator last) -> iterator
 
bool isNonnull () const noexcept
 
bool isNull () const noexcept
 
bool isAvailable () const
 
ProductID id () const noexcept
 
EDProductGetter const * productGetter () const noexcept
 
void setProductGetter (EDProductGetter const *) noexcept
 
template<typename T >
art::Ptr< T >::key_type key (Ptr< T > const &ptr) const noexcept
 

Static Public Member Functions

static short Class_Version ()
 

Protected Member Functions

void swap (PtrVectorBase &)
 
void updateCore (RefCore const &core)
 
bool operator== (PtrVectorBase const &) const noexcept
 

Private Types

using data_t = std::vector< Ptr< T >>
 

Private Member Functions

void fill_offsets (indices_t &indices) override
 
void fill_from_offsets (indices_t const &indices) const override
 
void zeroTransients () override
 

Private Attributes

data_t ptrs_ {}
 

Detailed Description

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

Definition at line 31 of file fwd.h.

Member Typedef Documentation

template<typename T>
using art::PtrVector< T >::allocator_type = typename data_t::allocator_type

Definition at line 49 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::const_iterator = typename data_t::const_iterator

Definition at line 55 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::const_pointer = typename data_t::const_pointer

Definition at line 53 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::const_reference = typename data_t::const_reference

Definition at line 51 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::const_reverse_iterator = typename data_t::const_reverse_iterator

Definition at line 57 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::data_t = std::vector<Ptr<T>>
private

Definition at line 45 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::difference_type = typename data_t::difference_type

Definition at line 58 of file PtrVector.h.

using art::PtrVectorBase::indices_t = std::vector<key_type>
inherited

Definition at line 22 of file PtrVectorBase.h.

template<typename T>
using art::PtrVector< T >::iterator = typename data_t::iterator

Definition at line 54 of file PtrVector.h.

using art::PtrVectorBase::key_type = unsigned long
inherited

Definition at line 21 of file PtrVectorBase.h.

template<typename T>
using art::PtrVector< T >::pointer = typename data_t::pointer

Definition at line 52 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::reference = typename data_t::reference

Definition at line 50 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::reverse_iterator = typename data_t::reverse_iterator

Definition at line 56 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::size_type = typename data_t::size_type

Definition at line 59 of file PtrVector.h.

template<typename T>
using art::PtrVector< T >::value_type = typename data_t::value_type

Definition at line 48 of file PtrVector.h.

Constructor & Destructor Documentation

template<typename T >
art::PtrVector< T >::PtrVector ( )
inlinedefault
template<typename T >
template<typename U >
art::PtrVector< T >::PtrVector ( PtrVector< U > const &  other)
inline

Definition at line 165 of file PtrVector.h.

References cet::copy_all(), fhicl::other, and art::PtrVector< T >::ptrs_.

167 {
168  // Ensure that types are compatible.
169  static_assert(std::is_base_of_v<T, U> || std::is_base_of_v<U, T>,
170  "PtrVector: incompatible types");
171  ptrs_.reserve(other.size());
172  cet::copy_all(other, std::back_inserter(ptrs_));
173 }
PtrVectorBase()=default
auto copy_all(FwdCont &, FwdIter)
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
template<typename U >
art::PtrVector< T >::PtrVector ( std::initializer_list< Ptr< U >>  il)
inline

Definition at line 177 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, and art::PtrVectorBase::updateCore().

178 {
179  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
180  std::is_base_of_v<U, T>,
181  "PtrVector: incompatible types");
182  ptrs_.reserve(il.size());
183  for (auto&& p : il) {
184  updateCore(p.refCore());
185  ptrs_.push_back(std::move(p));
186  }
187 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)

Member Function Documentation

template<typename T >
template<typename U >
void art::PtrVector< T >::assign ( size_type  n,
Ptr< U > const &  p 
)
inline

Definition at line 403 of file PtrVector.h.

References art::PtrVectorBase::clear(), art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

Referenced by art::PtrVector< T >::assign(), and art::PtrVector< T >::operator=().

404 {
405  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
406  std::is_base_of_v<U, T>,
407  "PtrVector: incompatible types");
409  updateCore(p.refCore());
410  ptrs_.assign(n, p);
411 }
const char * p
Definition: xmltok.h:285
std::void_t< T > n
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T >
template<typename InputIterator >
void art::PtrVector< T >::assign ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 416 of file PtrVector.h.

References art::PtrVectorBase::clear(), art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

417 {
419  std::for_each(
420  first, last, [this](Ptr<T> const& p) { updateCore(p.refCore()); });
421  ptrs_.assign(first, last);
422 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T >
template<typename U >
void art::PtrVector< T >::assign ( std::initializer_list< Ptr< U >>  il)
inline

Definition at line 427 of file PtrVector.h.

References art::PtrVector< T >::assign().

428 {
429  assign(il.begin(), il.end());
430 }
void assign(size_type n, Ptr< U > const &p)
Definition: PtrVector.h:403
template<typename T >
auto art::PtrVector< T >::at ( size_type  n)
inline
template<typename T >
auto art::PtrVector< T >::at ( size_type  n) const
inline

Definition at line 366 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

367 {
368  return ptrs_.at(n);
369 }
std::void_t< T > n
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::back ( )
inline

Definition at line 387 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

388 {
389  return ptrs_.back();
390 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::back ( ) const
inline

Definition at line 394 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

395 {
396  return ptrs_.back();
397 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::begin ( )
inline
template<typename T >
auto art::PtrVector< T >::begin ( ) const
inline

Definition at line 224 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

225 {
226  return ptrs_.begin();
227 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::capacity ( ) const
inline

Definition at line 323 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

324 {
325  return ptrs_.capacity();
326 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::cbegin ( ) const
inline

Definition at line 273 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by novaddt::HoughTracker::filter().

274 {
275  return ptrs_.cbegin();
276 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::cend ( ) const
inline

Definition at line 280 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by novaddt::HoughTracker::filter().

281 {
282  return ptrs_.cend();
283 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T>
static short art::PtrVector< T >::Class_Version ( )
inlinestatic

Definition at line 140 of file PtrVector.h.

141  {
142  return 11;
143  }
template<typename T >
void art::PtrVector< T >::clear ( )
inline
template<typename T >
auto art::PtrVector< T >::crbegin ( ) const
inline

Definition at line 287 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

288 {
289  return ptrs_.crbegin();
290 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::crend ( ) const
inline

Definition at line 294 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

295 {
296  return ptrs_.crend();
297 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
template<typename... Args>
void art::PtrVector< T >::emplace_back ( Args &&...  args)
inline

Definition at line 448 of file PtrVector.h.

References make_syst_table_plots::args, art::PtrVector< T >::ptrs_, and art::PtrVectorBase::updateCore().

Referenced by art::DataViewImpl::getPtrVector(), and zcl::FMMTracker::Tracking2D().

449 {
450  Ptr<T> p{std::forward<Args>(args)...};
451  updateCore(p.refCore());
452  ptrs_.push_back(std::move(p));
453 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T >
bool art::PtrVector< T >::empty ( ) const
inline
template<typename T >
auto art::PtrVector< T >::end ( )
inline
template<typename T >
auto art::PtrVector< T >::end ( ) const
inline

Definition at line 238 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

239 {
240  return ptrs_.end();
241 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::erase ( iterator  position)
inline

Definition at line 504 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by rb::Cluster::RemoveHit().

505 {
506  return ptrs_.erase(position);
507 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::erase ( iterator  first,
iterator  last 
)
inline

Definition at line 511 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

512 {
513  return ptrs_.erase(first, last);
514 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::fill_from_offsets ( indices_t const &  indices) const
overrideprivatevirtual

Implements art::PtrVectorBase.

Definition at line 575 of file PtrVector.h.

References ana::assert(), MECModelEnuComparisons::i, art::PtrVectorBase::productGetter(), and art::PtrVector< T >::ptrs_.

576 {
577  // Precondition: ptrs_ is expected to be empty.
578  assert(ptrs_.empty());
579  ptrs_.reserve(indices.size());
580  for (auto i : indices) {
581  ptrs_.emplace_back(id(), i, productGetter());
582  }
583 }
EDProductGetter const * productGetter() const noexcept
Definition: PtrVectorBase.h:86
assert(nhit_max >=nhit_nbins)
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::fill_offsets ( indices_t indices)
overrideprivatevirtual

Implements art::PtrVectorBase.

Definition at line 563 of file PtrVector.h.

References ana::assert(), MECModelEnuComparisons::i, and art::PtrVector< T >::ptrs_.

564 {
565  // Precondition: indices is expected to be empty.
566  assert(indices.empty());
567  indices.reserve(ptrs_.size());
568  for (auto const& i : ptrs_) {
569  indices.push_back(i.key());
570  }
571 }
assert(nhit_max >=nhit_nbins)
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::front ( )
inline

Definition at line 373 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by trk::CosmicTrackAlg::MakeTrack(), cheat::TrackCheater::produce(), and trk::WindowTrackingAlg::ShortTrack().

374 {
375  return ptrs_.front();
376 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::front ( ) const
inline

Definition at line 380 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

381 {
382  return ptrs_.front();
383 }
data_t ptrs_
Definition: PtrVector.h:151
art::ProductID art::PtrVectorBase::id ( ) const
inlinenoexceptinherited

Definition at line 80 of file PtrVectorBase.h.

81 {
82  return core_.id();
83 }
constexpr ProductID id() const noexcept
Definition: RefCore.h:47
template<typename T>
template<typename U >
iterator art::PtrVector< T >::insert ( iterator  position,
Ptr< U > const &  p 
)
template<typename T >
template<typename U >
void art::PtrVector< T >::insert ( iterator  position,
size_type  n,
Ptr< U > const &  p 
)
inline

Definition at line 478 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

481 {
482  // Ensure that types are compatible.
483  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
484  std::is_base_of_v<U, T>,
485  "PtrVector: incompatible types");
486  updateCore(p.refCore());
487  ptrs_.insert(position, n, p);
488 }
const char * p
Definition: xmltok.h:285
std::void_t< T > n
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T>
template<typename InputIterator >
iterator art::PtrVector< T >::insert ( const_iterator  position,
InputIterator  first,
InputIterator  last 
)
template<typename T>
template<typename U >
art::PtrVector<T>::iterator art::PtrVector< T >::insert ( iterator const  position,
Ptr< U > const &  p 
)
inline

Definition at line 465 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

466 {
467  // Ensure that types are compatible.
468  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
469  std::is_base_of_v<U, T>,
470  "PtrVector: incompatible types");
471  updateCore(p.refCore());
472  return ptrs_.insert(position, p);
473 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T>
template<typename InputIterator >
auto art::PtrVector< T >::insert ( const_iterator  position,
InputIterator  first,
InputIterator  last 
) -> iterator
inline

Definition at line 493 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

496 {
497  std::for_each(
498  first, last, [this](Ptr<T> const& p) { updateCore(p.refCore()); });
499  return ptrs_.insert(position, first, last);
500 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
bool art::PtrVectorBase::isAvailable ( ) const
inlineinherited

Definition at line 74 of file PtrVectorBase.h.

75 {
76  return core_.isAvailable();
77 }
bool isAvailable() const
bool art::PtrVectorBase::isNonnull ( ) const
inlinenoexceptinherited

Definition at line 62 of file PtrVectorBase.h.

References art::RefCore::isNonnull().

63 {
64  return core_.isNonnull();
65 }
constexpr bool isNonnull() const noexcept
Definition: RefCore.h:29
bool art::PtrVectorBase::isNull ( ) const
inlinenoexceptinherited

Definition at line 68 of file PtrVectorBase.h.

69 {
70  return !isNonnull();
71 }
bool isNonnull() const noexcept
Definition: PtrVectorBase.h:62
template<typename T >
art::Ptr<T>::key_type art::PtrVectorBase::key ( Ptr< T > const &  ptr) const
inlinenoexceptinherited

Definition at line 119 of file PtrVectorBase.h.

120 {
121  return ptr.key();
122 }
template<typename T >
auto art::PtrVector< T >::max_size ( ) const
inline

Definition at line 309 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

310 {
311  return ptrs_.max_size();
312 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T>
template<typename U >
PtrVector<T>& art::PtrVector< T >::operator= ( std::initializer_list< Ptr< U >>  il)
template<typename T>
template<typename U >
PtrVector<T>& art::PtrVector< T >::operator= ( PtrVector< U > const &  other)
template<typename T>
template<typename U >
art::PtrVector<T>& art::PtrVector< T >::operator= ( std::initializer_list< Ptr< U >> const  il)
inline

Definition at line 192 of file PtrVector.h.

References art::PtrVector< T >::assign().

193 {
194  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
195  std::is_base_of_v<U, T>,
196  "PtrVector: incompatible types");
197  assign(il);
198  return *this;
199 }
void assign(size_type n, Ptr< U > const &p)
Definition: PtrVector.h:403
template<typename T>
template<typename U >
art::PtrVector<T>& art::PtrVector< T >::operator= ( PtrVector< U > const &  other)
inline

Definition at line 204 of file PtrVector.h.

References cet::copy_all(), fhicl::other, and art::PtrVector< T >::ptrs_.

205 {
206  static_assert(std::is_base_of_v<T, U> || std::is_base_of_v<U, T>,
207  "PtrVector: incompatible types");
208  PtrVectorBase::operator=(other);
209  ptrs_.clear();
210  cet::copy_all(other, std::back_inserter(ptrs_));
211  return *this;
212 }
auto copy_all(FwdCont &, FwdIter)
data_t ptrs_
Definition: PtrVector.h:151
bool art::PtrVectorBase::operator== ( PtrVectorBase const &  other) const
inlineprotectednoexceptinherited

Definition at line 125 of file PtrVectorBase.h.

References fhicl::other.

Referenced by art::PtrVector< T >::operator==().

126 {
127  return core_ == other.core_;
128 }
template<typename T >
bool art::PtrVector< T >::operator== ( PtrVector< T > const &  other) const
inline

Definition at line 541 of file PtrVector.h.

References art::PtrVectorBase::operator==(), and art::PtrVector< T >::ptrs_.

542 {
543  return ptrs_ == other.ptrs_ && PtrVectorBase::operator==(other);
544 }
bool operator==(PtrVectorBase const &) const noexcept
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
art::Ptr< T > const & art::PtrVector< T >::operator[] ( unsigned long const  idx) const
inline

Definition at line 351 of file PtrVector.h.

References art::PtrVector< T >::begin(), and compare_h5_caf::idx.

353 {
354  return *(begin() + idx);
355 }
iterator begin()
Definition: PtrVector.h:217
template<typename T >
void art::PtrVector< T >::pop_back ( )
inline

Definition at line 457 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

458 {
459  ptrs_.pop_back();
460 }
data_t ptrs_
Definition: PtrVector.h:151
art::EDProductGetter const * art::PtrVectorBase::productGetter ( ) const
inlinenoexceptinherited

Definition at line 86 of file PtrVectorBase.h.

Referenced by art::PtrVector< T >::fill_from_offsets().

87 {
88  return core_.productGetter();
89 }
EDProductGetter const * productGetter() const noexcept
template<typename T >
template<typename U >
void art::PtrVector< T >::push_back ( Ptr< U > const &  p)
inline

Definition at line 435 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, art::Ptr< T >::refCore(), and art::PtrVectorBase::updateCore().

Referenced by rb::Cluster::Add(), caf::CAFMaker::AddMCTruthToVec(), rb::Cluster::AllCells(), dt::Chain::AllHits(), dt::Cand::AllHits(), qeef::QeFinderVal::analyze(), validation::ValidateDAQ2RawDigit::analyze(), remid::ReMIdValidate::analyze(), mcchk::CloseInTime::analyze(), tut::RecoValidationTutorial::analyze(), remid::ReMIdTrain::analyze(), numue::NumuEAna::analyze(), murem::MuonRemoveAna::analyze(), comi::DataCheck::analyze(), calib::HitEfficiency::analyze(), bpfit::BPFEnergyAna::analyze(), remid::ReMIdDedx::analyze(), tbem::TBRecoAna::analyze(), trk::KalmanTrackAna::analyze(), showere::ShowerEnergyAna::analyze(), cvn::CVNEventDump::analyze(), cvn::CVNCosmicEventDump::analyze(), earms::ElasticArmsValidate::analyze(), bpfit::BreakPointAna::analyze(), cvn::CVNEventProngDump::analyze(), slicer::SlicerAna::analyze(), ncid::NCNNKerasVal::analyze(), remid::ReMIdDedxRock::analyze(), ncpi0::TwoProngBDTAna::analyze(), fuzz::FuzzyKValidate::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), bpfit::BPFTmvaTrainer::analyze(), bpf::BPFCVNAna::analyze(), bpfit::BreakPointProtonAna::analyze(), ncs::Xbeam::analyze(), air::AirKalmanAna::analyze(), ncs::GenieTruth::analyze(), ncs::Xeff::analyze(), slid::LIDTraining::analyze(), ncs::NCAna::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), chaninfo::BadChanList::Apply(), cheat::CheckBackTracking::CheckPurityAndEfficiency(), bpfit::dEdxCalculator::computeDEDX(), skim::SkimmingUtils::CopyProngs(), skim::SkimmingUtils::CopyShowers(), skim::SkimmingUtils::CopySlice(), skim::SkimmingUtils::CopyTracks(), art::View< T >::fill(), novaddt::DDTTrackMerge::filter(), novaddt::HoughTracker::filter(), chaninfo::FindSwappedChannels::filter(), novaddt::Merge2DTracks::filter(), mono::MonopoleCluster::find_isolated_hits(), fuzz::FuzzyKVertex::FindOrphanedHits(), nerd::NERDProng::FindOrphanedHits(), bpfit::DimuonFitter::FindSlices(), trident::DimuonSliceFilter::FindSlices(), bpfit::BreakPoint::FindSlices(), tut::TutProducer::FitPhoton(), bpfit::dEdxCalculator::getCellHits(), evd::RawDataDrawer::GetRawTrigger(), cvn::HitClassify(), cvn::HitNuIndex(), cvn::HitObject(), dt::Chunk::HitsOnLine(), novaddt::HorizontalMuonAna::IsHorzMuonTrack(), dt::View::MakeChunkCombos(), evtsum::EventSummary::MakeOutput(), trk::CosmicTrackAlg::MakeTrack(), evd::SliceNavigator::postProcessEvent(), cvntf::CVNTF::produce(), util::TruthExpand::produce(), cheat::ClusterCheater::produce(), cheat::ProngCheater::produce(), cheat::ShowerCheater::produce(), trk::KalmanTrack::produce(), cheat::TrackCheater::produce(), demo::DemoModule::produce(), regcvntf::RegCVNTF::produce(), trk::KalmanTrackMerge::produce(), novaddt::TrackFit::produce(), jmshower::JMTrackMerge::produce(), nuonecvntf::NuonECVNTF::produce(), slid::SliceLIDBuilder::produce(), cvneventtf::CVNEventTF::produce(), cvnprongtf::CVNProngTF::produce(), cvnneutronprongtf::CVNNeutronProngTF::produce(), dt::ViewMerger::produce(), dt::DiscreteTracker::produce(), photrans::PhotonTransport::produce(), jmshower::JMClusterMerge::produce(), cvn::CVNMapper::produce(), slid::LIDBuilder::produce(), cvntf::CVNProngEvaluatorTF::produce(), cvn::RegCVNMapper::produce(), slid::SPIDBuilder::produce(), ncid::MakeNCCosRej::produce(), bpfit::BPFEnergyEstimator::produce(), bpfit::BPFEnergyEstimatorOnly::produce(), bpfit::BPFPIdMaker::produce(), remid::RecoMuon::produce(), cvn::CVNAddTrainingData::produce(), murem::MergeDigits::produce(), upmuana::UpMuProb::produce(), murem::MuonRemove::produce(), murem::FindMREParent::produce(), murem::FindParent::produce(), fuzz::FuzzyKVertex::produce(), caf::CAFMaker::produce(), jmshower::RecoJMShower::RecoShowers(), hough::MultiHoughT::Scrub(), earms::ElasticArmsHS::Scrub(), vdt::VertexDT::Scrub(), fuzz::FuzzyKVertex::Scrub(), and skim::SkimmingUtils::SliceMCTruthAssociation().

436 {
437  // Ensure that types are compatible.
438  static_assert(std::is_same_v<T, U> || std::is_base_of_v<T, U> ||
439  std::is_base_of_v<U, T>,
440  "PtrVector: incompatible types");
441  updateCore(p.refCore());
442  ptrs_.push_back(p);
443 }
const char * p
Definition: xmltok.h:285
data_t ptrs_
Definition: PtrVector.h:151
void updateCore(RefCore const &core)
template<typename T >
auto art::PtrVector< T >::rbegin ( )
inline

Definition at line 245 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

246 {
247  return ptrs_.rbegin();
248 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::rbegin ( ) const
inline

Definition at line 252 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

253 {
254  return ptrs_.rbegin();
255 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::rend ( )
inline

Definition at line 259 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

260 {
261  return ptrs_.rend();
262 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::rend ( ) const
inline

Definition at line 266 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

267 {
268  return ptrs_.rend();
269 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::reserve ( size_type  n)
inline

Definition at line 337 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by art::PtrRemapper::operator()(), and trk::KalmanTrack::produce().

338 {
339  ptrs_.reserve(n);
340 }
std::void_t< T > n
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::resize ( size_type  n)
inline

Definition at line 316 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

317 {
318  ptrs_.resize(n);
319 }
std::void_t< T > n
data_t ptrs_
Definition: PtrVector.h:151
void art::PtrVectorBase::setProductGetter ( EDProductGetter const *  g)
inlinenoexceptinherited

Definition at line 92 of file PtrVectorBase.h.

References MECModelEnuComparisons::g.

93 {
95 }
void setProductGetter(EDProductGetter const *) noexcept
template<typename T >
void art::PtrVector< T >::shrink_to_fit ( )
inline

Definition at line 344 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

345 {
346  ptrs_.shrink_to_fit();
347 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
auto art::PtrVector< T >::size ( void  ) const
inline

Definition at line 302 of file PtrVector.h.

References art::PtrVector< T >::ptrs_.

Referenced by rb::HitMap::Add(), rb::Cluster::Add(), rb::Cluster::AllCells(), dt::Chain::AllHits(), dt::Cand::AllHits(), validation::ValidateDAQ2RawDigit::analyze(), remid::ReMIdValidate::analyze(), mcchk::CloseInTime::analyze(), tut::RecoValidationTutorial::analyze(), remid::ReMIdTrain::analyze(), numue::NumuEAna::analyze(), murem::MuonRemoveAna::analyze(), slicer::IdenticalSlicerAna::analyze(), comi::DataCheck::analyze(), calib::HitEfficiency::analyze(), remid::ReMIdDedx::analyze(), tbem::TBRecoAna::analyze(), trk::KalmanTrackAna::analyze(), earms::ElasticArmsValidate::analyze(), remid::ReMIdDedxRock::analyze(), ncpi0::TwoProngBDTAna::analyze(), fuzz::FuzzyKValidate::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), bpfit::BreakPointProtonAna::analyze(), air::AirKalmanAna::analyze(), slid::LIDTraining::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), chaninfo::BadChanList::Apply(), trk::KalmanTrackAna::CheckAssociations(), air::AirKalmanAna::CheckAssociations(), dt::Cand::ClosestToEndCell(), rb::Cluster::Cluster(), bpfit::dEdxCalculator::computeDEDX(), skim::SkimmingUtils::CopyProngs(), skim::SkimmingUtils::CopyShowers(), skim::SkimmingUtils::CopyTracks(), rb::Cluster::EnsureWeightAlloc(), caf::FillParticleTruth(), chaninfo::FindSwappedChannels::filter(), trident::DimuonSliceFilter::filter(), fuzz::FuzzyKVertex::FindOrphanedHits(), nerd::NERDProng::FindOrphanedHits(), bpfit::DimuonFitter::FindSlices(), trident::DimuonSliceFilter::FindSlices(), trk::KalmanTrackAna::FindVisibleProngs(), cheat::RecoCheckAna::FindVisibleProngs(), fuzz::FuzzyKValidate::FindVisibleProngs3D(), fuzz::FuzzyKVertex::FindVisibleProngs3D(), cosrej::CosRejFxs::getActivity(), numusand::NumuSandFxs::getActivityVtx(), nuesand::FillNueSandbox::GetdEdx(), slid::NuEEnergyAlg::GetHitShowerMap(), nnbar::NNbarUtilities::getMultipleCellFraction(), nuesand::FillNueSandbox::GetPlaneEnergy(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), evd::RawDataDrawer::GetRawTrigger(), nnbar::NNbarUtilities::getSliceBoundary(), nnbar::NNbarUtilities::getSliceTimeWindow(), ndreco::NDRecoFxs::getTrackActivity(), ndreco::NDRecoFxs::getTrackDedx(), nnbar::NNbarUtilities::getXyAsymmetry(), dt::Chunk::HitsOnLine(), rb::Cluster::Is3D(), nnbar::NNbarUtilities::isFebFlasher(), novaddt::HorizontalMuonAna::IsHorzMuonTrack(), evtsum::EventSummary::MakeOutput(), trk::CosmicTrackAlg::MakeTrack(), numue::NumuEAlg::MakeVertexCluster(), zcl::SMMCluster::MissC(), dq::FlasherFinder::Nflash(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), art::PtrRemapper::operator()(), dt::Cand::operator<(), cheat::BackTracker::PassMuonCuts(), cvntf::CVNTF::produce(), trk::TrkAssn::produce(), cheat::ClusterCheater::produce(), trk::KalmanTrack::produce(), demo::DemoModule::produce(), regcvntf::RegCVNTF::produce(), trk::KalmanTrackMerge::produce(), numusand::FillSandbox::produce(), nuonecvntf::NuonECVNTF::produce(), slid::SliceLIDBuilder::produce(), cvneventtf::CVNEventTF::produce(), cosrej::CosRej::produce(), cvnneutronprongtf::CVNNeutronProngTF::produce(), cvnprongtf::CVNProngTF::produce(), dt::ViewMerger::produce(), zcl::SMMCluster::produce(), jmshower::JMClusterMerge::produce(), zcl::FMMTracker::produce(), cvn::CVNMapper::produce(), slid::LIDBuilder::produce(), cvn::RegCVNMapper::produce(), slid::SPIDBuilder::produce(), remid::RecoMuon::produce(), murem::MergeDigits::produce(), upmuana::UpMuProb::produce(), murem::MuonRemove::produce(), murem::FindMREParent::produce(), bpfit::DimuonFitter::produce(), bpfit::BreakPoint::produce(), caf::PtrVecToVec(), cheat::BackTracker::PtrVecToVecRawPtr(), dt::DiscreteTracker::RecoDiscrete(), jmshower::RecoJMShower::RecoShowers(), hough::MultiHoughT::Scrub(), earms::ElasticArmsHS::Scrub(), vdt::VertexDT::Scrub(), fuzz::FuzzyKVertex::Scrub(), rb::Cluster::SetWeight(), skim::NumuCCpiSkimmer::Skim(), skim::NumuSkimmer::Skim(), cosrej::MakeNueCosRej::SparsenessAsymmetry(), zcl::FMMTracker::Tracking2D(), dt::Chain::TrimEnds(), slid::NuEEnergyAlg::VertexEnergy(), dt::View::View(), moonshadowana::MoonShadowAna::WriteHitListInfo(), moonshadowana::MoonShadowAnaHough::WriteHitListInfo(), rb::Cluster::XCell(), and rb::Cluster::YCell().

303 {
304  return ptrs_.size();
305 }
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::sort ( )
inline

Definition at line 548 of file PtrVector.h.

Referenced by trk::WindowTrackingAlg::MakeTrack().

549 {
550  sort(std::less<T>{});
551 }
template<typename T >
template<class Comp >
void art::PtrVector< T >::sort ( Comp  comp)
inline

Definition at line 556 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, and cet::sort_all().

557 {
558  cet::sort_all(ptrs_, ComparePtrs{comp});
559 }
void sort_all(RandCont &)
data_t ptrs_
Definition: PtrVector.h:151
void art::PtrVectorBase::swap ( PtrVectorBase other)
inlineprotectedinherited

Definition at line 112 of file PtrVectorBase.h.

References art::PtrVectorBase::core_.

Referenced by art::PtrVector< T >::swap().

113 {
114  core_.swap(other.core_);
115 }
void swap(RefCore &other)
template<typename T >
void art::PtrVector< T >::swap ( PtrVector< T > &  other)
inline

Definition at line 518 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, and art::PtrVectorBase::swap().

Referenced by chaninfo::BadChanList::Apply(), evd::RawDataDrawer::GetRawTrigger(), and art::swap().

519 {
520  ptrs_.swap(other.ptrs_);
522 }
void swap(PtrVectorBase &)
data_t ptrs_
Definition: PtrVector.h:151
template<typename T >
void art::PtrVector< T >::swap ( key_type  k1,
key_type  k2 
)
inline

Definition at line 526 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, and art::swap().

527 {
528  std::swap(ptrs_[k1], ptrs_[k2]);
529 }
void swap(PtrVector< T > &, PtrVector< T > &)
Definition: PtrVector.h:595
data_t ptrs_
Definition: PtrVector.h:151
void art::PtrVectorBase::updateCore ( RefCore const &  core)
protectedinherited
template<typename T >
void art::PtrVector< T >::zeroTransients ( )
inlineoverrideprivatevirtual

Implements art::PtrVectorBase.

Definition at line 587 of file PtrVector.h.

References art::PtrVector< T >::ptrs_, and tmp.

588 {
589  data_t tmp;
590  ptrs_.swap(tmp);
591 }
Float_t tmp
Definition: plot.C:36
std::vector< Ptr< T >> data_t
Definition: PtrVector.h:45
data_t ptrs_
Definition: PtrVector.h:151

Member Data Documentation

template<typename T>
data_t art::PtrVector< T >::ptrs_ {}
mutableprivate

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