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.

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  }

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().

◆ 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
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:74
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::MergeableRunProductProcesses::processesWithMergeableRunProducts_
std::vector< std::string > processesWithMergeableRunProducts_
Definition: MergeableRunProductProcesses.h:31
hgcal_conditions::parameters
Definition: HGCConditions.h:86
edm::InRun
Definition: BranchType.h:11
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::TypeWithDict::getClass
TClass * getClass() const
Definition: TypeWithDict.cc:380
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82