| The Gaudi Framework v32r1 (f65d50dc)

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

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

Inheritance diagram for concurrency::RankerByEccentricity:
[legend]
Collaboration diagram for concurrency::RankerByEccentricity:
[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 39 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::RankerByEccentricity::visit | ( | AlgorithmNode & | node | ) |
| override virtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 108 of file Rankers.cpp.

108 {
109
110 std::ifstream myfile;
111 myfile.open( "Eccentricity.graphml", std::ios::in );
112
113 precedence::PrecTrace execPlan;
114
115 boost::dynamic_properties dp;
116 using boost::get;
117
118 dp.property( "name", get( &precedence::AlgoTraceProps::m_name, execPlan ) );
119 dp.property( "Eccentricity", get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ) );
120
121 boost::read_graphml( myfile, execPlan, dp );
122
123 typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
124 std::pair<itV, itV> vp;
125
126 for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
127 precedence::AlgoTraceVertex v = *vp.first;
128 auto index = get( &precedence::AlgoTraceProps::m_name, execPlan );
129 if ( index[v] == node.getNodeName() ) {
130 auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan );
131 float rank = index_eccentricity[v];
132 node.setRank( rank );
133 // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
134 }
135 }
136 return true;
137 }
std::ifstream::open
T open(T... args)
precedence::AlgoTraceVertex
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
Definition: PrecedenceRulesGraph.h:51
precedence::AlgoTraceProps::m_eccentricity
int m_eccentricity
Definition: PrecedenceRulesGraph.h:47
precedence::PrecTrace
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
Definition: PrecedenceRulesGraph.h:50
std::pair
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
precedence::AlgoTraceProps::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:43
std::ifstream
STL class.

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

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