ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigInDetAnalysisUser
Analysis
src
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
19
inline
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
25
inline
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
31
inline
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
37
inline
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
43
inline
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
49
inline
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
58
inline
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
67
inline
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
label
std::string label(const std::string &format, int i)
Definition
label.h:19
Generated on
for ATLAS Offline Software by
1.17.0