CMS 3D CMS Logo

insertSelectedProcesses.cc
Go to the documentation of this file.
2 
8 
9 #include "TClass.h"
10 
11 #include <memory>
12 
13 namespace edm {
14 
16  std::set<std::string>& processes,
17  std::set<std::string>& processesWithKeptProcessBlockProducts) {
18  // Select input processes in which mergeable run products were produced
19  if (desc.branchType() == InRun && !desc.produced()) {
20  // Determine if the product is "mergeable"
21  TClass* tClass = desc.wrappedType().getClass();
22  void* p = tClass->New();
23  TClass* wrapperBaseTClass = TypeWithDict::byName("edm::WrapperBase").getClass();
24  int offset = tClass->GetBaseClassOffset(wrapperBaseTClass);
25  std::unique_ptr<WrapperBase> edp = getAnyPtr<WrapperBase>(p, offset);
26  if (edp->isMergeable()) {
27  // record the process names in a set (which is ordered and unique)
28  processes.insert(desc.processName());
29  }
30  }
31  if (desc.branchType() == InProcess) {
32  processesWithKeptProcessBlockProducts.insert(desc.processName());
33  }
34  }
35 } // namespace edm
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes, std::set< std::string > &processesWithKeptProcessBlockProducts)
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
TClass * getClass() const
HLT enums.