| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Attributes | List of all members
concurrency::ActiveLineageScout Class Reference

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

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

## Public Member Functions
| ActiveLineageScout (const EventSlot *slot, const ControlFlowNode &node)
| Constructor. More...
bool | visitEnter (AlgorithmNode &) const override
bool | visitEnter (DataNode &) const override
bool | visitEnter (ConditionNode &) const override
bool | visit (DecisionNode &) override
void | reset () override
virtual bool | reply () const
virtual void | visitParents (DecisionNode &)
virtual bool | visit (DecisionNode &)
virtual bool | visit (AlgorithmNode &)
virtual bool | visit (DataNode &)
virtual bool | visit (ConditionNode &)
virtual bool | visitEnter (DecisionNode &) const
virtual bool | visitEnter (AlgorithmNode &) const
virtual bool | visitEnter (DataNode &) const
virtual bool | visitEnter (ConditionNode &) const
Public Member Functions inherited from concurrency::IGraphVisitor
virtual | ~IGraphVisitor ()=default
virtual bool | visitEnter (DecisionNode &) const
virtual bool | visit (AlgorithmNode &)
virtual bool | visit (DataNode &)
virtual bool | visit (ConditionNode &)

## Protected Attributes
const EventSlot * | m_slot
const ControlFlowNode & | m_startNode
bool | m_active {true}
std::string | m_previousNodeName

## Detailed Description

Definition at line 33 of file Validators.h.

## Constructor & Destructor Documentation

## ◆ ActiveLineageScout()

concurrency::ActiveLineageScout::ActiveLineageScout | ( | const EventSlot * | slot,
|  | const ControlFlowNode & | node
| ) |  |
| inline

Constructor.

Definition at line 36 of file Validators.h.

37 : m_slot( slot ), m_startNode( node ), m_previousNodeName( node.getNodeName() ){};
concurrency::ActiveLineageScout::m_startNode
const ControlFlowNode & m_startNode
Definition: Validators.h:59
concurrency::ActiveLineageScout::m_previousNodeName
std::string m_previousNodeName
Definition: Validators.h:61
concurrency::ActiveLineageScout::m_slot
const EventSlot * m_slot
Definition: Validators.h:58

## Member Function Documentation

## ◆ reply()

virtual bool concurrency::ActiveLineageScout::reply | ( |  | ) | const
| inline virtual

Reimplemented in concurrency::SubSlotScout.

Definition at line 53 of file Validators.h.

53 { return m_active; };
concurrency::ActiveLineageScout::m_active
bool m_active
Definition: Validators.h:60

## ◆ reset()

void concurrency::ActiveLineageScout::reset | ( |  | ) |
| inline override virtual

Reimplemented from concurrency::IGraphVisitor.

Reimplemented in concurrency::SubSlotScout.

Definition at line 48 of file Validators.h.

48 {
49 m_active = true;
50 m_previousNodeName = m_startNode.getNodeName();
51 };
concurrency::ActiveLineageScout::m_startNode
const ControlFlowNode & m_startNode
Definition: Validators.h:59
concurrency::ControlFlowNode::getNodeName
const std::string & getNodeName() const
Get node name.
Definition: PrecedenceRulesGraph.h:420
concurrency::ActiveLineageScout::m_active
bool m_active
Definition: Validators.h:60
concurrency::ActiveLineageScout::m_previousNodeName
std::string m_previousNodeName
Definition: Validators.h:61

## ◆ 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 19 of file IGraphVisitor.h.

19 { 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 25 of file IGraphVisitor.h.

25 { return true; };

## ◆ visit() [5/5]

bool concurrency::ActiveLineageScout::visit | ( | DecisionNode & | node | ) |
| override virtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 25 of file Validators.cpp.

25 {
26
27 // Test if this node is already resolved
28 if ( m_slot->controlFlowState[node.getNodeIndex()] != -1 ) {
29 m_active = false;
30 return m_active;
31 }
32
33 // Test if the node that sent this scout is out-of-sequence in this node
34 if ( !node.m_modeConcurrent ) {
35
36 for ( auto& child : node.getDaughters() ) {
37
38 if ( child->getNodeName() == m_previousNodeName ) break;
39
40 if ( m_slot->controlFlowState[child->getNodeIndex()] == -1 ) {
41 m_active = false;
42 return m_active;
43 }
44 }
45 }
46
47 this->visitParents( node );
48
49 return this->reply();
50 }
concurrency::ActiveLineageScout::visitParents
virtual void visitParents(DecisionNode &)
Definition: Validators.cpp:53
concurrency::ActiveLineageScout::m_active
bool m_active
Definition: Validators.h:60
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:77
concurrency::ActiveLineageScout::m_previousNodeName
std::string m_previousNodeName
Definition: Validators.h:61
concurrency::ActiveLineageScout::m_slot
const EventSlot * m_slot
Definition: Validators.h:58
concurrency::ActiveLineageScout::reply
virtual bool reply() const
Definition: Validators.h:53

## ◆ visitEnter() [1/7]

virtual bool concurrency::IGraphVisitor::visitEnter
| inline

Definition at line 18 of file IGraphVisitor.h.

18 { return true; };

## ◆ visitEnter() [2/7]

virtual bool concurrency::IGraphVisitor::visitEnter
| inline

Definition at line 24 of file IGraphVisitor.h.

24 { return true; };

## ◆ visitEnter() [3/7]

virtual bool concurrency::IGraphVisitor::visitEnter
| inline

Definition at line 21 of file IGraphVisitor.h.

21 { return true; };

## ◆ visitEnter() [4/7]

virtual bool concurrency::IGraphVisitor::visitEnter
| inline

Definition at line 15 of file IGraphVisitor.h.

15 { return true; };

## ◆ visitEnter() [5/7]

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

Reimplemented from concurrency::IGraphVisitor.

Definition at line 42 of file Validators.h.

42 { return false; };

## ◆ visitEnter() [6/7]

bool concurrency::ActiveLineageScout::visitEnter | ( | DataNode & |  | ) | const
| inline override virtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 43 of file Validators.h.

43 { return false; };

## ◆ visitEnter() [7/7]

bool concurrency::ActiveLineageScout::visitEnter | ( | ConditionNode & |  | ) | const
| inline override virtual

Reimplemented from concurrency::IGraphVisitor.

Definition at line 44 of file Validators.h.

44 { return false; };

## ◆ visitParents()

void concurrency::ActiveLineageScout::visitParents | ( | DecisionNode & | node | ) |
| virtual

Reimplemented in concurrency::SubSlotScout.

Definition at line 53 of file Validators.cpp.

53 {
54
55 for ( auto& parent : node.m_parents ) {
56 m_active = true;
57 m_previousNodeName = node.getNodeName();
58 parent->accept( *this );
59
60 // Any active parent means that this node is active
61 if ( this->reply() ) break;
62 }
63 }
concurrency::ActiveLineageScout::m_active
bool m_active
Definition: Validators.h:60
concurrency::ActiveLineageScout::m_previousNodeName
std::string m_previousNodeName
Definition: Validators.h:61
concurrency::ActiveLineageScout::reply
virtual bool reply() const
Definition: Validators.h:53

## Member Data Documentation

## ◆ m_active

bool concurrency::ActiveLineageScout::m_active {true}
| protected

Definition at line 60 of file Validators.h.

## ◆ m_previousNodeName

std::string concurrency::ActiveLineageScout::m_previousNodeName
| protected

Definition at line 61 of file Validators.h.

## ◆ m_slot

const EventSlot* concurrency::ActiveLineageScout::m_slot
| protected

Definition at line 58 of file Validators.h.

## ◆ m_startNode

const ControlFlowNode& concurrency::ActiveLineageScout::m_startNode
| protected

Definition at line 59 of file Validators.h.

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

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