ATLAS Offline Software
Loading...
Searching...
No Matches
label.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
10
11
12#ifndef LABEL_H
13#define LABEL_H
14
15#include <cstdio>
16#include <iostream>
17
18
19inline std::string label( const std::string& format, int i ) {
20 char c[256];
21 std::sprintf( c, format.c_str(), i );
22 return c;
23}
24
25inline std::string label( const std::string& format, unsigned i ) {
26 char c[256];
27 std::sprintf( c, format.c_str(), i );
28 return c;
29}
30
31inline std::string label( const std::string& format, int i, int j ) {
32 char c[256];
33 std::sprintf( c, format.c_str(), i, j );
34 return c;
35}
36
37inline std::string label( const std::string& format, double d ) {
38 char c[256];
39 std::sprintf( c, format.c_str(), d );
40 return c;
41}
42
43inline std::string label( const std::string& format, double d, double e ) {
44 char c[256];
45 std::sprintf( c, format.c_str(), d, e );
46 return c;
47}
48
49inline std::string label( const std::string& format, double d, double e, double f, int i ) {
50 char c[256];
51 std::sprintf( c, format.c_str(), d, e, f, i );
52
53 std::cout << "\tf: " << f << " :: " << c << std::endl;
54
55 return c;
56}
57
58inline std::string label( const std::string& format, double d, double e, int i ) {
59 char c[256];
60 std::sprintf( c, format.c_str(), d, e, i );
61 return c;
62}
63
64
65
66
67inline std::string label( const std::string& format, const std::string& s ) {
68 char c[256];
69 std::sprintf( c, format.c_str(), s.c_str());
70 return c;
71}
72
73#endif // LABEL_H
74
75
76
77
78
79
80
81
82
83
std::string label(const std::string &format, int i)
Definition label.h:19