CMS 3D CMS Logo

MergeableRunProductProcesses.cc
Go to the documentation of this file.
1 
3 
8 
9 #include "TClass.h"
10 
11 #include <memory>
12 #include <set>
13 
14 namespace edm {
15 
17 
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::MergeableRunProductProcesses::processesWithMergeableRunProducts_
std::vector< std::string > processesWithMergeableRunProducts_
Definition: MergeableRunProductProcesses.h:31
hgcal_conditions::parameters
Definition: HGCConditions.h:86
ProductRegistry.h
edm::InRun
Definition: BranchType.h:11
edm::ProductRegistry
Definition: ProductRegistry.h:37
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
getAnyPtr.h
WrapperBase.h
BranchDescription.h
edm::MergeableRunProductProcesses::MergeableRunProductProcesses
MergeableRunProductProcesses()
Definition: MergeableRunProductProcesses.cc:16
edm::TypeWithDict::getClass
TClass * getClass() const
Definition: TypeWithDict.cc:380
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::ProductRegistry::productList
ProductList const & productList() const
Definition: ProductRegistry.h:76
MergeableRunProductProcesses.h
edm::BranchDescription
Definition: BranchDescription.h:32
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts
void setProcessesWithMergeableRunProducts(ProductRegistry const &productRegistry)
Definition: MergeableRunProductProcesses.cc:18