The Gaudi Framework  master (1304469f)
Loading...
Searching...
No Matches
Printer.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12// ============================================================================
13// Include files
14// ============================================================================
15// STD & STL
16// ============================================================================
17#include <sstream>
18#include <string>
19// ============================================================================
20// GaudiKernel
21// ============================================================================
24// ============================================================================
25
26namespace GaudiPython {
33 template <class TYPE>
34 struct Printer {
35 static std::string print( const TYPE& object ) {
36 std::stringstream stream;
37 stream << object << std::endl;
38 return stream.str();
39 };
40 };
41 template <>
43 static std::string print( const ContainedObject& object ) {
44 std::ostringstream stream;
45 object.fillStream( stream );
46 return stream.str();
47 };
48 };
49 template <>
51 static std::string print( const DataObject& type ) {
52 std::ostringstream stream;
53 type.fillStream( stream );
54 return stream.str();
55 };
56 };
57
58} // end of namespace GaudiPython
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
GaudiPython.h GaudiPython/GaudiPython.h.
Definition Algorithm.h:29
static std::string print(const TYPE &object)
Definition Printer.h:35
static std::string print(const ContainedObject &object)
Definition Printer.h:43
static std::string print(const DataObject &type)
Definition Printer.h:51