CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::MergeableRunProductProcesses Class Reference

#include <MergeableRunProductProcesses.h>

Public Member Functions

std::string const & getProcessName (unsigned int index) const
 
 MergeableRunProductProcesses ()
 
std::vector< std::string > const & processesWithMergeableRunProducts () const
 
void setProcessesWithMergeableRunProducts (ProductRegistry const &productRegistry)
 
std::vector< std::string >::size_type size () const
 

Private Attributes

std::vector< std::string > processesWithMergeableRunProducts_
 

Detailed Description

Definition at line 11 of file MergeableRunProductProcesses.h.

Constructor & Destructor Documentation

◆ MergeableRunProductProcesses()

edm::MergeableRunProductProcesses::MergeableRunProductProcesses ( )

Definition at line 16 of file MergeableRunProductProcesses.cc.

16 {}

Member Function Documentation

◆ getProcessName()

std::string const& edm::MergeableRunProductProcesses::getProcessName ( unsigned int  index) const
inline

◆ processesWithMergeableRunProducts()

std::vector<std::string> const& edm::MergeableRunProductProcesses::processesWithMergeableRunProducts ( ) const
inline

◆ setProcessesWithMergeableRunProducts()

void edm::MergeableRunProductProcesses::setProcessesWithMergeableRunProducts ( ProductRegistry const &  productRegistry)

Definition at line 18 of file MergeableRunProductProcesses.cc.

References edm::TypeWithDict::byName(), submitPVResolutionJobs::desc, edm::TypeWithDict::getClass(), edm::InRun, hltrates_dqm_sourceclient-live_cfg::offset, AlCaHLTBitMon_ParallelJobs::p, processesWithMergeableRunProducts_, dumpMFGeometry_cfg::prod, and edm::ProductRegistry::productList().

Referenced by edm::EventProcessor::init().

18  {
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  }
std::vector< std::string > processesWithMergeableRunProducts_
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
TClass * getClass() const

◆ size()

std::vector<std::string>::size_type edm::MergeableRunProductProcesses::size ( void  ) const
inline

Member Data Documentation

◆ processesWithMergeableRunProducts_

std::vector<std::string> edm::MergeableRunProductProcesses::processesWithMergeableRunProducts_
private