ATLAS Offline Software
Loading...
Searching...
No Matches
ShowRequest.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONCABLINGTOOLS_PRINTREQ_H
6#define MUONCABLINGTOOLS_PRINTREQ_H
7
8#include "GaudiKernel/MsgStream.h"
9#include <iostream>
10#include <sstream>
11
12template <class Type> class ShowRequest {
13public:
14 const Type* m_object;
16
17public:
18 ShowRequest(const Type&, bool);
19 ShowRequest(const Type*, bool);
21};
22
23template <class Type> ShowRequest<Type>::ShowRequest(const Type& obj, bool detail) : m_object(&obj), m_detail(detail) {}
24
25template <class Type> ShowRequest<Type>::ShowRequest(const Type* obj, bool detail) : m_object(obj), m_detail(detail) {}
26
27template <class Type> std::ostream& operator<<(std::ostream& stream, const ShowRequest<Type>& print) {
28 std::ostringstream display;
29 print.m_object->Print(display, print.m_detail);
30 stream << display.str();
31 return stream;
32}
33
34template <class Type> MsgStream& operator<<(MsgStream& stream, const ShowRequest<Type>& print) {
35 std::ostringstream display;
36 print.m_object->Print(display, print.m_detail);
37 stream << display.str();
38 return stream;
39}
40
41#endif
std::ostream & operator<<(std::ostream &stream, const ShowRequest< Type > &print)
Definition ShowRequest.h:27
void print(char *figname, TCanvas *c1)
ShowRequest(const Type &, bool)
Definition ShowRequest.h:23
const Type * m_object
Definition ShowRequest.h:14