Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DataFormats
Common
src
setIsMergeable.cc
Go to the documentation of this file.
1
2
#include "
DataFormats/Common/interface/setIsMergeable.h
"
3
4
#include "
DataFormats/Common/interface/WrapperBase.h
"
5
#include "
DataFormats/Provenance/interface/BranchDescription.h
"
6
#include "
FWCore/Utilities/interface/BranchType.h
"
7
#include "
FWCore/Utilities/interface/getAnyPtr.h
"
8
9
#include "TClass.h"
10
11
#include <memory>
12
13
namespace
edm
{
14
15
void
setIsMergeable
(
BranchDescription
&
desc
) {
16
// Save some time here with the knowledge that the isMergeable
17
// data member can only be true for run or lumi products.
18
// It defaults to false. Also if it is true that means it
19
// was already set.
20
if
(
desc
.branchType() ==
InRun
||
desc
.branchType() ==
InLumi
) {
21
if
(!
desc
.isMergeable()) {
22
TClass* wrapperBaseTClass =
TypeWithDict::byName
(
"edm::WrapperBase"
).
getClass
();
23
TClass* tClass =
desc
.wrappedType().getClass();
24
void
*
p
= tClass->New();
25
int
offset
= tClass->GetBaseClassOffset(wrapperBaseTClass);
26
std::unique_ptr<WrapperBase> wrapperBase = getAnyPtr<WrapperBase>(
p
,
offset
);
27
if
(wrapperBase->isMergeable()) {
28
desc
.setIsMergeable(
true
);
29
}
30
}
31
}
32
}
33
}
// namespace edm
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition:
TypeWithDict.cc:74
BranchType.h
edm::setIsMergeable
void setIsMergeable(BranchDescription &)
Definition:
setIsMergeable.cc:15
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::InRun
Definition:
BranchType.h:11
getAnyPtr.h
WrapperBase.h
BranchDescription.h
edm::InLumi
Definition:
BranchType.h:11
edm::TypeWithDict::getClass
TClass * getClass() const
Definition:
TypeWithDict.cc:380
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
setIsMergeable.h
edm::BranchDescription
Definition:
BranchDescription.h:32
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
Generated for CMSSW Reference Manual by
1.8.16