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

edm::MergeableRunProductProcesses::MergeableRunProductProcesses ( )

Definition at line 16 of file MergeableRunProductProcesses.cc.

16 {}

Member Function Documentation

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

Definition at line 18 of file MergeableRunProductProcesses.cc.

References edm::BranchDescription::branchType(), edm::TypeWithDict::byName(), SimDataFormats::CaloAnalysis::cp, edm::TypeWithDict::getClass(), edm::InRun, hltrates_dqm_sourceclient-live_cfg::offset, AlCaHLTBitMon_ParallelJobs::p, edm::BranchDescription::present(), processesWithMergeableRunProducts_, edm::BranchDescription::processName(), dumpMFGeometry_cfg::prod, edm::BranchDescription::produced(), edm::ProductRegistry::productList(), and edm::BranchDescription::wrappedType().

Referenced by edm::EventProcessor::init(), and size().

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
std::vector<std::string>::size_type edm::MergeableRunProductProcesses::size ( void  ) const
inline

Member Data Documentation

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