test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::PathsAndConsumesOfModules Class Reference

#include <PathsAndConsumesOfModules.h>

Inheritance diagram for edm::PathsAndConsumesOfModules:
edm::PathsAndConsumesOfModulesBase

Public Member Functions

void initialize (Schedule const *, std::shared_ptr< ProductRegistry const >)
 
virtual ~PathsAndConsumesOfModules ()
 
- Public Member Functions inherited from edm::PathsAndConsumesOfModulesBase
std::vector< ModuleDescription
const * > const & 
allModules () const
 
std::vector< ConsumesInfoconsumesInfo (unsigned int moduleID) const
 
std::vector< std::string > const & endPaths () const
 
ModuleDescription const * moduleDescription (unsigned int moduleID) const
 
std::vector< ModuleDescription
const * > const & 
modulesOnEndPath (unsigned int endPathIndex) const
 
std::vector< ModuleDescription
const * > const & 
modulesOnPath (unsigned int pathIndex) const
 
std::vector< ModuleDescription
const * > const & 
modulesWhoseProductsAreConsumedBy (unsigned int moduleID) const
 
std::vector< std::string > const & paths () const
 
virtual ~PathsAndConsumesOfModulesBase ()
 

Private Member Functions

virtual std::vector
< ModuleDescription const * >
const & 
doAllModules () const override
 
virtual std::vector< ConsumesInfodoConsumesInfo (unsigned int moduleID) const override
 
virtual std::vector
< std::string > const & 
doEndPaths () const override
 
virtual ModuleDescription const * doModuleDescription (unsigned int moduleID) const override
 
virtual std::vector
< ModuleDescription const * >
const & 
doModulesOnEndPath (unsigned int endPathIndex) const override
 
virtual std::vector
< ModuleDescription const * >
const & 
doModulesOnPath (unsigned int pathIndex) const override
 
virtual std::vector
< ModuleDescription const * >
const & 
doModulesWhoseProductsAreConsumedBy (unsigned int moduleID) const override
 
virtual std::vector
< std::string > const & 
doPaths () const override
 
unsigned int moduleIndex (unsigned int moduleID) const
 

Private Attributes

std::vector< ModuleDescription
const * > 
allModuleDescriptions_
 
std::vector< std::string > endPaths_
 
std::vector< std::pair
< unsigned int, unsigned int > > 
moduleIDToIndex_
 
std::vector< std::vector
< ModuleDescription const * > > 
modulesOnEndPaths_
 
std::vector< std::vector
< ModuleDescription const * > > 
modulesOnPaths_
 
std::vector< std::vector
< ModuleDescription const * > > 
modulesWhoseProductsAreConsumedBy_
 
std::vector< std::string > paths_
 
std::shared_ptr
< ProductRegistry const > 
preg_
 
Schedule const * schedule_
 

Detailed Description

Description: See comments in the base class

Usage:

Definition at line 29 of file PathsAndConsumesOfModules.h.

Constructor & Destructor Documentation

edm::PathsAndConsumesOfModules::~PathsAndConsumesOfModules ( )
virtual

Definition at line 11 of file PathsAndConsumesOfModules.cc.

11  {
12  }

Member Function Documentation

virtual std::vector<ModuleDescription const*> const& edm::PathsAndConsumesOfModules::doAllModules ( ) const
inlineoverrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 41 of file PathsAndConsumesOfModules.h.

References allModuleDescriptions_.

41 { return allModuleDescriptions_; }
std::vector< ModuleDescription const * > allModuleDescriptions_
std::vector< ConsumesInfo > edm::PathsAndConsumesOfModules::doConsumesInfo ( unsigned int  moduleID) const
overrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 78 of file PathsAndConsumesOfModules.cc.

References edm::Schedule::allWorkers(), edm::Worker::consumesInfo(), moduleIndex(), and schedule_.

