Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
Utils
src
returnType.cc
Go to the documentation of this file.
1
#include "
CommonTools/Utils/src/returnType.h
"
2
#include <map>
3
#include <string>
4
using namespace
Reflex;
5
using namespace
std;
6
using namespace
reco::method
;
7
8
namespace
reco
{
9
Type
returnType
(
const
Member &
mem
) {
10
Type
t
= mem.TypeOf().ReturnType();
11
if
(t) {
12
while
(t.IsTypedef()) t = t.ToType();
13
}
14
return
t
;
15
}
16
17
TypeCode
returnTypeCode
(
const
Member &
mem
) {
18
return
typeCode
(
returnType
(mem));
19
}
20
21
TypeCode
typeCode
(
const
Type
&
t
) {
22
static
map<string, method::TypeCode> retTypeMap;
23
if
(retTypeMap.size() == 0) {
24
retTypeMap[
"double"
] =
doubleType
;
25
retTypeMap[
"float"
] =
floatType
;
26
retTypeMap[
"int"
] =
intType
;
27
retTypeMap[
"unsigned int"
] =
uIntType
;
28
retTypeMap[
"short"
] =
shortType
;
29
retTypeMap[
"unsigned short"
] =
uShortType
;
30
retTypeMap[
"long"
] =
longType
;
31
retTypeMap[
"unsigned long"
] =
uLongType
;
32
retTypeMap[
"size_t"
] =
uLongType
;
33
retTypeMap[
"char"
] =
charType
;
34
retTypeMap[
"unsigned char"
] =
uCharType
;
35
retTypeMap[
"bool"
] =
boolType
;
36
}
37
map<string, TypeCode>::const_iterator
f
= retTypeMap.find(t.Name());
38
if
(f == retTypeMap.end())
return
(t.IsEnum() ?
enumType
:
invalid
);
39
else
return
f->second;
40
}
41
}
reco::method::charType
Definition:
TypeCode.h:16
reco::method::uIntType
Definition:
TypeCode.h:15
lumiQTWidget.t
tuple t
Definition:
lumiQTWidget.py:50
susybsm::HSCParticleType::Type
Type
Definition:
HSCParticle.h:20
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
reco::method::longType
Definition:
TypeCode.h:18
reco::method::boolType
Definition:
TypeCode.h:19
reco::method::uShortType
Definition:
TypeCode.h:17
reco::returnType
Type returnType(const Member &mem)
Definition:
returnType.cc:9
returnType.h
reco::method::uLongType
Definition:
TypeCode.h:18
f
double f[11][100]
Definition:
MuScleFitUtils.cc:80
mem
uint16_t mem[nChs][nEvts]
Definition:
recycleTccEmu.cc:13
reco::method::enumType
Definition:
TypeCode.h:19
reco::typeCode
TypeCode typeCode(const Type &t)
Definition:
returnType.cc:21
align::invalid
Definition:
StructureType.h:19
reco::method::intType
Definition:
TypeCode.h:15
reco::method::uCharType
Definition:
TypeCode.h:16
reco::method::TypeCode
TypeCode
Definition:
TypeCode.h:13
reco::method::floatType
Definition:
TypeCode.h:14
reco::returnTypeCode
TypeCode returnTypeCode(const Member &mem)
Definition:
returnType.cc:17
reco::method::shortType
Definition:
TypeCode.h:17
PFRecoTauDiscriminationAgainstElectronMVA2_cfi.method
tuple method
Definition:
PFRecoTauDiscriminationAgainstElectronMVA2_cfi.py:15
reco::method::doubleType
Definition:
TypeCode.h:14
Generated for CMSSW Reference Manual by
1.8.5