ATLAS Offline Software
Loading...
Searching...
No Matches
ShowData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <iostream>
6#include <sstream>
7
8template <class Type> class ShowData
9{
10 public:
11 const Type* m_object;
12 const std::string m_element;
13 const bool m_detail;
14
15 public:
16 ShowData(const Type*,const std::string&,bool);
17 ShowData(const Type&,const std::string&,bool);
19};
20
21template <class Type>
22ShowData<Type>::ShowData(const Type& obj,const std::string& element,bool detail) :
23 m_object(&obj),m_element(element),m_detail(detail) {}
24
25
26template <class Type>
27ShowData<Type>::ShowData(const Type* obj,const std::string& element,bool detail) :
28 m_object(obj),m_element(element),m_detail(detail) {}
29
30
31template <class Type> std::ostream& operator<<
32 (std::ostream& stream,const ShowData<Type>& data)
33{
34 std::ostringstream display;
35 data.m_object->PrintElement(display,data.m_element,data.m_detail);
36 stream << display.str();
37 return stream;
38}
39
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const std::string m_element
Definition ShowData.h:12
const Type * m_object
Definition ShowData.h:11
ShowData(const Type *, const std::string &, bool)
Definition ShowData.h:27
const bool m_detail
Definition ShowData.h:13
~ShowData()
Definition ShowData.h:18