| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

`#include <src/PRGraphVisitors.h>`

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

## Public Member Functions
| RankerByProductConsumption ()
| Constructor. More...
| ~RankerByProductConsumption () override
| Destructor. More...
bool | visitEnter (DecisionNode &) const override
bool | visit (DecisionNode &) override
bool | visitLeave (DecisionNode &) const override
bool | visitEnter (AlgorithmNode &) const override
bool | visit (AlgorithmNode &node) override
void | reset () override
Public Member Functions inherited from concurrency::IGraphVisitor
virtual | ~IGraphVisitor ()

## Additional Inherited Members
Public Attributes inherited from concurrency::IGraphVisitor
int | m_nodesSucceeded
int | m_slotNum

## Detailed Description

Definition at line 91 of file PRGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByProductConsumption::RankerByProductConsumption | ( |  | ) |
| inline

Constructor.

Definition at line 94 of file PRGraphVisitors.h.

94 {
95 m_nodesSucceeded = 0;
96 m_slotNum = -1;
97 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

concurrency::RankerByProductConsumption::~RankerByProductConsumption | ( |  | ) |
| inline override

Destructor.

Definition at line 99 of file PRGraphVisitors.h.

99 {}

## Member Function Documentation

void concurrency::RankerByProductConsumption::reset | ( |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 113 of file PRGraphVisitors.h.

113 { m_nodesSucceeded = 0; }
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

bool concurrency::RankerByProductConsumption::visit | ( | DecisionNode & |  | ) |
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 103 of file PRGraphVisitors.h.

103 {return true;}\

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

Implements concurrency::IGraphVisitor.

Definition at line 236 of file PRGraphVisitors.cpp.

236 {
237
238 auto& products = node.getOutputDataNodes();
239 float rank = 0;
240
241 for (auto p : products)
242 rank += p->getConsumers().size();
243
244 node.setRank(rank);
245 /*std::stringstream s;
246 s << node.getNodeName() << ", " << rank << "\n";
247 std::ofstream myfile;
248 myfile.open("AlgoRank.csv", std::ios::app);
249 myfile << s.str();
250 myfile.close();*/
251
252 return true;
253 }

bool concurrency::RankerByProductConsumption::visitEnter | ( | DecisionNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 101 of file PRGraphVisitors.h.

101 {return true;}

bool concurrency::RankerByProductConsumption::visitEnter | ( | AlgorithmNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 108 of file PRGraphVisitors.h.

108 {return true;}

bool concurrency::RankerByProductConsumption::visitLeave | ( | DecisionNode & |  | ) | const
| inline override virtual

Implements concurrency::IGraphVisitor.

Definition at line 105 of file PRGraphVisitors.h.

105 {return true;}

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

- GaudiHive/src/PRGraphVisitors.h
- GaudiHive/src/PRGraphVisitors.cpp