Main Page
Namespaces
Classes
Package Documentation
src
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
return
OStreamColumnEntry<T>
{*
this
, t};
61
}
62
63
std::size_t
width
()
const
{
return
width_; }
64
65
private
:
66
std::string
title_
;
67
std::size_t
width_
;
68
69
friend
std::ostream&
operator<<
(std::ostream&,
OStreamColumn
const
&);
70
71
template
<
typename
E>
72
friend
std::ostream& operator<<(std::ostream&, OStreamColumnEntry<E>
const
&);
73
};
74
75
std::ostream&
operator<<
(std::ostream&
t
,
OStreamColumn
const
&
c
);
76
77
template
<
typename
E>
78
std::ostream& operator<<(std::ostream& t, OStreamColumnEntry<E>
const
& ce) {
79
t
<< std::setw(ce.col.width_) << ce.t;
80
return
t
;
81
}
82
83
}
// namespace edm
84
85
#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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::OStreamColumnEntry
Definition:
OStreamColumn.h:48
EnergyCorrector.c
c
Definition:
EnergyCorrector.py:44
OStreamColumn
edm::OStreamColumn::title_
std::string title_
Definition:
OStreamColumn.h:66
edm::OStreamColumn::width
std::size_t width() const
Definition:
OStreamColumn.h:63
edm::OStreamColumn::operator()
auto operator()(T const &t) const
Definition:
OStreamColumn.h:59
edm::OStreamColumn::width_
std::size_t width_
Definition:
OStreamColumn.h:67
edm
HLT enums.
Definition:
AlignableModifier.h:17
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:66
Generated for CMSSW Reference Manual by
1.8.11