The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ToStream.h File Reference

implementation of various functions for streaming. More...

#include <GaudiKernel/HashMap.h>
#include <GaudiKernel/Map.h>
#include <GaudiKernel/SerializeSTL.h>
#include <GaudiKernel/VectorMap.h>
#include <array>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <unordered_set>
#include <vector>
Include dependency graph for ToStream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Gaudi::Utils::TuplePrinter< Tuple, N >
 
struct  Gaudi::Utils::TuplePrinter< Tuple, 1 >
 

Namespaces

namespace  Gaudi
 This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from python with a format liks : ( nbins, min, max, title ) where title can be ommited.
 
namespace  Gaudi::Utils
 

Functions

template<class TYPE>
std::ostream & Gaudi::Utils::toStream (const TYPE &obj, std::ostream &s)
 the generic implementation of the printout to the std::ostream
 
template<class ITERATOR>
std::ostream & Gaudi::Utils::toStream (ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
 the helper function to print the sequence
 
std::ostream & Gaudi::Utils::toStream (const std::string &obj, std::ostream &s)
 the printtout of the strings.
 
std::ostream & Gaudi::Utils::toStream (const bool obj, std::ostream &s)
 the printout of boolean values "a'la Python"
 
std::ostream & Gaudi::Utils::toStream (const float obj, std::ostream &s, const int prec=6)
 the printout of float values with the reasonable precision
 
std::ostream & Gaudi::Utils::toStream (const double obj, std::ostream &s, const int prec=8)
 the printout of double values with the reasonable precision
 
std::ostream & Gaudi::Utils::toStream (const long double obj, std::ostream &s, const int prec=10)
 the printout of long double values with the reasonable precision
 
template<class KTYPE, class VTYPE>
std::ostream & Gaudi::Utils::toStream (const std::pair< KTYPE, VTYPE > &obj, std::ostream &s)
 the partial template specialization of std::pair<KTYPE,VTYPE> printout the pair is printed a'la Python tuple: " ( a , b )"
 
template<typename... Args>
std::ostream & Gaudi::Utils::toStream (const std::tuple< Args... > &tuple, std::ostream &s)
 the helper function to print the tuple
 
template<class TYPE, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const std::vector< TYPE, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of std::vector<TYPE,ALLOCATOR> printout.
 
template<class TYPE, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const std::list< TYPE, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of std::list<TYPE,ALLOCATOR> printout.
 
template<class TYPE, class CMP, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const std::set< TYPE, CMP, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of std::set<TYPE,CMP,ALLOCATOR> printout.
 
template<class TYPE, class HASH, class CMP, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const std::unordered_set< TYPE, HASH, CMP, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of std::unordered_set<TYPE,HASH,CMP,ALLOCATOR> printout.
 
template<class KTYPE, class VTYPE, class CMP, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const std::map< KTYPE, VTYPE, CMP, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of std::map<KTYPE,VTYPE,CMP,ALLOCATOR> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
 
template<class KTYPE, class VTYPE, class CMP, class ALLOCATOR>
std::ostream & Gaudi::Utils::toStream (const GaudiUtils::VectorMap< KTYPE, VTYPE, CMP, ALLOCATOR > &obj, std::ostream &s)
 the partial template specialization of GaudiUtils::VectorMap<KTYPE,VTYPE,CMP,ALLOCATOR> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
 
template<class KTYPE, class VTYPE, class MAP>
std::ostream & Gaudi::Utils::toStream (const GaudiUtils::Map< KTYPE, VTYPE, MAP > &obj, std::ostream &s)
 the partial template specialization of GaudiUtils::Map<KTYPE,VTYPE,MAP> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
 
template<class KTYPE, class VTYPE, class HASH, class MAP>
std::ostream & Gaudi::Utils::toStream (const GaudiUtils::HashMap< KTYPE, VTYPE, HASH, MAP > &obj, std::ostream &s)
 the partial template specialization of GaudiUtils::HashMap<KTYPE,VTYPE,HASH,MAP> printout the map is printed a'la Python dict: " ( a : b , c: d , e : f )"
 
template<class TYPE, unsigned int N>
std::ostream & Gaudi::Utils::toStream (const TYPE(&obj)[N], std::ostream &s)
 the specialization for C-arrays, a'la python tuple
 
template<class TYPE, std::size_t N>
std::ostream & Gaudi::Utils::toStream (const std::array< TYPE, N > &obj, std::ostream &s)
 the specialization for std::array, a'la python tuple
 
template<unsigned int N>
std::ostream & Gaudi::Utils::toStream (const char(&obj)[N], std::ostream &s)
 the specialization for C-string, a'la python tuple
 
std::ostream & Gaudi::Utils::toStream (const char *obj, std::ostream &s)
 the specialization for C-string, a'la python tuple
 
template<class TYPE>
std::string Gaudi::Utils::toString (const TYPE &obj)
 the generic implementation of the type conversion to the string
 

Detailed Description

implementation of various functions for streaming.

this functionality is essential for usage of various types as property for the various Gaudi components

Attention
the implementation of the specific specializations must be done before the inclusion of this file
Todo
ToStream.h : reimplement in terms of functors, to allow easier specializations

Definition in file ToStream.h.