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
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
BranchType.h
edm::insertSelectedProcesses
void insertSelectedProcesses(BranchDescription const &desc, std::set< std::string > &processes, std::set< std::string > &processesWithKeptProcessBlockProducts)
Definition: insertSelectedProcesses.cc:15
edm
HLT enums.
Definition: AlignableModifier.h:19
TypeWithDict.h
edm::InRun
Definition: BranchType.h:11
edm::InProcess
Definition: BranchType.h:11
getAnyPtr.h
insertSelectedProcesses.h
WrapperBase.h
BranchDescription.h
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82