CMS 3D CMS Logo

PathsAndConsumesOfModules.cc
Go to the documentation of this file.
2 
7 
9 
10 #include <algorithm>
11 namespace edm {
12 
15 
16  void PathsAndConsumesOfModules::initialize(Schedule const* schedule, std::shared_ptr<ProductRegistry const> preg) {
18  preg_ = preg;
19 
20  paths_.clear();
21  schedule->triggerPaths(paths_);
22 
23  endPaths_.clear();
24  schedule->endPaths(endPaths_);
25 
26  modulesOnPaths_.resize(paths_.size());
27  unsigned int i = 0;
28  unsigned int hint = 0;
29  for (auto const& path : paths_) {
30  schedule->moduleDescriptionsInPath(path, modulesOnPaths_.at(i), hint);
31  if (!modulesOnPaths_.at(i).empty())
32  ++hint;
33  ++i;
34  }
35 
36  modulesOnEndPaths_.resize(endPaths_.size());
37  i = 0;
38  hint = 0;
39  for (auto const& endpath : endPaths_) {
40  schedule->moduleDescriptionsInEndPath(endpath, modulesOnEndPaths_.at(i), hint);
41  if (!modulesOnEndPaths_.at(i).empty())
42  ++hint;
43  ++i;
44  }
45 
46  schedule->fillModuleAndConsumesInfo(allModuleDescriptions_,
50  *preg);
51  }
52 
53  void PathsAndConsumesOfModules::removeModules(std::vector<ModuleDescription const*> const& modules) {
54  // First check that no modules on Paths are removed
55  auto checkPath = [&modules](auto const& paths) {
56  for (auto const& path : paths) {
57  for (auto const& description : path) {
58  if (std::find(modules.begin(), modules.end(), description) != modules.end()) {
59  throw cms::Exception("Assert")
60  << "PathsAndConsumesOfModules::removeModules() is trying to remove a module with label "
61  << description->moduleLabel() << " id " << description->id() << " from a Path, this should not happen.";
62  }
63  }
64  }
65  };
68 
69  // Remove the modules and adjust the indices in idToIndex map
70  for (auto iModule = 0U; iModule != allModuleDescriptions_.size(); ++iModule) {
71  auto found = std::find(modules.begin(), modules.end(), allModuleDescriptions_[iModule]);
72  if (found != modules.end()) {
73  allModuleDescriptions_.erase(allModuleDescriptions_.begin() + iModule);
74  for (auto iBranchType = 0U; iBranchType != NumBranchTypes; ++iBranchType) {
75  modulesWhoseProductsAreConsumedBy_[iBranchType].erase(
76  modulesWhoseProductsAreConsumedBy_[iBranchType].begin() + iModule);
77  }
80  for (auto& idToIndex : moduleIDToIndex_) {
81  if (idToIndex.second >= iModule) {
82  idToIndex.second--;
83  }
84  }
85  --iModule;
86  }
87  }
88  }
89 
91  unsigned int moduleID) const {
93  }
94 
96  unsigned int dummy = 0;
97  auto target = std::make_pair(moduleID, dummy);
98  std::vector<std::pair<unsigned int, unsigned int>>::const_iterator iter =
100  if (iter == moduleIDToIndex_.end() || iter->first != moduleID) {
102  << "PathsAndConsumesOfModules::moduleDescription: Unknown moduleID " << moduleID << "\n";
103  }
104  return allModuleDescriptions_.at(iter->second);
105  }
106 
107  std::vector<ModuleDescription const*> const& PathsAndConsumesOfModules::doModulesOnPath(unsigned int pathIndex) const {
108  return modulesOnPaths_.at(pathIndex);
109  }
110 
111  std::vector<ModuleDescription const*> const& PathsAndConsumesOfModules::doModulesOnEndPath(
112  unsigned int endPathIndex) const {
113  return modulesOnEndPaths_.at(endPathIndex);
114  }
115 
116  std::vector<ModuleDescription const*> const& PathsAndConsumesOfModules::doModulesWhoseProductsAreConsumedBy(
117  unsigned int moduleID, BranchType branchType) const {
118  return modulesWhoseProductsAreConsumedBy_[branchType].at(moduleIndex(moduleID));
119  }
120 
121  std::vector<ConsumesInfo> PathsAndConsumesOfModules::doConsumesInfo(unsigned int moduleID) const {
122  Worker const* worker = schedule_->allWorkers().at(moduleIndex(moduleID));
123  return worker->consumesInfo();
124  }
125 
127  // moduleIDToIndex_ is sorted, so last element has the largest ID
128  return moduleIDToIndex_.empty() ? 0 : moduleIDToIndex_.back().first;
129  }
130 
131  unsigned int PathsAndConsumesOfModules::moduleIndex(unsigned int moduleID) const {
132  unsigned int dummy = 0;
133  auto target = std::make_pair(moduleID, dummy);
134  std::vector<std::pair<unsigned int, unsigned int>>::const_iterator iter =
136  if (iter == moduleIDToIndex_.end() || iter->first != moduleID) {
138  << "PathsAndConsumesOfModules::moduleIndex: Unknown moduleID " << moduleID << "\n";
139  }
140  return iter->second;
141  }
142 } // namespace edm
143 
144 namespace {
145  // helper function for nonConsumedUnscheduledModules,
146  void findAllConsumedModules(edm::PathsAndConsumesOfModulesBase const& iPnC,
147  edm::ModuleDescription const* module,
148  std::unordered_set<unsigned int>& consumedModules) {
149  // If this node of the DAG has been processed already, no need to
150  // reprocess again
151  if (consumedModules.find(module->id()) != consumedModules.end()) {
152  return;
153  }
154  consumedModules.insert(module->id());
155  for (auto iBranchType = 0U; iBranchType != edm::NumBranchTypes; ++iBranchType) {
156  for (auto const& c :
157  iPnC.modulesWhoseProductsAreConsumedBy(module->id(), static_cast<edm::BranchType>(iBranchType))) {
158  findAllConsumedModules(iPnC, c, consumedModules);
159  }
160  }
161  }
162 } // namespace
163 
164 namespace edm {
165  std::vector<ModuleDescription const*> nonConsumedUnscheduledModules(
166  edm::PathsAndConsumesOfModulesBase const& iPnC, std::vector<ModuleProcessName>& consumedByChildren) {
167  const std::string kTriggerResults("TriggerResults");
168 
169  std::vector<std::string> pathNames = iPnC.paths();
170  const unsigned int kFirstEndPathIndex = pathNames.size();
171  pathNames.insert(pathNames.end(), iPnC.endPaths().begin(), iPnC.endPaths().end());
172 
173  // The goal is to find modules that are not depended upon by
174  // scheduled modules. To do that, we identify all modules that are
175  // depended upon by scheduled modules, and do a set subtraction.
176  //
177  // First, denote all scheduled modules (i.e. in Paths and
178  // EndPaths) as "consumers".
179  std::vector<ModuleDescription const*> consumerModules;
180  for (unsigned int pathIndex = 0; pathIndex != pathNames.size(); ++pathIndex) {
181  std::vector<ModuleDescription const*> const* moduleDescriptions;
182  if (pathIndex < kFirstEndPathIndex) {
183  moduleDescriptions = &(iPnC.modulesOnPath(pathIndex));
184  } else {
185  moduleDescriptions = &(iPnC.modulesOnEndPath(pathIndex - kFirstEndPathIndex));
186  }
187  std::copy(moduleDescriptions->begin(), moduleDescriptions->end(), std::back_inserter(consumerModules));
188  }
189 
190  // Then add TriggerResults, and all Paths and EndPaths themselves
191  // to the set of "consumers" (even if they don't depend on any
192  // data products, they must not be deleted). Also add anything
193  // consumed by child SubProcesses to the set of "consumers".
194  auto const& allModules = iPnC.allModules();
195  for (auto const& description : allModules) {
196  if (description->moduleLabel() == kTriggerResults or
197  std::find(pathNames.begin(), pathNames.end(), description->moduleLabel()) != pathNames.end()) {
198  consumerModules.push_back(description);
199  } else if (std::binary_search(consumedByChildren.begin(),
200  consumedByChildren.end(),
201  ModuleProcessName{description->moduleLabel(), description->processName()}) or
202  std::binary_search(consumedByChildren.begin(),
203  consumedByChildren.end(),
204  ModuleProcessName{description->moduleLabel(), ""})) {
205  consumerModules.push_back(description);
206  }
207  }
208 
209  // Find modules that have any data dependence path to any module
210  // in consumerModules.
211  std::unordered_set<unsigned int> consumedModules;
212  for (auto& description : consumerModules) {
213  findAllConsumedModules(iPnC, description, consumedModules);
214  }
215 
216  // All other modules will then be classified as non-consumed, even
217  // if they would have dependencies within them.
218  std::vector<ModuleDescription const*> unusedModules;
219  std::copy_if(allModules.begin(),
220  allModules.end(),
221  std::back_inserter(unusedModules),
222  [&consumedModules](ModuleDescription const* description) {
223  return consumedModules.find(description->id()) == consumedModules.end();
224  });
225  return unusedModules;
226  }
227 
228  //====================================
229  // checkForCorrectness algorithm
230  //
231  // The code creates a 'dependency' graph between all
232  // modules. A module depends on another module if
233  // 1) it 'consumes' data produced by that module
234  // 2) it appears directly after the module within a Path
235  //
236  // If there is a cycle in the 'dependency' graph then
237  // the schedule may be unrunnable. The schedule is still
238  // runnable if all cycles have at least two edges which
239  // connect modules only by Path dependencies (i.e. not
240  // linked by a data dependency).
241  //
242  // Example 1:
243  // C consumes data from B
244  // Path 1: A + B + C
245  // Path 2: B + C + A
246  //
247  // Cycle: A after C [p2], C consumes B, B after A [p1]
248  // Since this cycle has 2 path only edges it is OK since
249  // A and (B+C) are independent so their run order doesn't matter
250  //
251  // Example 2:
252  // B consumes A
253  // C consumes B
254  // Path: C + A
255  //
256  // Cycle: A after C [p], C consumes B, B consumes A
257  // Since this cycle has 1 path only edge it is unrunnable.
258  //
259  // Example 3:
260  // A consumes B
261  // B consumes C
262  // C consumes A
263  // (no Path since unscheduled execution)
264  //
265  // Cycle: A consumes B, B consumes C, C consumes A
266  // Since this cycle has 0 path only edges it is unrunnable.
267  //====================================
268 
269  void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const& iPnC, bool iPrintDependencies) {
270  using namespace edm::graph;
271  //Need to lookup ids to names quickly
272  std::unordered_map<unsigned int, std::string> moduleIndexToNames;
273 
274  std::unordered_map<std::string, unsigned int> pathStatusInserterModuleLabelToModuleID;
275 
276  //for testing, state that TriggerResults is at the end of all paths
277  const std::string kTriggerResults("TriggerResults");
278  const std::string kPathStatusInserter("PathStatusInserter");
279  const std::string kEndPathStatusInserter("EndPathStatusInserter");
280  unsigned int kTriggerResultsIndex = kInvalidIndex;
281  unsigned int largestIndex = 0;
282  unsigned int kPathToTriggerResultsDependencyLastIndex = kInvalidIndex;
283  for (auto const& description : iPnC.allModules()) {
284  moduleIndexToNames.insert(std::make_pair(description->id(), description->moduleLabel()));
285  if (kTriggerResults == description->moduleLabel()) {
286  kTriggerResultsIndex = description->id();
287  }
288  if (description->id() > largestIndex) {
289  largestIndex = description->id();
290  }
291  if (description->moduleName() == kPathStatusInserter || description->moduleName() == kEndPathStatusInserter) {
292  pathStatusInserterModuleLabelToModuleID[description->moduleLabel()] = description->id();
293  }
294  }
295  kPathToTriggerResultsDependencyLastIndex = largestIndex;
296 
297  /*
298  {
299  //We need to explicitly check that modules on Paths do not try to read data from
300  // Modules which are only on EndPaths. The circular dependency finder has been
301  // known to miss these.
302  std::unordered_set<unsigned int> modulesOnlyOnEndPaths;
303  auto const& endPaths = iPnC.endPaths();
304  for( unsigned int pathIndex = 0; pathIndex != endPaths.size(); ++pathIndex) {
305  auto const& moduleDescriptions = iPnC.modulesOnEndPath(pathIndex);
306  for(auto const& description: moduleDescriptions) {
307  modulesOnlyOnEndPaths.insert(description->id());
308  }
309  }
310 
311  std::unordered_set<unsigned int> modulesOnPaths;
312  auto const& paths = iPnC.paths();
313  for( unsigned int pathIndex = 0; pathIndex != paths.size(); ++pathIndex) {
314  auto const& moduleDescriptions = iPnC.modulesOnPath(pathIndex);
315  for(auto const& description: moduleDescriptions) {
316  auto itFind =modulesOnlyOnEndPaths.find(description->id());
317  if(modulesOnlyOnEndPaths.end() != itFind) {
318  modulesOnlyOnEndPaths.erase(itFind);
319  }
320  modulesOnPaths.insert(description->id());
321  }
322  }
323 
324  for(auto moduleIndex : modulesOnPaths) {
325  auto const& dependentModules = iPnC.modulesWhoseProductsAreConsumedBy(moduleIndex);
326  for(auto const& depDescription: dependentModules) {
327  auto itFind = modulesOnlyOnEndPaths.find(depDescription->id());
328  if(itFind != modulesOnlyOnEndPaths.end()) {
329  throw edm::Exception(edm::errors::ScheduleExecutionFailure, "Unrunnable schedule\n")
330  <<"The module "<<moduleIndexToNames[moduleIndex]<<" is on a Path and depends on data from module "
331  <<moduleIndexToNames[depDescription->id()]<<" which is on an EndPath.";
332  }
333  }
334  }
335 
336  }
337  */
338 
339  //If a module to module dependency comes from a path, remember which path
340  EdgeToPathMap edgeToPathMap;
341 
342  //Need to be able to quickly look up which paths a module appears on
343  std::unordered_map<unsigned int, std::vector<unsigned int>> moduleIndexToPathIndex;
344 
345  //determine the path dependencies
346  std::vector<std::string> pathNames = iPnC.paths();
347  const unsigned int kFirstEndPathIndex = pathNames.size();
348 
349  const std::string kPathEnded("@PathEnded");
350  const std::string kEndPathStart("@EndPathStart");
351 
352  //The finished processing depends on all paths and end paths
353  const std::string kFinishedProcessing("@FinishedProcessing");
354  const unsigned int kFinishedProcessingIndex{0};
355  moduleIndexToNames.insert(std::make_pair(kFinishedProcessingIndex, kFinishedProcessing));
356 
357  pathNames.insert(pathNames.end(), iPnC.endPaths().begin(), iPnC.endPaths().end());
358  std::vector<std::vector<unsigned int>> pathIndexToModuleIndexOrder(pathNames.size());
359  {
360  for (unsigned int pathIndex = 0; pathIndex != pathNames.size(); ++pathIndex) {
361  std::set<unsigned int> alreadySeenIndex;
362 
363  std::vector<ModuleDescription const*> const* moduleDescriptions;
364  if (pathIndex < kFirstEndPathIndex) {
365  moduleDescriptions = &(iPnC.modulesOnPath(pathIndex));
366  } else {
367  moduleDescriptions = &(iPnC.modulesOnEndPath(pathIndex - kFirstEndPathIndex));
368  }
369  unsigned int lastModuleIndex = kInvalidIndex;
370  auto& pathOrder = pathIndexToModuleIndexOrder[pathIndex];
371  pathOrder.reserve(moduleDescriptions->size() + 1);
372  for (auto const& description : *moduleDescriptions) {
373  auto found = alreadySeenIndex.insert(description->id());
374  if (found.second) {
375  //first time for this path
376  unsigned int const moduleIndex = description->id();
377  pathOrder.push_back(moduleIndex);
378  auto& paths = moduleIndexToPathIndex[moduleIndex];
379  paths.push_back(pathIndex);
380  if (lastModuleIndex != kInvalidIndex) {
381  edgeToPathMap[std::make_pair(moduleIndex, lastModuleIndex)].push_back(pathIndex);
382  }
383  lastModuleIndex = moduleIndex;
384  }
385  }
386  //Have TriggerResults depend on the end of all paths
387  // Have all EndPaths depend on TriggerResults
388  auto labelToID = pathStatusInserterModuleLabelToModuleID.find(pathNames[pathIndex]);
389  if (labelToID == pathStatusInserterModuleLabelToModuleID.end()) {
390  // should never happen
392  << "PathsAndConsumesOfModules::moduleDescription:checkForModuleDependencyCorrectness Could not find "
393  "PathStatusInserter\n";
394  }
395  unsigned int pathStatusInserterModuleID = labelToID->second;
396  if (pathIndex < kFirstEndPathIndex) {
397  if ((lastModuleIndex != kInvalidIndex)) {
398  edgeToPathMap[std::make_pair(pathStatusInserterModuleID, lastModuleIndex)].push_back(pathIndex);
399  moduleIndexToNames.insert(std::make_pair(pathStatusInserterModuleID, kPathEnded));
400  if (kTriggerResultsIndex != kInvalidIndex) {
401  edgeToPathMap[std::make_pair(kTriggerResultsIndex, pathStatusInserterModuleID)].push_back(
403  }
404  //Need to make dependency for finished process
405  edgeToPathMap[std::make_pair(kFinishedProcessingIndex, pathStatusInserterModuleID)].push_back(
407  pathOrder.push_back(pathStatusInserterModuleID);
408  }
409  } else {
410  if ((not moduleDescriptions->empty())) {
411  if (kTriggerResultsIndex != kInvalidIndex) {
412  ++kPathToTriggerResultsDependencyLastIndex;
413  edgeToPathMap[std::make_pair(moduleDescriptions->front()->id(), kPathToTriggerResultsDependencyLastIndex)]
414  .push_back(pathIndex);
415  moduleIndexToNames.insert(std::make_pair(kPathToTriggerResultsDependencyLastIndex, kEndPathStart));
416  edgeToPathMap[std::make_pair(kPathToTriggerResultsDependencyLastIndex, kTriggerResultsIndex)].push_back(
418  pathOrder.insert(pathOrder.begin(), kPathToTriggerResultsDependencyLastIndex);
419  }
420  //Need to make dependency for finished process
421  ++kPathToTriggerResultsDependencyLastIndex;
422  edgeToPathMap[std::make_pair(pathStatusInserterModuleID, lastModuleIndex)].push_back(pathIndex);
423  moduleIndexToNames.insert(std::make_pair(pathStatusInserterModuleID, kPathEnded));
424  edgeToPathMap[std::make_pair(kFinishedProcessingIndex, pathStatusInserterModuleID)].push_back(
426  pathOrder.push_back(pathStatusInserterModuleID);
427  }
428  }
429  }
430  }
431  {
432  //determine the data dependencies
433  for (auto const& description : iPnC.allModules()) {
434  unsigned int const moduleIndex = description->id();
435  auto const& dependentModules = iPnC.modulesWhoseProductsAreConsumedBy(moduleIndex);
436  for (auto const& depDescription : dependentModules) {
437  if (iPrintDependencies) {
438  edm::LogAbsolute("ModuleDependency")
439  << "ModuleDependency '" << description->moduleLabel() << "' depends on data products from module '"
440  << depDescription->moduleLabel() << "'";
441  }
442  //see if all paths containing this module also contain the dependent module earlier in the path
443  // if it does, then treat this only as a path dependency and not a data dependency as this
444  // simplifies the circular dependency checking logic
445  auto depID = depDescription->id();
446  auto itPathsFound = moduleIndexToPathIndex.find(moduleIndex);
447  bool keepDataDependency = true;
448  auto itDepsPathsFound = moduleIndexToPathIndex.find(depID);
449  if (itPathsFound != moduleIndexToPathIndex.end() and itDepsPathsFound != moduleIndexToPathIndex.end()) {
450  keepDataDependency = false;
451  for (auto const pathIndex : itPathsFound->second) {
452  for (auto idToCheck : pathIndexToModuleIndexOrder[pathIndex]) {
453  if (idToCheck == depID) {
454  //found dependent module first so check next path
455  break;
456  }
457  if (idToCheck == moduleIndex) {
458  //did not find dependent module earlier on path so
459  // must keep data dependency
460  keepDataDependency = true;
461  break;
462  }
463  }
464  if (keepDataDependency) {
465  break;
466  }
467  }
468  }
469  if (keepDataDependency) {
470  edgeToPathMap[std::make_pair(moduleIndex, depID)].push_back(kDataDependencyIndex);
471  }
472  }
473  }
474  }
475  // Don't bother if there are no modules in any paths (the
476  // dependence check crashes if the configuration has only Paths
477  // with Tasks with modules, but nothing to trigger any work to
478  // run)
479  if (not moduleIndexToPathIndex.empty()) {
480  graph::throwIfImproperDependencies(edgeToPathMap, pathIndexToModuleIndexOrder, pathNames, moduleIndexToNames);
481  }
482  }
483 } // namespace edm
edm::Worker::consumesInfo
virtual std::vector< ConsumesInfo > consumesInfo() const =0
mps_fire.i
i
Definition: mps_fire.py:428
edm::PathsAndConsumesOfModules::doConsumesInfo
std::vector< ConsumesInfo > doConsumesInfo(unsigned int moduleID) const override
Definition: PathsAndConsumesOfModules.cc:121
LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
edm::PathsAndConsumesOfModules::modulesOnPaths_
std::vector< std::vector< ModuleDescription const * > > modulesOnPaths_
Definition: PathsAndConsumesOfModules.h:69
edm::PathsAndConsumesOfModules::doModulesWhoseProductsAreConsumedBy
std::vector< ModuleDescription const * > const & doModulesWhoseProductsAreConsumedBy(unsigned int moduleID, BranchType branchType) const override
Definition: PathsAndConsumesOfModules.cc:116
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
edm::graph::EdgeToPathMap
std::map< SimpleEdge, std::vector< unsigned int > > EdgeToPathMap
Definition: throwIfImproperDependencies.h:40
edm::PathsAndConsumesOfModules::modulesInPreviousProcessesWhoseProductsAreConsumedBy
std::vector< ModuleProcessName > const & modulesInPreviousProcessesWhoseProductsAreConsumedBy(unsigned int moduleID) const
Definition: PathsAndConsumesOfModules.cc:90
edm::errors::LogicError
Definition: EDMException.h:37
modules
Definition: MuonCleanerBySegments.cc:35
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::PathsAndConsumesOfModules::doLargestModuleID
unsigned int doLargestModuleID() const override
Definition: PathsAndConsumesOfModules.cc:126
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
edm::PathsAndConsumesOfModules::modulesOnEndPaths_
std::vector< std::vector< ModuleDescription const * > > modulesOnEndPaths_
Definition: PathsAndConsumesOfModules.h:70
edm::PathsAndConsumesOfModules::modulesWhoseProductsAreConsumedBy_
std::array< std::vector< std::vector< ModuleDescription const * > >, NumBranchTypes > modulesWhoseProductsAreConsumedBy_
Definition: PathsAndConsumesOfModules.h:76
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::PathsAndConsumesOfModules::initialize
void initialize(Schedule const *, std::shared_ptr< ProductRegistry const >)
Definition: PathsAndConsumesOfModules.cc:16
edm::BranchType
BranchType
Definition: BranchType.h:11
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::NumBranchTypes
Definition: BranchType.h:11
PathsAndConsumesOfModules.h
EDMException.h
edm::Schedule
Definition: Schedule.h:121
edm::PathsAndConsumesOfModules::modulesInPreviousProcessesWhoseProductsAreConsumedBy_
std::vector< std::vector< ModuleProcessName > > modulesInPreviousProcessesWhoseProductsAreConsumedBy_
Definition: PathsAndConsumesOfModules.h:77
edm::graph::kInvalidIndex
constexpr auto kInvalidIndex
Definition: throwIfImproperDependencies.h:34
edm::PathsAndConsumesOfModules::doModuleDescription
ModuleDescription const * doModuleDescription(unsigned int moduleID) const override
Definition: PathsAndConsumesOfModules.cc:95
edm::checkForModuleDependencyCorrectness
void checkForModuleDependencyCorrectness(edm::PathsAndConsumesOfModulesBase const &iPnC, bool iPrintDependencies)
Definition: PathsAndConsumesOfModules.cc:269
throwIfImproperDependencies.h
edm::graph::throwIfImproperDependencies
void throwIfImproperDependencies(EdgeToPathMap const &, std::vector< std::vector< unsigned int >> const &iPathIndexToModuleIndexOrder, std::vector< std::string > const &iPathNames, std::unordered_map< unsigned int, std::string > const &iModuleIndexToNames)
Definition: throwIfImproperDependencies.cc:502
edm::Worker
Definition: Worker.h:90
ModuleProcessName.h
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::PathsAndConsumesOfModules::paths_
std::vector< std::string > paths_
Definition: PathsAndConsumesOfModules.h:64
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
edm::PathsAndConsumesOfModules::preg_
std::shared_ptr< ProductRegistry const > preg_
Definition: PathsAndConsumesOfModules.h:80
edm::PathsAndConsumesOfModulesBase::endPaths
std::vector< std::string > const & endPaths() const
Definition: PathsAndConsumesOfModulesBase.h:40
edm::PathsAndConsumesOfModules::moduleIDToIndex_
std::vector< std::pair< unsigned int, unsigned int > > moduleIDToIndex_
Definition: PathsAndConsumesOfModules.h:74
edm::PathsAndConsumesOfModules::doModulesOnEndPath
std::vector< ModuleDescription const * > const & doModulesOnEndPath(unsigned int endPathIndex) const override
Definition: PathsAndConsumesOfModules.cc:111
edm::graph
Definition: throwIfImproperDependencies.h:33
Schedule.h
edm::PathsAndConsumesOfModulesBase::modulesOnPath
std::vector< ModuleDescription const * > const & modulesOnPath(unsigned int pathIndex) const
Definition: PathsAndConsumesOfModulesBase.h:46
edm::PathsAndConsumesOfModules::endPaths_
std::vector< std::string > endPaths_
Definition: PathsAndConsumesOfModules.h:65
edm::PathsAndConsumesOfModulesBase::modulesWhoseProductsAreConsumedBy
std::vector< ModuleDescription const * > const & modulesWhoseProductsAreConsumedBy(unsigned int moduleID, BranchType branchType=InEvent) const
Definition: PathsAndConsumesOfModulesBase.h:64
edm::LogAbsolute
Log< level::System, true > LogAbsolute
Definition: MessageLogger.h:134
edm::PathsAndConsumesOfModules::allModuleDescriptions_
std::vector< ModuleDescription const * > allModuleDescriptions_
Definition: PathsAndConsumesOfModules.h:67
edm::Schedule::allWorkers
AllWorkers const & allWorkers() const
returns the collection of pointers to workers
Definition: Schedule.cc:1445
edm::nonConsumedUnscheduledModules
std::vector< ModuleDescription const * > nonConsumedUnscheduledModules(edm::PathsAndConsumesOfModulesBase const &iPnC, std::vector< ModuleProcessName > &consumedByChildren)
Definition: PathsAndConsumesOfModules.cc:165
edm::PathsAndConsumesOfModules::schedule_
Schedule const * schedule_
Definition: PathsAndConsumesOfModules.h:79
edm::graph::kDataDependencyIndex
constexpr auto kDataDependencyIndex
Definition: throwIfImproperDependencies.h:37
edm::PathsAndConsumesOfModulesBase::paths
std::vector< std::string > const & paths() const
Definition: PathsAndConsumesOfModulesBase.h:39
edm::PathsAndConsumesOfModules::removeModules
void removeModules(std::vector< ModuleDescription const * > const &modules)
Definition: PathsAndConsumesOfModules.cc:53
edm::PathsAndConsumesOfModulesBase
Definition: PathsAndConsumesOfModulesBase.h:35
edm::PathsAndConsumesOfModules::PathsAndConsumesOfModules
PathsAndConsumesOfModules()
edm::PathsAndConsumesOfModules::~PathsAndConsumesOfModules
~PathsAndConsumesOfModules() override
edm::PathsAndConsumesOfModules::doModulesOnPath
std::vector< ModuleDescription const * > const & doModulesOnPath(unsigned int pathIndex) const override
Definition: PathsAndConsumesOfModules.cc:107
Exception
Definition: hltDiff.cc:245
Worker.h
edm::ModuleProcessName
Definition: ModuleProcessName.h:12
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
Skims_PA_cff.paths
paths
Definition: Skims_PA_cff.py:18
edm::PathsAndConsumesOfModulesBase::modulesOnEndPath
std::vector< ModuleDescription const * > const & modulesOnEndPath(unsigned int endPathIndex) const
Definition: PathsAndConsumesOfModulesBase.h:50
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
config.checkPath
checkPath
Definition: config.py:11
dummy
Definition: DummySelector.h:38
edmTracerLogToSimpleConfig.allModules
allModules
Definition: edmTracerLogToSimpleConfig.py:132
filterRecHits_cfg.schedule
schedule
Definition: filterRecHits_cfg.py:62
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::PathsAndConsumesOfModules::moduleIndex
unsigned int moduleIndex(unsigned int moduleID) const
Definition: PathsAndConsumesOfModules.cc:131
edm::PathsAndConsumesOfModulesBase::allModules
std::vector< ModuleDescription const * > const & allModules() const
Definition: PathsAndConsumesOfModulesBase.h:42
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46