FWCore
Framework
src
insertSelectedProcesses.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/src/insertSelectedProcesses.h
"
2
3
#include "
DataFormats/Common/interface/WrapperBase.h
"
4
#include "
DataFormats/Provenance/interface/BranchDescription.h
"
5
#include "
FWCore/Utilities/interface/BranchType.h
"
6
#include "
FWCore/Utilities/interface/getAnyPtr.h
"
7
#include "
FWCore/Reflection/interface/TypeWithDict.h
"
8
9
#include "TClass.h"
10
11
#include <memory>
12
13
namespace
edm
{
14
15
void
insertSelectedProcesses
(
BranchDescription
const
&
desc
, std::set<std::string>&
processes
) {
16
// Select input processes in which mergeable run products were produced
17
if
(
desc
.branchType() ==
InRun
&& !
desc
.produced()) {
18
// Determine if the product is "mergeable"
19
TClass* tClass =
desc
.wrappedType().getClass();
20
void
*
p
= tClass->New();
21
TClass* wrapperBaseTClass =
TypeWithDict::byName
(
"edm::WrapperBase"
).
getClass
();
22
int
offset
= tClass->GetBaseClassOffset(wrapperBaseTClass);
23
std::unique_ptr<WrapperBase> edp = getAnyPtr<WrapperBase>(
p
,
offset
);
24
if
(edp->isMergeable()) {
25
// record the process names in a set (which is ordered and unique)
26
processes
.insert(
desc
.processName());
27
}
28
}
29
}
30
}
// namespace edm
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition:
TypeWithDict.cc:74
BranchType.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
TypeWithDict.h
edm::InRun
Definition:
BranchType.h:11
getAnyPtr.h
insertSelectedProcesses.h
WrapperBase.h
BranchDescription.h
edm::TypeWithDict::getClass
TClass * getClass() const
Definition:
TypeWithDict.cc:380
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
dqmiodatasetharvest.processes
processes
Definition:
dqmiodatasetharvest.py:190
edm::BranchDescription
Definition:
BranchDescription.h:32
edm::insertSelectedProcesses
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes)
Definition:
insertSelectedProcesses.cc:15
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
Generated for CMSSW Reference Manual by
1.8.16