78  {
79  Worker const* worker = schedule_->allWorkers().at(moduleIndex(moduleID));
80  return worker->consumesInfo();
81  }
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:970
unsigned int moduleIndex(unsigned int moduleID) const
virtual std::vector<std::string> const& edm::PathsAndConsumesOfModules::doEndPaths ( ) const
inlineoverrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 39 of file PathsAndConsumesOfModules.h.

References endPaths_.

39 { return endPaths_; }
std::vector< std::string > endPaths_
ModuleDescription const * edm::PathsAndConsumesOfModules::doModuleDescription ( unsigned int  moduleID) const
overrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 50 of file PathsAndConsumesOfModules.cc.

References allModuleDescriptions_, Exception, edm::errors::LogicError, moduleIDToIndex_, and filterCSVwithJSON::target.

50  {
51  unsigned int dummy = 0;
52  auto target = std::make_pair(moduleID, dummy);
53  std::vector<std::pair<unsigned int, unsigned int> >::const_iterator iter =
54  std::lower_bound(moduleIDToIndex_.begin(), moduleIDToIndex_.end(), target);
55  if (iter == moduleIDToIndex_.end() || iter->first != moduleID) {
57  << "PathsAndConsumesOfModules::moduleDescription: Unknown moduleID\n";
58  }
59  return allModuleDescriptions_.at(iter->second);
60  }
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
std::vector< ModuleDescription const * > allModuleDescriptions_
std::vector< ModuleDescription const * > const & edm::PathsAndConsumesOfModules::doModulesOnEndPath ( unsigned int  endPathIndex) const
overrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 68 of file PathsAndConsumesOfModules.cc.

References modulesOnEndPaths_.

68  {
69  return modulesOnEndPaths_.at(endPathIndex);
70  }
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
std::vector< ModuleDescription const * > const & edm::PathsAndConsumesOfModules::doModulesOnPath ( unsigned int  pathIndex) const
overrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 63 of file PathsAndConsumesOfModules.cc.

References modulesOnPaths_.

63  {
64  return modulesOnPaths_.at(pathIndex);
65  }
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
std::vector< ModuleDescription const * > const & edm::PathsAndConsumesOfModules::doModulesWhoseProductsAreConsumedBy ( unsigned int  moduleID) const
overrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 73 of file PathsAndConsumesOfModules.cc.

References moduleIndex(), and modulesWhoseProductsAreConsumedBy_.

73  {
75  }
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
unsigned int moduleIndex(unsigned int moduleID) const
virtual std::vector<std::string> const& edm::PathsAndConsumesOfModules::doPaths ( ) const
inlineoverrideprivatevirtual

Implements edm::PathsAndConsumesOfModulesBase.

Definition at line 38 of file PathsAndConsumesOfModules.h.

References paths_.

38 { return paths_; }
void edm::PathsAndConsumesOfModules::initialize ( Schedule const *  schedule,
std::shared_ptr< ProductRegistry const >  preg 
)

Definition at line 14 of file PathsAndConsumesOfModules.cc.

References allModuleDescriptions_, edm::Schedule::endPaths(), endPaths_, edm::Schedule::fillModuleAndConsumesInfo(), i, edm::Schedule::moduleDescriptionsInEndPath(), edm::Schedule::moduleDescriptionsInPath(), moduleIDToIndex_, modulesOnEndPaths_, modulesOnPaths_, modulesWhoseProductsAreConsumedBy_, fed_dqm_sourceclient-live_cfg::path, paths_, edm::preg, preg_, Tree_ALCARECO_cff::schedule, schedule_, and edm::Schedule::triggerPaths().

Referenced by edm::EventProcessor::beginJob(), and edm::SubProcess::beginJob().

