| The Gaudi Framework v29r1 (5cd95fa2)

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

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

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

`#include <src/PRGraphVisitors.h>`

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

## Public Member Functions
bool | visit (AlgorithmNode &) override
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 106 of file PRGraphVisitors.h.

## Member Function Documentation

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 334 of file PRGraphVisitors.cpp.

335 {
336
337 std::ifstream myfile;
338 myfile.open( "Eccentricity.graphml", std::ios::in );
339
340 precedence::PrecTrace execPlan;
341
342 boost::dynamic_properties dp;
343 using boost::get;
344
345 dp.property( "name", get( &precedence::AlgoTraceProps::m_name, execPlan ) );
346 dp.property( "Eccentricity", get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ) );
347
348 boost::read_graphml( myfile, execPlan, dp );
349
350 typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
351 std::pair<itV, itV> vp;
352
353 for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
354 precedence::AlgoTraceVertex v = *vp.first;
355 auto index = get( &precedence::AlgoTraceProps::m_name, execPlan );
356 if ( index[v] == node.getNodeName() ) {
357 auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan );
358 float rank = index_eccentricity[v];
359 node.setRank( rank );
360 // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
361 }
362 }
363 return true;
364 }
std::ifstream::open
T open(T...args)
precedence::AlgoTraceVertex
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
Definition: PrecedenceRulesGraph.h:44
precedence::AlgoTraceProps::m_eccentricity
int m_eccentricity
Definition: PrecedenceRulesGraph.h:40
precedence::PrecTrace
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
Definition: PrecedenceRulesGraph.h:43
std::pair
GaudiPython.Persistency.get
def get(type_)
Definition: Persistency.py:29
precedence::AlgoTraceProps::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:36
std::ifstream
STL class.

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

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