| The Gaudi Framework v29r1 (5cd95fa2)

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

- File List
- File Members

Printer.h
Go to the documentation of this file.
1 #ifndef GAUDIPYTHON_PRINTER_H
2 #define GAUDIPYTHON_PRINTER_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 // STD & STL
7 // ============================================================================
8 #include <sstream>
9 #include <string>
10 // ============================================================================
11 // GaudiKernel
12 // ============================================================================
13 #include "GaudiKernel/ContainedObject.h"
14 #include "GaudiKernel/DataObject.h"
15 // ============================================================================
16
17 namespace GaudiPython
18 {
25 template <class TYPE>
26 struct Printer {
27 static std::string print( const TYPE& object )
28 {
29 std::stringstream stream;
30 stream << object << std::endl;
31 return stream.str();
32 };
33 };
34 template <>
35 struct Printer<ContainedObject> {
36 static std::string print( const ContainedObject& object )
37 {
38 std::ostringstream stream;
39 object.fillStream( stream );
40 return stream.str();
41 };
42 };
43 template <>
44 struct Printer<DataObject> {
45 static std::string print( const DataObject& type )
46 {
47 std::ostringstream stream;
48 type.fillStream( stream );
49 return stream.str();
50 };
51 };
52
53 } // end of namespace GaudiPython
54
55 #endif // GAUDIPYTHON_PRINTER_H
56 // ============================================================================
std::endl
T endl(T...args)
std::stringstream
STL class.
std::string
STL class.
GaudiPython::Printer< ContainedObject >::print
static std::string print(const ContainedObject &object)
Definition: Printer.h:36
DataObject::fillStream
virtual std::ostream & fillStream(std::ostream &s) const
Fill the output stream (ASCII)
Definition: DataObject.h:82
std::ostringstream
STL class.
gaudirun.type
type
Definition: gaudirun.py:133
std::stringstream::str
T str(T...args)
GaudiPython::Printer< DataObject >::print
static std::string print(const DataObject &type)
Definition: Printer.h:45
GaudiPython
GaudiPython.h GaudiPython/GaudiPython.h.
Definition: AlgDecorators.h:37
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:31
GaudiPython::Printer
Definition: Printer.h:26
ContainedObject.h
GaudiPython::Printer::print
static std::string print(const TYPE &object)
Definition: Printer.h:27
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:29
DataObject.h