ATLAS Offline Software
Trigger
TrigAnalysis
TrigInDetAnalysisUser
Resplot
src
tagname.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
21
#ifndef RESPLOT_TAGNAME_H
22
#define RESPLOT_TAGNAME_H
23
24
25
#include <string>
26
27
28
struct
tagname
29
{
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
() {
return
m_string
.c_str(); }
65
operator
const
char
*() {
return
m_string
.c_str(); }
66
operator
std::string() {
return
m_string
; }
67
68
private
:
69
70
std::string
m_string
;
71
72
};
73
74
75
#endif
/* RESPLOT_TAGNAME_H */
76
77
78
79
80
81
82
83
84
85
base
std::string base
Definition:
hcg.cxx:78
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
tagname::m_string
std::string m_string
Definition:
tagname.h:70
tagname::c_str
const char * c_str()
Definition:
tagname.h:64
lumiFormat.i
int i
Definition:
lumiFormat.py:92
tagname::tagname
tagname(const std::string &base, int i)
Definition:
tagname.h:31
tagname::add
tagname & add(const std::string &s)
Definition:
tagname.h:57
tagname::tagname
tagname(const char *base, char *addition)
Definition:
tagname.h:44
tagname
Definition:
tagname.h:29
tagname::tagname
tagname(const char *base, int i)
Definition:
tagname.h:38
tagname::add
tagname & add(const char *s)
Definition:
tagname.h:50
Generated on Fri Jun 28 2024 21:28:16 for ATLAS Offline Software by
1.8.18