| 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::RankerByTiming Class Reference

`#include <src/EFGraphVisitors.h>`

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

## Public Member Functions
| RankerByTiming ()
| Constructor. More...
virtual | ~RankerByTiming ()
| 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 118 of file EFGraphVisitors.h.

## Constructor & Destructor Documentation

concurrency::RankerByTiming::RankerByTiming | ( |  | ) |
| inline

Constructor.

Definition at line 121 of file EFGraphVisitors.h.

121 {
122 m_nodesSucceeded = 0;
123 m_slotNum = -1;
124 };
concurrency::IGraphVisitor::m_slotNum
int m_slotNum
Definition: IGraphVisitor.h:24
concurrency::IGraphVisitor::m_nodesSucceeded
int m_nodesSucceeded
Definition: IGraphVisitor.h:23

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

Destructor.

Definition at line 126 of file EFGraphVisitors.h.

126 {};

## Member Function Documentation

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

Implements concurrency::IGraphVisitor.

Definition at line 140 of file EFGraphVisitors.h.

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

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

Implements concurrency::IGraphVisitor.

Definition at line 130 of file EFGraphVisitors.h.

130 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 222 of file EFGraphVisitors.cpp.

222 {
223
224 std::ifstream myfile;
225 myfile.open("InputExecutionPlan.graphml", std::ios::in);
226
227 boost::ExecPlan execPlan;
228
229 boost::dynamic_properties dp;
230 dp.property("name", boost::get(&boost::AlgoNodeStruct::m_name, execPlan));
231 dp.property("index", boost::get(&boost::AlgoNodeStruct::m_index, execPlan));
232 dp.property("dataRank", boost::get(&boost::AlgoNodeStruct::m_rank, execPlan));
233 dp.property("runtime", boost::get(&boost::AlgoNodeStruct::m_runtime, execPlan));
234
235 boost::read_graphml(myfile, execPlan, dp);
236
237 typedef boost::graph_traits<boost::ExecPlan>::vertex_iterator itV;
238 std::pair<itV, itV> vp;
239 typedef boost::graph_traits<boost::ExecPlan>::vertex_descriptor AlgoVertex;
240
241 for (vp = boost::vertices(execPlan); vp.first != vp.second; ++vp.first) {
242 AlgoVertex v = *vp.first;
243 auto index = boost::get(&boost::AlgoNodeStruct::m_name, execPlan);
244 if (index[v] == node.getNodeName()) {
245 auto index_runtime = boost::get(&boost::AlgoNodeStruct::m_runtime, execPlan);
246 float rank = index_runtime[v];
247 node.setRank(rank);
248 //std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
249 }
250 }
251 return true;
252 }
boost::AlgoNodeStruct::m_index
int m_index
Definition: ExecutionFlowGraph.h:31
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_rank
int m_rank
Definition: ExecutionFlowGraph.h:32
boost::AlgoNodeStruct::m_runtime
double m_runtime
Definition: ExecutionFlowGraph.h:33
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::RankerByTiming::visitEnter | ( | DecisionNode & |  | ) | const
| inline virtual

Implements concurrency::IGraphVisitor.

Definition at line 128 of file EFGraphVisitors.h.

128 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 135 of file EFGraphVisitors.h.

135 {return true;};

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

Implements concurrency::IGraphVisitor.

Definition at line 132 of file EFGraphVisitors.h.

132 {return true;};

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

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