The Gaudi Framework  v32r2 (46d42edc)
concurrency::SubSlotScout Class Referencefinal

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

Inheritance diagram for concurrency::SubSlotScout:
Collaboration diagram for concurrency::SubSlotScout:

Public Member Functions

 SubSlotScout (const EventSlot *slot, const ControlFlowNode &node)
 Constructor. More...
 
void reset () override
 
bool reply () const override
 
void visitParents (DecisionNode &) override
 
- Public Member Functions inherited from concurrency::ActiveLineageScout
 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
 
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 &)
 

Private Attributes

bool m_foundEntryPoint {true}
 

Additional Inherited Members

- Protected Attributes inherited from concurrency::ActiveLineageScout
const EventSlotm_slot
 
const ControlFlowNodem_startNode
 
bool m_active {true}
 
std::string m_previousNodeName
 

Detailed Description

Definition at line 65 of file Validators.h.

Constructor & Destructor Documentation

◆ SubSlotScout()

concurrency::SubSlotScout::SubSlotScout ( const EventSlot slot,
const ControlFlowNode node 
)
inline

Constructor.

Definition at line 68 of file Validators.h.

69  : ActiveLineageScout( slot, node ), m_foundEntryPoint( slot->parentSlot == nullptr ){};
ActiveLineageScout(const EventSlot *slot, const ControlFlowNode &node)
Constructor.
Definition: Validators.h:36
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:86

Member Function Documentation

◆ reply()

bool concurrency::SubSlotScout::reply ( ) const
inlineoverridevirtual

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 79 of file Validators.h.

◆ reset()

void concurrency::SubSlotScout::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 71 of file Validators.h.

71  {
72  m_active = true;
73 
74  // Only look for an entry point if we're in a sub-slot
75  m_foundEntryPoint = ( m_slot->parentSlot == nullptr );
77  };
const ControlFlowNode & m_startNode
Definition: Validators.h:59
const std::string & getNodeName() const
Get node name.
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:86
const EventSlot * m_slot
Definition: Validators.h:58

◆ visitParents()

void concurrency::SubSlotScout::visitParents ( DecisionNode node)
overridevirtual

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 66 of file Validators.cpp.

66  {
67 
68  // Leave a sub-slot if this is the exit node
69  const EventSlot* oldSlot = nullptr;
70  if ( m_slot->parentSlot && m_slot->entryPoint == node.getNodeName() ) {
71  oldSlot = m_slot;
73  m_foundEntryPoint = true;
74  }
75 
76  // Examine all parents
77  for ( auto& parent : node.m_parents ) {
78  m_active = true;
79  m_foundEntryPoint = ( m_slot->parentSlot == nullptr );
80  m_previousNodeName = node.getNodeName();
81  parent->accept( *this );
82 
83  // Any active parent means that this node is active
84  if ( this->reply() ) break;
85  }
86 
87  if ( oldSlot ) m_slot = oldSlot;
88  }
std::string entryPoint
Event Views bookkeeping (TODO: optimize view bookkeeping)
Definition: EventSlot.h:84
Class representing an event slot.
Definition: EventSlot.h:14
bool reply() const override
Definition: Validators.h:79
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:86
const EventSlot * m_slot
Definition: Validators.h:58

Member Data Documentation

◆ m_foundEntryPoint

bool concurrency::SubSlotScout::m_foundEntryPoint {true}
private

Definition at line 84 of file Validators.h.


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