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 
18  // Select input processes in which mergeable run products were produced
19  if (desc.branchType() == InRun && !desc.produced()) {
20 
21  // Determine if the product is "mergeable"
22  TClass* tClass = desc.wrappedType().getClass();
23  void* p = tClass->New();
24  TClass* wrapperBaseTClass = TypeWithDict::byName("edm::WrapperBase").getClass();
25  int offset = tClass->GetBaseClassOffset(wrapperBaseTClass);
26  std::unique_ptr<WrapperBase> edp = getAnyPtr<WrapperBase>(p, offset);
27  if (edp->isMergeable()) {
28  // record the process names in a set (which is ordered and unique)
29  processes.insert(desc.processName());
30  }
31  }
32  }
33 }
BranchType const & branchType() const
std::string const & processName() const
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:82
TClass * getClass() const
HLT enums.
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes)
TypeWithDict const & wrappedType() const