|
CbmRoot
|
#include <CaVector.h>
Public Types | |
| using | Tbase = std::vector<T> |
| using | value_type = T |
| using | allocator_type = typename Tbase::allocator_type |
| using | pointer = typename std::allocator_traits<allocator_type>::pointer |
| using | const_pointer = typename std::allocator_traits<allocator_type>::const_pointer |
| using | reference = value_type& |
| using | const_reference = const value_type& |
| using | size_type = typename Tbase::size_type |
| using | difference_type = typename Tbase::difference_type |
| using | iterator = typename Tbase::iterator |
| using | const_iterator = typename Tbase::const_iterator |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
Public Member Functions | |
| template<typename... Tinput> | |
| Vector (Tinput... value) | |
| Generic constructor from vairadic parameter list. | |
| template<typename... Tinput> | |
| Vector (const char *name, Tinput... value) | |
| Generic constructor from vairadic parameter list including the name of the vector. | |
| Vector (const std::string &name, std::initializer_list< T > init) | |
| Constructor to make initializations like ca::Vector<int> myVector {"MyVector", {1, 2, 3}}. | |
| Vector (const Vector &v) | |
| Copy constructor. | |
| Vector (Vector &&v) noexcept | |
| Move constructor. | |
| Vector & | operator= (const Vector &v) |
| Copy assignment operator. | |
| Vector & | operator= (Vector &&v) noexcept |
| Move assignment operator. | |
| void | swap (Vector &v) noexcept |
| Swap operator. | |
| void | SetName (const std::string &s) |
| Sets the name of the vector. | |
| void | SetName (const std::basic_ostream< char > &s) |
| Sets the name of the vector. | |
| std::string | GetName () const |
| Gets name of the vector. | |
| template<typename... Tinput> | |
| void | reset (std::size_t count, Tinput... value) |
| Clears vector and resizes it to the selected size with selected values. | |
| template<typename... Tinput> | |
| void | enlarge (std::size_t count, Tinput... value) |
| Enlarges the vector to the new size. | |
| void | shrink (std::size_t count) |
| Reduces the vector to a given size. | |
| void | reserve (std::size_t count) |
| Reserves a new size for the vector. | |
| template<typename Tinput> | |
| void | push_back (Tinput value) |
| Pushes back a value to the vector. | |
| template<typename Tinput> | |
| void | push_back_no_warning (Tinput value) |
| Pushes back a value to the vector without testing for the memory re-alocation. | |
| template<typename... Tinput> | |
| void | emplace_back (Tinput &&... value) |
| Creates a parameter in the end of the vector. | |
| T & | operator[] (std::size_t pos) |
| Mutable access to the element by its index. | |
| const T & | operator[] (std::size_t pos) const |
| Constant access to the element by its index. | |
| T & | back () |
| Mutable access to the last element of the vector. | |
| const T & | back () const |
| Constant access to the last element of the vector. | |
Private Member Functions | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int) |
| Serialization function for the vector. | |
Private Attributes | |
| std::string | fName {"no name"} |
| Name of the vector. | |
Friends | |
| class | boost::serialization::access |
ca::Vector class is a wrapper around std::vector. It does the following:
Definition at line 39 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::allocator_type = typename Tbase::allocator_type |
Definition at line 45 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::const_iterator = typename Tbase::const_iterator |
Definition at line 53 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::const_pointer = typename std::allocator_traits<allocator_type>::const_pointer |
Definition at line 47 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::const_reference = const value_type& |
Definition at line 49 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 55 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::difference_type = typename Tbase::difference_type |
Definition at line 51 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::iterator = typename Tbase::iterator |
Definition at line 52 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::pointer = typename std::allocator_traits<allocator_type>::pointer |
Definition at line 46 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::reference = value_type& |
Definition at line 48 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 54 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::size_type = typename Tbase::size_type |
Definition at line 50 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::Tbase = std::vector<T> |
Definition at line 43 of file CaVector.h.
| using cbm::algo::ca::Vector< T >::value_type = T |
Definition at line 44 of file CaVector.h.
|
inline |
Generic constructor from vairadic parameter list.
Definition at line 60 of file CaVector.h.
|
inline |
Generic constructor from vairadic parameter list including the name of the vector.
Definition at line 66 of file CaVector.h.
|
inline |
Constructor to make initializations like ca::Vector<int> myVector {"MyVector", {1, 2, 3}}.
Definition at line 72 of file CaVector.h.
|
inline |
Copy constructor.
Definition at line 75 of file CaVector.h.
|
inlinenoexcept |
Move constructor.
Definition at line 78 of file CaVector.h.
|
inline |
Mutable access to the last element of the vector.
Definition at line 244 of file CaVector.h.
|
inline |
Constant access to the last element of the vector.
Definition at line 254 of file CaVector.h.
|
inline |
Creates a parameter in the end of the vector.
| value | Variadic list of the parameters, which are passed to the element constructor |
Definition at line 210 of file CaVector.h.
Referenced by cbm::algo::ca::TripletConstructorSW::FitTriplets(), and cbm::algo::ca::TripletConstructor::SelectTriplets().
|
inline |
Enlarges the vector to the new size.
| count | New size of the vector |
| value | Value of the new elements |
Definition at line 147 of file CaVector.h.
Referenced by cbm::algo::ca::TrackExtender::FindMoreHits().
|
inline |
Gets name of the vector.
Definition at line 124 of file CaVector.h.
|
inline |
Copy assignment operator.
Definition at line 81 of file CaVector.h.
|
inlinenoexcept |
Move assignment operator.
Definition at line 92 of file CaVector.h.
|
inline |
Mutable access to the element by its index.
| pos | Index of the element |
Definition at line 221 of file CaVector.h.
|
inline |
Constant access to the element by its index.
| pos | Index of the element |
Definition at line 233 of file CaVector.h.
|
inline |
Pushes back a value to the vector.
| value | New value |
Definition at line 190 of file CaVector.h.
Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), cbm::algo::ca::TripletConstructorSW::CollectHits(), CbmL1RichENNRingFinderParallel::ENNRingFinder(), cbm::algo::ca::TripletConstructor::FindTripletHits(), cbm::algo::ca::TripletConstructorSW::FindTripletHits(), and cbm::algo::TrackingChain::PrepareOutput().
|
inline |
Pushes back a value to the vector without testing for the memory re-alocation.
| value | New value |
Definition at line 202 of file CaVector.h.
|
inline |
Reserves a new size for the vector.
| count | New size of the vector |
Definition at line 176 of file CaVector.h.
Referenced by cbm::algo::ca::TripletConstructor::CollectHits(), cbm::algo::ca::TripletConstructorSW::CollectHits(), CbmL1RichENNRingFinderParallel::ENNRingFinder(), cbm::algo::ca::TrackExtender::FindMoreHits(), cbm::algo::ca::TrackFinder::FindTracks(), cbm::algo::ca::TripletConstructor::FindTripletHits(), cbm::algo::ca::TripletConstructorSW::FindTripletHits(), and cbm::algo::ca::TripletConstructor::SelectTriplets().
|
inline |
Clears vector and resizes it to the selected size with selected values.
| count | New size of the vector |
| value | Variadic list of the parameters to pass to the base std::vector::resize function |
Definition at line 135 of file CaVector.h.
Referenced by CbmL1RichENNRingFinderParallel::DoFind(), CbmL1RichENNRingFinderParallel::ENNRingFinder(), cbm::algo::ca::CloneMerger::Exec(), and cbm::algo::TrackingChain::PrepareOutput().
|
inlineprivate |
Serialization function for the vector.
Definition at line 285 of file CaVector.h.
|
inline |
Sets the name of the vector.
| s | Name of the vector (string stream) |
Definition at line 116 of file CaVector.h.
|
inline |
Sets the name of the vector.
| s | Name of the vector |
Definition at line 112 of file CaVector.h.
|
inline |
Reduces the vector to a given size.
| count | Size of the new vector |
Definition at line 164 of file CaVector.h.
Referenced by cbm::algo::ca::TripletConstructor::FindDoublets(), and cbm::algo::ca::TripletConstructorSW::SuppressDoubletClones().
|
inlinenoexcept |
Swap operator.
Definition at line 102 of file CaVector.h.
|
friend |
Definition at line 40 of file CaVector.h.
|
private |
Name of the vector.
Definition at line 278 of file CaVector.h.