ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigInDetAnalysisUser
Resplot
src
tagname.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
19
20
21
#ifndef RESPLOT_TAGNAME_H
22
#define RESPLOT_TAGNAME_H
23
24
25
#include <string>
26
27
namespace
Resplot
{
28
29
struct
tagname
{
30
public
:
31
tagname
(
const
std::string&
base
,
int
i) {
32
char
sbase[512];
33
sprintf(sbase,
"%s[%03d]"
,
base
.c_str(), i);
34
m_string
= sbase;
35
}
36
37
38
tagname
(
const
char
*
base
,
int
i) {
39
char
sbase[512];
40
sprintf(sbase,
"%s[%03d]"
,
base
, i);
41
m_string
= sbase;
42
}
43
44
tagname
(
const
char
*
base
,
char
* addition) {
45
char
sbase[512];
46
sprintf(sbase,
"%s%s"
,
base
, addition);
47
m_string
= sbase;
48
}
49
50
tagname
&
add
(
const
char
* s) {
51
char
sbase[512];
52
sprintf(sbase,
"%s%s"
,
m_string
.c_str(), s);
53
m_string
= sbase;
54
return
(*
this
);
55
}
56
57
tagname
&
add
(
const
std::string& s) {
58
char
sbase[512];
59
sprintf(sbase,
"%s%s"
,
m_string
.c_str(), s.c_str() );
60
m_string
= sbase;
61
return
(*
this
);
62
}
63
64
const
char
*
c_str
()
const
{
return
m_string
.c_str(); }
65
operator
const
char
*()
const
{
return
m_string
.c_str(); }
66
// cppcheck-suppress returnByReference; false positive
67
operator
std::string()
const
{
return
m_string
; }
68
69
private
:
70
71
std::string
m_string
;
72
73
};
74
75
}
76
77
#endif
/* RESPLOT_TAGNAME_H */
78
79
80
81
82
83
84
85
86
87
base
std::string base
Definition
hcg.cxx:83
Resplot
Definition
Resplot.h:40
Resplot::tagname::tagname
tagname(const std::string &base, int i)
Definition
tagname.h:31
Resplot::tagname::m_string
std::string m_string
Definition
tagname.h:71
Resplot::tagname::c_str
const char * c_str() const
Definition
tagname.h:64
Resplot::tagname::tagname
tagname(const char *base, int i)
Definition
tagname.h:38
Resplot::tagname::add
tagname & add(const std::string &s)
Definition
tagname.h:57
Resplot::tagname::add
tagname & add(const char *s)
Definition
tagname.h:50
Resplot::tagname::tagname
tagname(const char *base, char *addition)
Definition
tagname.h:44
Generated on
for ATLAS Offline Software by
1.17.0