Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Utilities
General
interface
ClassName.h
Go to the documentation of this file.
1
#ifndef UTILITIES_GENERAL_CLASSNAME_H
2
#define UTILITIES_GENERAL_CLASSNAME_H
3
//
4
#include <typeinfo>
5
#include <string>
6
#include <cstdlib>
7
8
inline
std::string
firstNonNumeric
(
const
char
* sc) {
9
std::string
s
(sc);
10
size_t
pos = s.find_first_not_of(
"0123456789"
);
11
s.erase(0, pos);
12
return
s
;
13
}
14
15
class
Demangle
{
16
public
:
17
Demangle
(
const
char
* sc);
18
19
const
char
*
operator()
()
const
{
return
demangle
; }
20
21
~Demangle
() {
22
if
(
demangle
)
23
free((
void
*)
demangle
);
24
}
25
26
private
:
27
char
*
demangle
;
28
};
29
30
template
<
class
T>
31
inline
std::string
className
(
const
T
&
t
) {
32
return
std::string
(
Demangle
(
typeid
(t).
name
())());
33
}
34
35
template
<
class
T>
36
class
ClassName
{
37
public
:
38
static
const
std::string
&
name
() {
39
static
const
std::string
ln(
Demangle
(
typeid
(
T
).
name
())());
40
return
ln;
41
}
42
};
43
44
#endif // UTILITIES_GENERAL_CLASSNAME_H
firstNonNumeric
std::string firstNonNumeric(const char *sc)
Definition:
ClassName.h:8
Demangle::operator()
const char * operator()() const
Definition:
ClassName.h:19
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
ClassName
Definition:
ClassName.h:36
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:78
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ClassName::name
static const std::string & name()
Definition:
ClassName.h:38
Demangle::~Demangle
~Demangle()
Definition:
ClassName.h:21
Demangle::Demangle
Demangle(const char *sc)
Definition:
ClassName.cc:5
Demangle::demangle
char * demangle
Definition:
ClassName.h:27
alignCSCRings.s
list s
Definition:
alignCSCRings.py:92
Demangle
Definition:
ClassName.h:15
T
long double T
Definition:
Basic3DVectorLD.h:48
className
std::string className(const T &t)
Definition:
ClassName.h:31
Generated for CMSSW Reference Manual by
1.8.5