| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

VectorMap.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDIKERNEL_VECTORMAP_H
3 #define GAUDIKERNEL_VECTORMAP_H 1
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <utility>
10 #include <functional>
11 #include <vector>
12 #include <algorithm>
13 #include <ostream>
14 #include <initializer_list>
15 // ============================================================================
16 // GaudiKernel
17 // ============================================================================
18 #include "GaudiKernel/MapBase.h"
19
20 // For parsers
21 #include "GaudiKernel/StatusCode.h"
22 #include "GaudiKernel/StringKey.h"
23 // ============================================================================
24 namespace GaudiUtils
25 {
26 // ==========================================================================
101 template
102 <
103 class KEY ,
104 class VALUE ,
105 class KEYCOMPARE=std::less<const KEY> ,
106 class ALLOCATOR=std::allocator<std::pair<KEY,VALUE> >
107 >
108 class VectorMap : public Gaudi::Utils::MapBase
109 {
110 public:
111 // ========================================================================
113 typedef KEY key_type ;
115 typedef VALUE mapped_type ;
117 typedef KEYCOMPARE key_compare ;
119 typedef std::pair<key_type,mapped_type> value_type ;
120 // ========================================================================
121 public:
122 // ========================================================================
124 typedef ALLOCATOR allocator_type ;
126 typedef typename ALLOCATOR::const_reference reference ;
128 typedef typename ALLOCATOR::const_reference const_reference ;
130 typedef typename ALLOCATOR::size_type size_type ;
132 typedef typename ALLOCATOR::difference_type difference_type ;
133 // ========================================================================
134 public:
135 // ========================================================================
137 typedef std::vector<value_type,allocator_type> _vector ;
138 // ========================================================================
139 protected:
140 // ========================================================================
142 typedef typename _vector::iterator _iterator ;
143 // ========================================================================
144 public:
145 // ========================================================================
147 typedef typename _vector::const_iterator iterator ;
149 typedef typename _vector::const_iterator const_iterator ;
151 typedef std::reverse_iterator<iterator> reverse_iterator ;
153 typedef std::reverse_iterator<const_iterator> const_reverse_iterator ;
155 typedef std::pair<iterator,iterator> iterators ;
157 typedef std::pair<iterator,bool> result_type ;
158 // ========================================================================
159 public:
160 // ========================================================================
165 struct _compare_type : public key_compare
166 {
167 public:
168 // ======================================================================
170 _compare_type ( const key_compare& cmp ) : key_compare ( cmp ) {}
172 _compare_type () : key_compare ( ) {}
174 bool operator () ( const key_type& k1 , const key_type& k2 ) const
175 { return this->key_compare::operator() ( k1 , k2 ) ; }
177 bool operator() ( const value_type& v1 , const value_type& v2 ) const
178 { return operator() ( v1.first, v2.first ); }
180 bool operator() ( const key_type& k , const value_type& v ) const
181 { return operator() ( k , v.first ) ; }
183 bool operator() ( const value_type& v , const key_type & k ) const
184 { return operator() ( v.first , k ) ; }
185 // ======================================================================
186 };
187 // ========================================================================
189 typedef _compare_type compare_type ;
190 // ========================================================================
191 public:
192 // ========================================================================
193 // sequential access (only const-versions!)
194 // ========================================================================
196 iterator begin () const { return m_vct . begin () ; }
198 iterator end () const { return m_vct . end () ; }
200 reverse_iterator rbegin () const { return m_vct . rbegin () ; }
202 reverse_iterator rend () const { return m_vct . rend () ; }
203 // ========================================================================
204 // list operations : erase & insert
205 // ========================================================================
209 void erase ( iterator pos ) { m_vct.erase ( iter ( pos ) ) ; }
210 // ========================================================================
227 size_type erase ( const key_type& key )
228 {
229 iterator pos = find ( key ) ;
230 if ( end() == pos ) { return 0 ; }
231 erase ( pos ) ;
232 return 1 ;
233 }
234 // ========================================================================
240 size_type erase ( iterator first ,
241 iterator last )
242 {
243 m_vct.erase ( iter ( first ) , iter ( last ) ) ;
244 return last - first ;
245 }
246 // ========================================================================
267 template <class TYPE>
268 size_type erase ( TYPE first , TYPE last )
269 {
270 size_type res = 0 ;
271 for ( ; first != last ; ++first ) { res += erase ( *first ) ; }
272 return res ;
273 }
274 // ========================================================================
316 result_type insert
317 ( const key_type& key ,
318 const mapped_type& mapped )
319 { return insert ( value_type ( key , mapped ) ) ; }
320 // ========================================================================
361 result_type insert
362 ( const value_type& value )
363 {
364 bool found = true ;
365 _iterator result = lower_bound ( value.first ) ;
366 if ( end() == result || compare( value.first , result -> first ) )
367 { result = m_vct.insert ( result , value ) ; found = false ; }
368 return result_type ( iter ( result ) , !found ) ;
369 }
370 // ========================================================================
379 result_type insert
380 ( iterator pos ,
381 const value_type& value )
382 {
383 if ( pos != end() && compare ( *pos , value ) &&
384 ( pos == end() - 1 ||
385 ( !compare ( value , *( pos + 1 ) )
386 && compare ( *( pos + 1 ) , value ) ) ) )
387 { return result_type( m_vct.insert ( iter ( pos ) , value ) , true ) ; }
388 return insert ( value ) ;
389 }
390 // ========================================================================
400 result_type insert
401 ( iterator pos ,
402 const key_type& key ,
403 const mapped_type& mapped )
404 { return insert ( pos , value_type ( key , mapped ) ) ; }
405 // ========================================================================
411 template <class PAIRS>
412 void insert
413 ( PAIRS first ,
414 PAIRS last )
415 { for ( ; first != last ; ++first ) { insert ( *first ) ; } }
416 // ========================================================================
424 template <class KEYS, class VALUES> void insert
425 ( KEYS kf ,
426 KEYS kl ,
427 VALUES vf )
428 { for ( ; kf != kl ; ++kf, ++vf ) { insert ( *kf , *vf ) ; } }
429 // ========================================================================
430 // map operations: lookup, count, ...
431 // ========================================================================
455 iterator find ( const key_type& key ) const
456 {
457 iterator res = lower_bound ( key ) ;
458 if ( end() != res && compare ( key , res->first ) )
459 { res = end(); }
460 return res ;
461 }
462 // ========================================================================
478 size_type count ( const key_type& key ) const
479 { return end() == find ( key ) ? 0 : 1 ; }
480 // ========================================================================
481 iterator lower_bound ( const key_type& key ) const
482 { return std::lower_bound ( begin () , end () , key , compare () ) ; }
483 iterator upper_bound ( const key_type& key ) const
484 { return std::upper_bound ( begin () , end () , key , compare () ) ; }
485 iterators equal_range ( const key_type& key ) const
486 { return std::equal_range ( begin () , end () , key , compare () ) ; }
487 // ========================================================================
488 // general container operations :
489 // ========================================================================
491 bool empty () const { return m_vct . empty () ; }
493 size_type size () const { return m_vct . size () ; }
495 size_type max_size () const { return m_vct . max_size () ; }
497 void clear () { m_vct.clear () ; }
499 void reserve ( size_type num ) { m_vct.reserve ( num ) ; }
500 // ========================================================================
502 void swap ( VectorMap& other )
503 {
504 std::swap ( m_vct , other.m_vct ) ;
505 }
506 // ========================================================================
507 // The basic comparison operators for container
508 // ========================================================================
510 bool operator== ( const VectorMap& other ) const
511 { return m_vct == other.m_vct ; }
513 bool operator< ( const VectorMap& other ) const
514 { return m_vct < other.m_vct ; }
515 // ========================================================================
516 // The derived comparison operators for container
517 // ========================================================================
518 friend bool operator> ( const VectorMap& left ,
519 const VectorMap& right )
520 { return right < left ; }
521 friend bool operator!= ( const VectorMap& left ,
522 const VectorMap& right )
523 { return !( left == right ) ; }
524 friend bool operator>= ( const VectorMap& left ,
525 const VectorMap& right )
526 { return !( left < right ) ; }
527 friend bool operator<= ( const VectorMap& left ,
528 const VectorMap& right )
529 { return !( right < left ) ; }
530 // ========================================================================
560 bool update
561 ( const key_type& key ,
562 const mapped_type& mapped )
563 {
564 _iterator result = lower_bound ( key ) ;
565 if ( end() == result || compare ( key , result -> first ) )
566 {
567 result = m_vct.insert ( result , value_type(key,mapped) ) ;
568 return false ;
569 }
570 else { result->second = mapped ; }
571 //
572 return true ;
573 }
574 // ========================================================================
603 bool update ( const value_type& val )
604 { return update ( val.first , val.second ) ; }
605 // ========================================================================
637 const mapped_type& operator() ( const key_type& key ) const
638 {
639 static const mapped_type s_default = mapped_type() ;
640 iterator res = find ( key ) ;
641 if ( end() == res ) { return s_default ; }
642 return res->second ;
643 }
644 // ========================================================================
675 const mapped_type& operator[] ( const key_type& key ) const
676 { return (*this)( key ) ; }
677 // ========================================================================
695 const mapped_type& at ( const key_type& key ) const
696 {
697 iterator res = find ( key ) ;
698 if ( end() == res ) { this->throw_out_of_range_exception () ; }
699 return res->second ;
700 }
701 // ========================================================================
702 public:
703 // ========================================================================
704 // Constructors, destructors, etc.
705 // ========================================================================
710 VectorMap ( const allocator_type& alloc = allocator_type () )
711 : m_vct ( alloc )
712 {}
713 // ========================================================================
717 VectorMap ( const VectorMap& right )
718 : Gaudi::Utils::MapBase(right), m_vct ( right.m_vct )
719 {}
720 // ========================================================================
727 template <class INPUT>
728 VectorMap ( INPUT first ,
729 INPUT last ,
730 const allocator_type& alloc = allocator_type () )
731 : m_vct ( first , last , alloc )
732 { std::sort ( m_vct.begin(), m_vct.end(), compare() ) ; }
733 // ========================================================================
739 VectorMap ( std::initializer_list<value_type> first ,
740 const allocator_type& alloc = allocator_type () )
741 : m_vct ( first , alloc )
742 { std::sort ( m_vct.begin(), m_vct.end(), compare() ) ; }
743 // ========================================================================
745 ~VectorMap() { clear() ; } // destructor (non-virtual!)
746 // ========================================================================
747 /* assignement operator
748 * @param rigth object to be assigned
749 * @return self
750 */
751 VectorMap& operator= ( const VectorMap& right )
752 {
753 if ( &right == this ) { return *this ; }
754 m_vct = right.m_vct ;
755 return *this ;
756 }
757 // ========================================================================
758 public:
759 // ========================================================================
760 // The specific public accessors
761 // ========================================================================
763 const compare_type& compare () const
764 {
765 static const compare_type s_cmp = compare_type() ;
766 return s_cmp ;
767 }
769 const key_compare& compare_key () const { return compare() ; }
771 friend std::ostream& operator<<
772 ( std::ostream& str , const VectorMap& /* obj */) { return str ; }
773 // ========================================================================
774 public:
775 // ========================================================================
777 inline VectorMap& merge ( const VectorMap& right )
778 {
779 for ( const auto& i : right ) { update ( i.first , i.second ) ; }
780 return *this ;
781 }
783 template <class K1,class K2, class K3,class K4>
784 inline VectorMap& merge ( const VectorMap<K1,K2,K3,K4>& right )
785 {
786 for ( const auto& i : right ) { update ( i.first , i.second ) ; }
787 return *this ;
788 }
789 // ========================================================================
790 public:
791 // ========================================================================
797 const key_type& key_at ( const size_t index ) const
798 {
799 if ( index >= size() )
800 { this->throw_out_of_range_exception () ; }
801 auto it = this->begin() ;
802 std::advance ( it , index ) ;
803 return it -> first ;
804 }
810 const mapped_type& value_at ( const size_t index ) const
811 {
812 if ( index >= size() )
813 { this->throw_out_of_range_exception () ; }
814 auto it = this->begin() ;
815 std::advance ( it , index ) ;
816 return it -> second ;
817 }
818 // ========================================================================
819 protected:
820 // ========================================================================
821 // Pure technical helper functions
822 // ========================================================================
828 template <class TYPE1, class TYPE2>
829 bool compare ( const TYPE1& obj1 ,
830 const TYPE2& obj2 ) const
831 {
832 return compare() ( obj1 , obj2 ) ;
833 }
834 // ========================================================================
836 _iterator lower_bound ( const key_type& key )
837 {
838 return std::lower_bound
839 ( m_vct.begin() , m_vct.end() , key , compare() ) ;
840 }
841 // ========================================================================
843 _iterator iter ( iterator p )
844 {
845 auto result = m_vct.begin() ;
846 std::advance ( result , std::distance ( begin() , p ) ) ;
847 return result ;
848 }
849 // ========================================================================
851 iterator iter ( _iterator p )
852 {
853 auto result = begin();
854 std::advance ( result , std::distance ( m_vct.begin() , p ) ) ;
855 return result ;
856 }
857 // ========================================================================
858 private:
859 // ========================================================================
861 _vector m_vct ; // the underlying sorted vector of (key,mapped) pairs
862 // ========================================================================
863 };
864 // ==========================================================================
865 } // end of namespace GaudiUtils
866 // ============================================================================
867 namespace std
868 {
869 // ==========================================================================
874 template
875 < class KEY ,
876 class VALUE ,
877 class KEYCOMPARE ,
878 class ALLOCATOR >
879 inline void swap
880 ( GaudiUtils::VectorMap<KEY,VALUE,KEYCOMPARE,ALLOCATOR>& left ,
881 GaudiUtils::VectorMap<KEY,VALUE,KEYCOMPARE,ALLOCATOR>& right )
882 { left.swap( right ) ; }
883 // ===========================================================================
884 } // end of namespace std
885 // ============================================================================
886 // ============================================================================
887 namespace Gaudi
888 {
889 // ==========================================================================
890 namespace Parsers
891 {
892 // ========================================================================
902 GAUDI_API StatusCode parse
903 ( GaudiUtils::VectorMap<std::string, double>& result ,
904 const std::string& input ) ;
905 // ========================================================================
916 GAUDI_API StatusCode parse
917 ( GaudiUtils::VectorMap<Gaudi::StringKey, double>& result ,
918 const std::string& input ) ;
919 // ========================================================================
920 } // end of namespace Gaudi::Parsers
921 // ==========================================================================
922 } // end of namespace Gaudi
923
924
925 // ============================================================================
926 // The END
927 // ============================================================================
928 #endif // GAUDIKERNEL_MAPS_H
929 // ============================================================================
GaudiUtils::VectorMap::operator[]
const mapped_type & operator[](const key_type &key) const
access to element by key (const version) there is no container increment for missing keys ...
Definition: VectorMap.h:675
GaudiUtils::VectorMap
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Definition: VectorMap.h:108
GaudiUtils::VectorMap::operator!=
friend bool operator!=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:521
GaudiUtils::VectorMap::operator==
bool operator==(const VectorMap &other) const
comparison criteria for containers
Definition: VectorMap.h:510
std::distance
T distance(T...args)
GaudiUtils::VectorMap::at
const mapped_type & at(const key_type &key) const
checked access to elements by key throw std::out_of_range exception for non-existing keys ...
Definition: VectorMap.h:695
GaudiUtils::VectorMap::operator()
const mapped_type & operator()(const key_type &key) const
access to element by key (const version) there is no container increment for missing keys ...
Definition: VectorMap.h:637
GaudiUtils::VectorMap::~VectorMap
~VectorMap()
destructor (non-virtual!)
Definition: VectorMap.h:745
GaudiUtils::VectorMap::iter
iterator iter(_iterator p)
the conversion from 'non-const' to 'const' iterator
Definition: VectorMap.h:851
std::swap
T swap(T...args)
GaudiUtils::VectorMap::reserve
void reserve(size_type num)
reserve the space in the container for at least 'num' elements
Definition: VectorMap.h:499
GaudiUtils::VectorMap::compare
bool compare(const TYPE1 &obj1, const TYPE2 &obj2) const
compare the objects using the comaprison criteria
Definition: VectorMap.h:829
std::advance
T advance(T...args)
std::upper_bound
T upper_bound(T...args)
GaudiUtils::VectorMap::_iterator
_vector::iterator _iterator
the regular iterator (no export)
Definition: VectorMap.h:142
std::left
T left(T...args)
GaudiUtils::VectorMap::key_at
const key_type & key_at(const size_t index) const
useful method for python decoration:
Definition: VectorMap.h:797
std
STL namespace.
std::allocator
STL class.
GaudiUtils::VectorMap::iterator
_vector::const_iterator iterator
visible const_iterator (exported)
Definition: VectorMap.h:147
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:11
GaudiUtils::VectorMap::erase
size_type erase(TYPE first, TYPE last)
erase the sequence of elements using the sequence of keys
Definition: VectorMap.h:268
std::vector::end
T end(T...args)
GaudiUtils::VectorMap::_compare_type::operator()
bool operator()(const key_type &k1, const key_type &k2) const
compare keys: use key_compare
Definition: VectorMap.h:174
std::lower_bound
T lower_bound(T...args)
GaudiUtils::VectorMap::insert
result_type insert(const key_type &key, const mapped_type &mapped)
insert the (key,value) pair into the container
Definition: VectorMap.h:317
GaudiUtils::VectorMap::merge
VectorMap & merge(const VectorMap< K1, K2, K3, K4 > &right)
merge two maps
Definition: VectorMap.h:784
GaudiUtils::VectorMap::VectorMap
VectorMap(const VectorMap &right)
copy constructor
Definition: VectorMap.h:717
GaudiUtils::VectorMap::erase
size_type erase(const key_type &key)
erase the element using the key
Definition: VectorMap.h:227
Gaudi::Units::second
constexpr double second
Definition: SystemOfUnits.h:122
std::string
STL class.
GaudiUtils::VectorMap::max_size
size_type max_size() const
maximal allowed size
Definition: VectorMap.h:495
GaudiUtils::VectorMap::find
iterator find(const key_type &key) const
find the element by key
Definition: VectorMap.h:455
GaudiUtils::VectorMap::compare_key
const key_compare & compare_key() const
get the comparison criteria for keys
Definition: VectorMap.h:769
GaudiUtils::VectorMap::rbegin
reverse_iterator rbegin() const
"rbegin" iterator for sequential access (const-only version!)
Definition: VectorMap.h:200
GaudiUtils::VectorMap::iterators
std::pair< iterator, iterator > iterators
visible iterator pait
Definition: VectorMap.h:155
GaudiUtils::VectorMap::lower_bound
iterator lower_bound(const key_type &key) const
Definition: VectorMap.h:481
GaudiUtils::VectorMap::end
iterator end() const
"end" iterator for sequential access (const-only version!)
Definition: VectorMap.h:198
GaudiUtils::VectorMap::reference
ALLOCATOR::const_reference reference
the types to conform STL
Definition: VectorMap.h:126
GaudiUtils::VectorMap::erase
size_type erase(iterator first, iterator last)
erase the sequence of elements using the iterators
Definition: VectorMap.h:240
GaudiUtils::VectorMap::m_vct
_vector m_vct
the underlying sorted vector of (key,mapped) pairs
Definition: VectorMap.h:861
GaudiUtils::VectorMap::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
visible reverse const_iterator (exported)
Definition: VectorMap.h:153
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiUtils::VectorMap::begin
iterator begin() const
"begin" iterator for sequential access (const-only version!)
Definition: VectorMap.h:196
MapBase.h
std::vector::erase
T erase(T...args)
GaudiUtils::VectorMap::_compare_type::_compare_type
_compare_type()
default constructor
Definition: VectorMap.h:172
GaudiUtils::VectorMap::operator>=
friend bool operator>=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:524
StringKey.h
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
GaudiUtils::VectorMap::reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
visible reverse const_iterator (exported)
Definition: VectorMap.h:151
std::vector::clear
T clear(T...args)
GaudiUtils::VectorMap::operator>
friend bool operator>(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:518
GaudiUtils::VectorMap::result_type
std::pair< iterator, bool > result_type
visible iterator pait
Definition: VectorMap.h:157
GaudiUtils::VectorMap::const_reference
ALLOCATOR::const_reference const_reference
the types to conform STL
Definition: VectorMap.h:128
GaudiUtils::VectorMap::_compare_type::_compare_type
_compare_type(const key_compare &cmp)
constructor from the key-comparison criteria
Definition: VectorMap.h:170
GaudiUtils::VectorMap::update
bool update(const value_type &val)
forced insertion of the key/mapped pair The method acts like "insert" but it DOES overwrite the mappe...
Definition: VectorMap.h:603
std::pair
std::vector::insert
T insert(T...args)
GaudiUtils::VectorMap::VectorMap
VectorMap(std::initializer_list< value_type > first, const allocator_type &alloc=allocator_type())
tconstructor from initializer list
Definition: VectorMap.h:739
GaudiUtils::VectorMap::operator<=
friend bool operator<=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:527
GaudiUtils::VectorMap::VectorMap
VectorMap(INPUT first, INPUT last, const allocator_type &alloc=allocator_type())
templated constructor from "convertible" sequence
Definition: VectorMap.h:728
GaudiUtils::VectorMap::rend
reverse_iterator rend() const
"rend" iterator for sequential access (const-only version!)
Definition: VectorMap.h:202
GaudiUtils::VectorMap::mapped_type
VALUE mapped_type
the actual type of value
Definition: VectorMap.h:115
std::vector< value_type, allocator_type >
GaudiUtils::VectorMap::compare_type
_compare_type compare_type
the actual comparison criteria for valye_type objects
Definition: VectorMap.h:189
GaudiUtils::VectorMap::const_iterator
_vector::const_iterator const_iterator
visible const_iterator (exported)
Definition: VectorMap.h:149
GaudiUtils::VectorMap::upper_bound
iterator upper_bound(const key_type &key) const
Definition: VectorMap.h:483
std::vector::begin
T begin(T...args)
GaudiUtils::VectorMap::operator<
bool operator<(const VectorMap &other) const
comparison criteria for containers
Definition: VectorMap.h:513
GaudiUtils::VectorMap::operator=
VectorMap & operator=(const VectorMap &right)
Definition: VectorMap.h:751
GaudiUtils::VectorMap::count
size_type count(const key_type &key) const
count number of elements with the certain key
Definition: VectorMap.h:478
GaudiUtils::VectorMap::compare
const compare_type & compare() const
get the comparison criteria itself
Definition: VectorMap.h:763
GaudiUtils::VectorMap::allocator_type
ALLOCATOR allocator_type
allocator (could be useful for optimizations)
Definition: VectorMap.h:124
GaudiUtils
Forward declarations for the functions in SerializeSTL.h.
Definition: GaudiHistoID.h:139
GaudiUtils::VectorMap::iter
_iterator iter(iterator p)
the conversion from 'const' to 'non-const' iterator
Definition: VectorMap.h:843
std::reverse_iterator
GaudiUtils::VectorMap::update
bool update(const key_type &key, const mapped_type &mapped)
forced insertion of the key/mapped pair The method acts like "insert" but it DOES overwrite the exist...
Definition: VectorMap.h:561
GaudiUtils::VectorMap::key_compare
KEYCOMPARE key_compare
comparison of keys
Definition: VectorMap.h:117
GaudiUtils::VectorMap::clear
void clear()
clear the container
Definition: VectorMap.h:497
GaudiUtils::VectorMap::key_type
KEY key_type
the actual type of key
Definition: VectorMap.h:113
Gaudi::Utils::MapBase::throw_out_of_range_exception
void throw_out_of_range_exception() const
throw std::out_of_range exception
Definition: MapBase.cpp:28
std::less
std::sort
T sort(T...args)
GaudiUtils::VectorMap::swap
void swap(VectorMap &other)
swap function, which 'swaps' the content of two containers
Definition: VectorMap.h:502
GaudiUtils::VectorMap::_compare_type
The actual structure used to compare the elements Only "key" is important for comparison.
Definition: VectorMap.h:165
StatusCode.h
GaudiUtils::VectorMap::difference_type
ALLOCATOR::difference_type difference_type
the types to conform STL
Definition: VectorMap.h:132
GaudiUtils::VectorMap::empty
bool empty() const
empty container ?
Definition: VectorMap.h:491
GaudiUtils::VectorMap::equal_range
iterators equal_range(const key_type &key) const
Definition: VectorMap.h:485
GaudiUtils::VectorMap::value_type
std::pair< key_type, mapped_type > value_type
the actual storage item
Definition: VectorMap.h:119
GaudiUtils::VectorMap::merge
VectorMap & merge(const VectorMap &right)
merge two maps
Definition: VectorMap.h:777
Gaudi::Utils::MapBase
Helper base-class to allow the generic Python-decoration for all "map-like" classes in Gaudi...
Definition: MapBase.h:44
GaudiUtils::VectorMap::size_type
ALLOCATOR::size_type size_type
the types to conform STL
Definition: VectorMap.h:130
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
GaudiUtils::VectorMap::erase
void erase(iterator pos)
erase the element using the iterator
Definition: VectorMap.h:209
ana.i
list i
Definition: ana.py:128
std::ostream
STL class.
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
std::equal_range
T equal_range(T...args)
GaudiUtils::VectorMap::VectorMap
VectorMap(const allocator_type &alloc=allocator_type())
default constructor from the the allocator
Definition: VectorMap.h:710
GaudiUtils::VectorMap::lower_bound
_iterator lower_bound(const key_type &key)
'lower-bound' - non-const version
Definition: VectorMap.h:836
std::initializer_list
GaudiUtils::VectorMap::size
size_type size() const
number of elements
Definition: VectorMap.h:493
std::vector::reserve
T reserve(T...args)
GaudiUtils::VectorMap::_vector
std::vector< value_type, allocator_type > _vector
the actual storage container (no export)
Definition: VectorMap.h:137
GaudiUtils::VectorMap::value_at
const mapped_type & value_at(const size_t index) const
useful method for python decoration:
Definition: VectorMap.h:810