| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
concurrency::RankerByProductConsumption Class Reference

`#include <src/PRGraph/Visitors/Rankers.h>`

Inheritance diagram for concurrency::RankerByProductConsumption:
[legend]
Collaboration diagram for concurrency::RankerByProductConsumption:
[legend]

## 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 10 of file Rankers.h.

## Member Function Documentation

## ◆ visit() [1/5]

virtual bool concurrency::IGraphVisitor::visit
| inline

Definition at line 16 of file IGraphVisitor.h.

16 { return true; };

## ◆ visit() [2/5]

virtual bool concurrency::IGraphVisitor::visit
| inline

Definition at line 25 of file IGraphVisitor.h.

25 { return true; };

## ◆ visit() [3/5]

virtual bool concurrency::IGraphVisitor::visit
| inline

Definition at line 22 of file IGraphVisitor.h.

22 { return true; };

## ◆ visit() [4/5]

virtual bool concurrency::IGraphVisitor::visit
| inline

Definition at line 19 of file IGraphVisitor.h.

19 { return true; };

## ◆ visit() [5/5]

bool concurrency::RankerByProductConsumption::visit | ( | AlgorithmNode & | node | ) |
| override virtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 6 of file Rankers.cpp.

6 {
7
8 auto& products = node.getOutputDataNodes();
9 float rank = 0;
10
11 for ( auto p : products ) rank += p->getConsumers().size();
12
13 node.setRank( rank );
14 /*std::stringstream s;
15 s << node.getNodeName() << ", " << rank << "\n";
16 std::ofstream myfile;
17 myfile.open("AlgoRank.csv", std::ios::app);
18 myfile << s.str();
19 myfile.close();*/
20
21 return true;
22 }

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

- GaudiHive/src/PRGraph/Visitors/Rankers.h
- GaudiHive/src/PRGraph/Visitors/Rankers.cpp