The Gaudi Framework  master (594c33fa)
GaudiUtils Namespace Reference

Namespaces

 details
 

Classes

class  Allocator
 
class  AllocatorPool
 
struct  GenericHash
 Generic hash implementation (for easy migration to the new Hash class). More...
 
class  Hash
 
struct  Hash< const Gaudi::ParticleID & >
 
struct  Hash< const Gaudi::ParticleID >
 
struct  Hash< const T & >
 remove extra qualifiers: More...
 
struct  Hash< const T * >
 remove extra qualifiers: More...
 
struct  Hash< const T >
 remove extra qualifiers: More...
 
struct  Hash< const T(&)[N]>
 generic specialization for arrays More...
 
struct  Hash< Gaudi::ParticleID & >
 
struct  Hash< Gaudi::ParticleID >
 
struct  Hash< T & >
 remove extra qualifiers: More...
 
struct  Hash< T * >
 the partial specialization for pointers More...
 
struct  Hash< T(&)[N]>
 generic specialization for arrays More...
 
class  HashMap
 
class  Map
 
class  VectorMap
 

Functions

template<class T1 , class T2 >
std::ostreamoperator<< (std::ostream &s, const std::pair< T1, T2 > &p)
 Serialize an std::pair in a python like format. E.g. "(1, 2)". More...
 
template<class T , class ALLOC >
std::ostreamoperator<< (std::ostream &s, const std::vector< T, ALLOC > &v)
 Serialize an std::vector in a python like format. E.g. "[1, 2, 3]". More...
 
template<class T , std::size_t N>
std::ostreamoperator<< (std::ostream &s, const std::array< T, N > &v)
 Serialize an std::array in a python like format. E.g. "[1, 2, 3]". More...
 
template<class T , class ALLOC >
std::ostreamoperator<< (std::ostream &s, const std::list< T, ALLOC > &l)
 Serialize an std::list in a python like format. E.g. "[1, 2, 3]". More...
 
template<class T1 , class T2 , class COMP , class ALLOC >
std::ostreamoperator<< (std::ostream &s, const std::map< T1, T2, COMP, ALLOC > &m)
 Serialize an std::map in a python like format. E.g. "{a: 1, b: 2}". More...
 
template<class K , class T , class M >
std::ostreamoperator<< (std::ostream &s, const GaudiUtils::Map< K, T, M > &m)
 Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}". More...
 
template<class K , class T , class H , class M >
std::ostreamoperator<< (std::ostream &s, const GaudiUtils::HashMap< K, T, H, M > &m)
 Serialize a GaudiUtils::HashMap in a python like format. E.g. "{a: 1, b: 2}". More...
 

Function Documentation

◆ operator<<() [1/7]

template<class K , class T , class H , class M >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const GaudiUtils::HashMap< K, T, H, M > &  m 
)

Serialize a GaudiUtils::HashMap in a python like format. E.g. "{a: 1, b: 2}".

This implementation is not efficient, but very simple.

Anyway a print-out of a hash map is not something that we do every second.

Definition at line 125 of file SerializeSTL.h.

125  {
126  // Copy the hash map into a map to have it ordered by key.
127  return s << GaudiUtils::Map<K, T>( m.begin(), m.end() );
128  }

◆ operator<<() [2/7]

template<class K , class T , class M >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const GaudiUtils::Map< K, T, M > &  m 
)

Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}".

Definition at line 117 of file SerializeSTL.h.

117  {
118  // Serialize the internal map.
119  return s << static_cast<const M&>( m );
120  }

◆ operator<<() [3/7]

template<class T , std::size_t N>
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const std::array< T, N > &  v 
)

Serialize an std::array in a python like format. E.g. "[1, 2, 3]".

Definition at line 98 of file SerializeSTL.h.

98  {
99  return details::ostream_joiner( s << '[', v, ", " ) << ']';
100  }

◆ operator<<() [4/7]

template<class T , class ALLOC >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const std::list< T, ALLOC > &  l 
)

Serialize an std::list in a python like format. E.g. "[1, 2, 3]".

Definition at line 103 of file SerializeSTL.h.

103  {
104  return details::ostream_joiner( s << '[', l, ", " ) << ']';
105  }

◆ operator<<() [5/7]

template<class T1 , class T2 , class COMP , class ALLOC >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const std::map< T1, T2, COMP, ALLOC > &  m 
)

Serialize an std::map in a python like format. E.g. "{a: 1, b: 2}".

Definition at line 108 of file SerializeSTL.h.

108  {
109  return details::ostream_joiner( s << "{", m, ", ",
110  []( std::ostream& os, const std::pair<const T1, T2>& p ) -> std::ostream& {
111  return os << p.first << ": " << p.second;
112  } )
113  << "}";
114  }

◆ operator<<() [6/7]

template<class T1 , class T2 >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const std::pair< T1, T2 > &  p 
)

Serialize an std::pair in a python like format. E.g. "(1, 2)".

Definition at line 88 of file SerializeSTL.h.

88  {
89  return s << '(' << p.first << ", " << p.second << ')';
90  }

◆ operator<<() [7/7]

template<class T , class ALLOC >
std::ostream & GaudiUtils::operator<< ( std::ostream s,
const std::vector< T, ALLOC > &  v 
)

Serialize an std::vector in a python like format. E.g. "[1, 2, 3]".

Definition at line 93 of file SerializeSTL.h.

93  {
94  return details::ostream_joiner( s << '[', v, ", " ) << ']';
95  }
std::pair
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:108
std::ostream
STL class.
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:81
gaudirun.l
dictionary l
Definition: gaudirun.py:581
Properties.v
v
Definition: Properties.py:122