16 A(
const double value) : value(value) {}
18 friend inline std::ostream&
operator<<(std::ostream& out,
const A&
object)
20 const JFormat format(out, getFormat<A>(
JFormat_t(5, 2, std::ios::fixed | std::ios::showpos)));
22 return out << format <<
object.value;
30 B(
const double value) : value(value) {}
32 friend inline std::ostream&
operator<<(std::ostream& out,
const B&
object)
34 const JFormat format(out, getFormat<B>(
JFormat_t(12, 3, std::ios::scientific | std::ios::showpos)));
36 return out << format <<
object.value;
44 friend inline std::ostream&
operator<<(std::ostream& out,
const C&
object)
51 return out <<
"C::shortprint";
54 return out <<
"C::mediumprint";
57 return out <<
"C::longprint";
60 return out <<
"C::undefined";
92 catch(
const exception &error) {
96 for (
int value = 1; value < 1000000000; value *= 10) {
100 for (
int value = 1; value < 1000000000; value *= 10) {
104 for (
int value = 1; value < 1000000000; value *= 10) {
108 for (
int value = 1; value < 1000000000; value *= 10) {
112 for (
double value = 0.123456; value < 100000; value *= 10) {
118 const double c = 12.34;
148 const int i = 123456;
150 os[0] <<
setw(12) << left << i;
151 os[1] <<
LEFT(12) << i;
153 ASSERT(os[0].str() == os[1].str(),
"<" << os[0].str() <<
"> == <" << os[1].str() <<
">");
158 const int i = 123456;
160 os[0] <<
setw(12) << right << i;
161 os[1] <<
RIGHT(12) << i;
163 ASSERT(os[0].str() == os[1].str(),
"<" << os[0].str() <<
"> == <" << os[1].str() <<
">");
168 const int i = 123456;
171 os[1] <<
FILL(12,
'0') << i;
173 ASSERT(os[0].str() == os[1].str(),
"<" << os[0].str() <<
"> == <" << os[1].str() <<
">");
178 const double x = 123.456;
181 os[1] <<
FIXED(12,5) << x;
183 ASSERT(os[0].str() == os[1].str(),
"<" << os[0].str() <<
"> == <" << os[1].str() <<
">");
188 const double x = 123.456;
193 ASSERT(os[0].str() == os[1].str(),
"<" << os[0].str() <<
"> == <" << os[1].str() <<
">");
199 cout <<
LAMBDA([v = V](ostream& out) {
for (
const auto& i : v) { out <<
" " << i; } }) <<
endl;
int main(int argc, char *argv[])
int getPrintOption(std::ostream &out)
Get print option.
std::ostream & mediumprint(std::ostream &out)
Set medium printing.
std::ostream & longprint(std::ostream &out)
Set long printing.
std::ostream & shortprint(std::ostream &out)
Set short printing.
General purpose messaging.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
@ MEDIUM_PRINT
medium print
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for alignment of data.
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Auxiliary data structure to convert (lambda) function to printable object.
Auxiliary data structure for alignment of data.
Auxiliary data structure for alignment of data.
Auxiliary data structure for floating point format specification.