The Gaudi Framework  master (37c0b60a)
concurrency::RankerByProductConsumption Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/Visitors/Rankers.h>

Inheritance diagram for concurrency::RankerByProductConsumption:
Collaboration diagram for concurrency::RankerByProductConsumption:

Public Member Functions

bool visit (AlgorithmNode &) override
 
virtual bool visit (DecisionNode &)
 
virtual bool visit (AlgorithmNode &)
 
virtual bool visit (DataNode &)
 
virtual bool visit (ConditionNode &)
 
- Public Member Functions inherited from concurrency::IGraphVisitor
virtual ~IGraphVisitor ()=default
 
virtual bool visitEnter (DecisionNode &) const
 
virtual bool visit (DecisionNode &)
 
virtual bool visitEnter (AlgorithmNode &) const
 
virtual bool visitEnter (DataNode &) const
 
virtual bool visit (DataNode &)
 
virtual bool visitEnter (ConditionNode &) const
 
virtual bool visit (ConditionNode &)
 
virtual void reset ()
 

Detailed Description

Definition at line 20 of file Rankers.h.

Member Function Documentation

◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 29 of file IGraphVisitor.h.

29 { return true; }

◆ visit() [2/5]

bool concurrency::RankerByProductConsumption::visit ( AlgorithmNode node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 19 of file Rankers.cpp.

19  {
20 
21  auto& products = node.getOutputDataNodes();
22  float rank = 0;
23 
24  for ( auto p : products ) rank += p->getConsumers().size();
25 
26  node.setRank( rank );
27  /*std::stringstream s;
28  s << node.getNodeName() << ", " << rank << "\n";
29  std::ofstream myfile;
30  myfile.open("AlgoRank.csv", std::ios::app);
31  myfile << s.str();
32  myfile.close();*/
33 
34  return true;
35  }

◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 35 of file IGraphVisitor.h.

35 { return true; }

◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 32 of file IGraphVisitor.h.

32 { return true; }

◆ visit() [5/5]

virtual bool concurrency::IGraphVisitor::visit
inline

Definition at line 26 of file IGraphVisitor.h.

26 { return true; }

The documentation for this class was generated from the following files: