The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
concurrency::RankerByEccentricity Class Reference

#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/Visitors/Rankers.h>

Inheritance diagram for concurrency::RankerByEccentricity:
Collaboration diagram for concurrency::RankerByEccentricity:

Public Member Functions

bool visit (AlgorithmNode &) override
 
virtual bool visit (DecisionNode &)
 
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 visitEnter (AlgorithmNode &) const
 
virtual bool visitEnter (DataNode &) const
 
virtual bool visitEnter (ConditionNode &) const
 
virtual void reset ()
 

Detailed Description

Definition at line 48 of file Rankers.h.

Member Function Documentation

◆ visit() [1/4]

bool concurrency::RankerByEccentricity::visit ( AlgorithmNode & node)
overridevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 121 of file Rankers.cpp.

121 {
122
123 std::ifstream myfile;
124 myfile.open( "Eccentricity.graphml", std::ios::in );
125
126 precedence::PrecTrace execPlan;
127
128 boost::dynamic_properties dp;
129 using boost::get;
130
131 dp.property( "name", get( &precedence::AlgoTraceProps::m_name, execPlan ) );
132 dp.property( "Eccentricity", get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ) );
133
134 boost::read_graphml( myfile, execPlan, dp );
135
136 typedef boost::graph_traits<precedence::PrecTrace>::vertex_iterator itV;
137 std::pair<itV, itV> vp;
138
139 for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) {
140 precedence::AlgoTraceVertex v = *vp.first;
141 auto index = get( &precedence::AlgoTraceProps::m_name, execPlan );
142 if ( index[v] == node.name() ) {
143 auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan );
144 float rank = index_eccentricity[v];
145 node.setRank( rank );
146 // std::cout << "Rank of " << index[v] << " is " << rank << std::endl;
147 }
148 }
149 return true;
150 }
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...
get
decorate the vector of properties
Definition decorators.py:94
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex

◆ visit() [2/4]

virtual bool concurrency::IGraphVisitor::visit ( ConditionNode & )
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 34 of file IGraphVisitor.h.

34{ return true; }

◆ visit() [3/4]

virtual bool concurrency::IGraphVisitor::visit ( DataNode & )
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 31 of file IGraphVisitor.h.

31{ return true; }

◆ visit() [4/4]

virtual bool concurrency::IGraphVisitor::visit ( DecisionNode & )
inlinevirtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 25 of file IGraphVisitor.h.

25{ return true; }

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