| The Gaudi Framework v27r1

- 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/EFGraphVisitors.h>`

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

## Public Member Functions
| RankerByEccentricity ()
| Constructor. More...
virtual | ~RankerByEccentricity ()
| Destructor. More...
virtual bool | visitEnter (DecisionNode &) const
virtual bool | visit (DecisionNode &)
virtual bool | visitLeave (DecisionNode &) const
virtual bool | visitEnter (AlgorithmNode &) const
virtual bool | visit (AlgorithmNode &node)
virtual void | reset ()
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 144 of file EFGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByEccentricity::RankerByEccentricity | ( |  | ) |
| inline

Constructor.

Definition at line 147 of file EFGraphVisitors.h.

147 {
148 m_nodesSucceeded = 0;
149 m_slotNum = -1;
150 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

virtual concurrency::RankerByEccentricity::~RankerByEccentricity | ( |  | ) |
| inline virtual

Destructor.

Definition at line 152 of file EFGraphVisitors.h.

152 {};

## Member Function Documentation

virtual void concurrency::RankerByEccentricity::reset | ( |  | ) |
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 166 of file EFGraphVisitors.h.

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

virtual bool concurrency::RankerByEccentricity::visit | ( | DecisionNode & |  | ) |
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 156 of file EFGraphVisitors.h.

156 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 255 of file EFGraphVisitors.cpp.

255 {
256
257 std::ifstream myfile;
258 myfile.open("Eccentricity.graphml", std::ios::in);
259
260 boost::ExecPlan execPlan;
261
262 boost::dynamic_properties dp;
263 dp.property("name", boost::get(&boost::AlgoNodeStruct::m_name, execPlan));
264 dp.property("Eccentricity", boost::get(&boost::AlgoNodeStruct::m_eccentricity, execPlan));
265
266 boost::read_graphml(myfile, execPlan, dp);
267
268 typedef boost::graph_traits<boost::ExecPlan>::vertex_iterator itV;
269 std::pair<itV, itV> vp;
270 typedef boost::graph_traits<boost::ExecPlan>::vertex_descriptor AlgoVertex;
271
272 for (vp = boost::vertices(execPlan); vp.first != vp.second; ++vp.first) {
273 AlgoVertex v = *vp.first;
274 auto index = boost::get(&boost::AlgoNodeStruct::m_name, execPlan);
275 if (index[v] == node.getNodeName()) {
276 auto index_eccentricity = boost::get(&boost::AlgoNodeStruct::m_eccentricity, execPlan);
277 float rank = index_eccentricity[v];
278 node.setRank(rank);
279 //std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
280 }
281 }
282 return true;
283 }
std::ifstream::open
T open(T...args)
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: ExecutionFlowGraph.h:37
boost::AlgoNodeStruct::m_eccentricity
double m_eccentricity
Definition: ExecutionFlowGraph.h:34
boost::AlgoVertex
graph_traits< ExecPlan >::vertex_descriptor AlgoVertex
Definition: ExecutionFlowGraph.h:38
boost::AlgoNodeStruct::m_name
std::string m_name
Definition: ExecutionFlowGraph.h:30
std::pair
GaudiPython.Persistency.get
def get(type_)
Definition: Persistency.py:23
std::ifstream
STL class.

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

Implements concurrency::IGraphVisitor.

Definition at line 154 of file EFGraphVisitors.h.

154 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 161 of file EFGraphVisitors.h.

161 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 158 of file EFGraphVisitors.h.

158 {return true;};

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

- GaudiHive/src/EFGraphVisitors.h
- GaudiHive/src/EFGraphVisitors.cpp