The Gaudi Framework
master (37c0b60a)
Printer.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 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
#ifndef GAUDIPYTHON_PRINTER_H
12
#define GAUDIPYTHON_PRINTER_H 1
13
// ============================================================================
14
// Include files
15
// ============================================================================
16
// STD & STL
17
// ============================================================================
18
#include <sstream>
19
#include <string>
20
// ============================================================================
21
// GaudiKernel
22
// ============================================================================
23
#include <
GaudiKernel/ContainedObject.h
>
24
#include <
GaudiKernel/DataObject.h
>
25
// ============================================================================
26
27
namespace
GaudiPython
{
34
template
<
class
TYPE>
35
struct
Printer
{
36
static
std::string
print
(
const
TYPE&
object
) {
37
std::stringstream
stream
;
38
stream
<<
object
<<
std::endl
;
39
return
stream
.str();
40
};
41
};
42
template
<>
43
struct
Printer
<
ContainedObject
> {
44
static
std::string
print
(
const
ContainedObject
&
object
) {
45
std::ostringstream
stream
;
46
object
.fillStream(
stream
);
47
return
stream
.str();
48
};
49
};
50
template
<>
51
struct
Printer
<
DataObject
> {
52
static
std::string
print
(
const
DataObject
&
type
) {
53
std::ostringstream
stream
;
54
type
.fillStream(
stream
);
55
return
stream
.str();
56
};
57
};
58
59
}
// end of namespace GaudiPython
60
61
#endif // GAUDIPYTHON_PRINTER_H
Write.stream
stream
Definition:
Write.py:32
GaudiPython::Printer::print
static std::string print(const TYPE &object)
Definition:
Printer.h:36
std::string
STL class.
std::stringstream
STL class.
GaudiPython::Printer
Definition:
Printer.h:35
GaudiPython::Printer< DataObject >::print
static std::string print(const DataObject &type)
Definition:
Printer.h:52
std::ostringstream
STL class.
gaudirun.type
type
Definition:
gaudirun.py:160
std::endl
T endl(T... args)
DataObject.h
GaudiPython
Namespace for all classes interfacing Gaudi to Python.
Definition:
Algorithm.h:30
DataObject
Definition:
DataObject.h:36
ContainedObject.h
GaudiPython::Printer< ContainedObject >::print
static std::string print(const ContainedObject &object)
Definition:
Printer.h:44
ContainedObject
Definition:
ContainedObject.h:41
GaudiPython
include
GaudiPython
Printer.h
Generated on Thu Dec 19 2024 15:35:05 for The Gaudi Framework by
1.8.18