LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::detail::TwoArgInsert< cet::map_vector< T > > Struct Template Reference

#include "CollectionUtilities.h"

Public Types

using mv_t = cet::map_vector< T >
 

Static Public Member Functions

static void concatenate (mv_t &out, mv_t in)
 

Detailed Description

template<typename T>
struct art::detail::TwoArgInsert< cet::map_vector< T > >

Definition at line 194 of file CollectionUtilities.h.

Member Typedef Documentation

template<typename T >
using art::detail::TwoArgInsert< cet::map_vector< T > >::mv_t = cet::map_vector<T>

Definition at line 195 of file CollectionUtilities.h.

Member Function Documentation

template<typename T >
static void art::detail::TwoArgInsert< cet::map_vector< T > >::concatenate ( mv_t out,
mv_t  in 
)
inlinestatic

Definition at line 197 of file CollectionUtilities.h.

References d, and art::detail::mix_offset< C >::offset().

198  {
199  // The offset is necessary for concatenating map_vectors so
200  // that all elements will be preserved.
201  auto const d = detail::mix_offset<mv_t>::offset(out);
202  for (auto& pr : in) {
203  pr.first = cet::map_vector_key{pr.first.asInt() + d};
204  }
205  // Because we can guarantee that entries will not overlap due
206  // to using the offset above, we do not need to call
207  // out.insert(...), which will unnecessarily merge entries.
208  // It is the user's responsibility to ensure that the
209  // map_vector entries are properly sorted.
210  out.append(in.begin(), in.end());
211  }
static size_t offset(C const &c)
Float_t d
Definition: plot.C:235
ifstream in
Definition: comparison.C:7

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