14  {
15 
17  preg_ = preg;
18 
19  paths_.clear();
20  schedule->triggerPaths(paths_);
21 
22  endPaths_.clear();
23  schedule->endPaths(endPaths_);
24 
25  modulesOnPaths_.resize(paths_.size());
26  unsigned int i = 0;
27  unsigned int hint = 0;
28  for(auto const& path : paths_) {
29  schedule->moduleDescriptionsInPath(path, modulesOnPaths_.at(i), hint);
30  if(!modulesOnPaths_.at(i).empty()) ++hint;
31  ++i;
32  }
33 
34  modulesOnEndPaths_.resize(endPaths_.size());
35  i = 0;
36  hint = 0;
37  for(auto const& endpath : endPaths_) {
38  schedule->moduleDescriptionsInEndPath(endpath, modulesOnEndPaths_.at(i), hint);
39  if(!modulesOnEndPaths_.at(i).empty()) ++hint;
40  ++i;
41  }
42 
43  schedule->fillModuleAndConsumesInfo(allModuleDescriptions_,
46  *preg);
47  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< ModuleDescription const * > > modulesWhoseProductsAreConsumedBy_
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
std::vector< ModuleDescription const * > allModuleDescriptions_
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
std::vector< std::string > endPaths_
std::shared_ptr< ProductRegistry const > preg_
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
preg
Definition: Schedule.cc:374
unsigned int edm::PathsAndConsumesOfModules::moduleIndex ( unsigned int  moduleID) const
private

Definition at line 84 of file PathsAndConsumesOfModules.cc.

References Exception, edm::errors::LogicError, moduleIDToIndex_, and filterCSVwithJSON::target.

Referenced by doConsumesInfo(), and doModulesWhoseProductsAreConsumedBy().

84  {
85  unsigned int dummy = 0;
86  auto target = std::make_pair(moduleID, dummy);
87  std::vector<std::pair<unsigned int, unsigned int> >::const_iterator iter =
88  std::lower_bound(moduleIDToIndex_.begin(), moduleIDToIndex_.end(), target);
89  if (iter == moduleIDToIndex_.end() || iter->first != moduleID) {
91  << "PathsAndConsumesOfModules::moduleIndex: Unknown moduleID\n";
92  }
93  return iter->second;
94  }
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_

Member Data Documentation

std::vector<ModuleDescription const*> edm::PathsAndConsumesOfModules::allModuleDescriptions_
private

Definition at line 57 of file PathsAndConsumesOfModules.h.

Referenced by doAllModules(), doModuleDescription(), and initialize().

std::vector<std::string> edm::PathsAndConsumesOfModules::endPaths_
private

Definition at line 55 of file PathsAndConsumesOfModules.h.

Referenced by doEndPaths(), and initialize().

std::vector<std::pair<unsigned int, unsigned int> > edm::PathsAndConsumesOfModules::moduleIDToIndex_
private

Definition at line 64 of file PathsAndConsumesOfModules.h.

Referenced by doModuleDescription(), initialize(), and moduleIndex().

std::vector<std::vector<ModuleDescription const*> > edm::PathsAndConsumesOfModules::modulesOnEndPaths_
private

Definition at line 60 of file PathsAndConsumesOfModules.h.

Referenced by doModulesOnEndPath(), and initialize().

std::vector<std::vector<ModuleDescription const*> > edm::PathsAndConsumesOfModules::modulesOnPaths_
private

Definition at line 59 of file PathsAndConsumesOfModules.h.

Referenced by doModulesOnPath(), and initialize().

std::vector<std::vector<ModuleDescription const*> > edm::PathsAndConsumesOfModules::modulesWhoseProductsAreConsumedBy_
private

Definition at line 66 of file PathsAndConsumesOfModules.h.

Referenced by doModulesWhoseProductsAreConsumedBy(), and initialize().

std::vector<std::string> edm::PathsAndConsumesOfModules::paths_
private
std::shared_ptr<ProductRegistry const> edm::PathsAndConsumesOfModules::preg_
private

Definition at line 69 of file PathsAndConsumesOfModules.h.

Referenced by initialize().

Schedule const* edm::PathsAndConsumesOfModules::schedule_
private