Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
Utilities
interface
OStreamColumn.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_interface_OStreamColumn_h
2
#define FWCore_Utilities_interface_OStreamColumn_h
3
4
// -*- C++ -*-
5
//
6
// Package: Utilities
7
// Class : OStreamColumn
8
//
34
//
35
// Original Author: Kyle Knoepfel
36
// Created:
37
// $Id$
38
//
39
40
#include <iomanip>
41
#include <string>
42
43
namespace
edm {
44
45
class
OStreamColumn
;
46
47
template
<
typename
T>
48
struct
OStreamColumnEntry
{
49
OStreamColumn
const
&
col
;
50
T
t
;
51
};
52
53
class
OStreamColumn
{
54
public
:
55
explicit
OStreamColumn
(
std::string
const
&
t
);
56
explicit
OStreamColumn
(
std::string
const
& t, std::size_t
const
w
);
57
58
template
<
typename
T>
59
auto
operator()
(
T
const
& t)
const
60
{
61
return
OStreamColumnEntry<T>
{*
this
, t};
62
}
63
64
std::size_t
width
()
const
{
return
width_
; }
65
66
private
:
67
std::string
title_
;
68
std::size_t
width_
;
69
70
friend
std::ostream&
operator<<
(std::ostream&,
OStreamColumn
const
&);
71
72
template
<
typename
E>
73
friend
std::ostream& operator<<(std::ostream&, OStreamColumnEntry<E>
const
&);
74
};
75
76
std::ostream&
operator<<
(std::ostream&
t
,
OStreamColumn
const
&
c
);
77
78
template
<
typename
E>
79
std::ostream& operator<<(std::ostream& t, OStreamColumnEntry<E>
const
& ce)
80
{
81
t
<< std::setw(ce.col.width_) << ce.t;
82
return
t
;
83
}
84
85
}
86
87
#endif
w
const double w
Definition:
UKUtility.cc:23
edm::OStreamColumnEntry::t
T t
Definition:
OStreamColumn.h:50
edm::OStreamColumnEntry::col
OStreamColumn const & col
Definition:
OStreamColumn.h:49
edm::OStreamColumn
Definition:
OStreamColumn.h:53
edm::OStreamColumnEntry
Definition:
OStreamColumn.h:48
EnergyCorrector.c
tuple c
Definition:
EnergyCorrector.py:43
OStreamColumn
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::OStreamColumn::title_
std::string title_
Definition:
OStreamColumn.h:67
edm::OStreamColumn::OStreamColumn
OStreamColumn(std::string const &t)
Definition:
OStreamColumn.cc:7
edm::OStreamColumn::width
std::size_t width() const
Definition:
OStreamColumn.h:64
edm::OStreamColumn::operator()
auto operator()(T const &t) const
Definition:
OStreamColumn.h:59
edm::OStreamColumn::width_
std::size_t width_
Definition:
OStreamColumn.h:68
t
t
Definition:
TrackingNtuple.cc:717
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition:
HLTGlobalStatus.h:115
T
long double T
Definition:
Basic3DVectorLD.h:57
edm::OStreamColumn::operator<<
friend std::ostream & operator<<(std::ostream &, OStreamColumn const &)
Generated for CMSSW Reference Manual by
1.8.5