FWCore
Framework
src
MergeableRunProductProcesses.cc
Go to the documentation of this file.
1
2
#include "
FWCore/Framework/interface/MergeableRunProductProcesses.h
"
3
4
#include "
DataFormats/Common/interface/WrapperBase.h
"
5
#include "
DataFormats/Provenance/interface/BranchDescription.h
"
6
#include "
DataFormats/Provenance/interface/ProductRegistry.h
"
7
#include "
FWCore/Utilities/interface/getAnyPtr.h
"
8
9
#include "TClass.h"
10
11
#include <memory>
12
#include <set>
13
14
namespace
edm
{
15
16
MergeableRunProductProcesses::MergeableRunProductProcesses
() {}
17
18
void
MergeableRunProductProcesses::setProcessesWithMergeableRunProducts
(
ProductRegistry
const
& productRegistry) {
19
TClass* wrapperBaseTClass =
TypeWithDict::byName
(
"edm::WrapperBase"
).
getClass
();
20
std::set<std::string> processSet;
21
for
(
auto
const
&
prod
: productRegistry.
productList
()) {
22
BranchDescription
const
& desc =
prod
.second;
23
if
(desc.
branchType
() ==
InRun
&& !desc.
produced
() && desc.
present
()) {
24
TClass*
cp
= desc.
wrappedType
().
getClass
();
25
void
*
p
=
cp
->New();
26
int
offset
=
cp
->GetBaseClassOffset(wrapperBaseTClass);
27
std::unique_ptr<WrapperBase> edp = getAnyPtr<WrapperBase>(
p
,
offset
);
28
if
(edp->isMergeable()) {
29
processSet.insert(desc.
processName
());
30
}
31
}
32
}
33
processesWithMergeableRunProducts_
.assign(processSet.begin(), processSet.end());
34
}
35
}
// namespace edm
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition:
TypeWithDict.cc:74
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::BranchDescription::wrappedType
TypeWithDict const & wrappedType() const
Definition:
BranchDescription.h:92
edm::MergeableRunProductProcesses::processesWithMergeableRunProducts_
std::vector< std::string > processesWithMergeableRunProducts_
Definition:
MergeableRunProductProcesses.h:31
ProductRegistry.h
edm::InRun
Definition:
BranchType.h:11
edm::ProductRegistry
Definition:
ProductRegistry.h:34
edm::BranchDescription::present
bool present() const
Definition:
BranchDescription.h:84
edm::BranchDescription::processName
std::string const & processName() const
Definition:
BranchDescription.h:73
dumpMFGeometry_cfg.prod
prod
Definition:
dumpMFGeometry_cfg.py:24
getAnyPtr.h
WrapperBase.h
BranchDescription.h
edm::BranchDescription::branchType
BranchType const & branchType() const
Definition:
BranchDescription.h:121
edm::BranchDescription::produced
bool produced() const
Definition:
BranchDescription.h:82
edm::MergeableRunProductProcesses::MergeableRunProductProcesses
MergeableRunProductProcesses()
Definition:
MergeableRunProductProcesses.cc:16
edm::TypeWithDict::getClass
TClass * getClass() const
Definition:
TypeWithDict.cc:380
edm::ProductRegistry::productList
ProductList const & productList() const
Definition:
ProductRegistry.h:73
MergeableRunProductProcesses.h
edm::BranchDescription
Definition:
BranchDescription.h:32
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition:
CommonMethods.py:192
edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts
void setProcessesWithMergeableRunProducts(ProductRegistry const &productRegistry)
Definition:
MergeableRunProductProcesses.cc:18
Generated for CMSSW Reference Manual by
1.8.16