The Gaudi Framework  v33r0 (d5ea422b)
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 84 of file Validators.h.

Constructor & Destructor Documentation

◆ SubSlotScout()

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

Constructor.

Definition at line 87 of file Validators.h.

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

Member Function Documentation

◆ reply()

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

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 98 of file Validators.h.

◆ reset()

void concurrency::SubSlotScout::reset ( )
inlineoverridevirtual

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 90 of file Validators.h.

90  {
91  m_active = true;
92 
93  // Only look for an entry point if we're in a sub-slot
94  m_foundEntryPoint = ( m_slot->parentSlot == nullptr );
96  };
const ControlFlowNode & m_startNode
Definition: Validators.h:78
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:96
const EventSlot * m_slot
Definition: Validators.h:77
const std::string & name() const
Get node name.

◆ visitParents()

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

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 79 of file Validators.cpp.

79  {
80 
81  // Leave a sub-slot if this is the exit node
82  const EventSlot* oldSlot = nullptr;
83  if ( m_slot->parentSlot && m_slot->entryPoint == node.name() ) {
84  oldSlot = m_slot;
86  m_foundEntryPoint = true;
87  }
88 
89  // Examine all parents
90  for ( auto& parent : node.m_parents ) {
91  m_active = true;
92  m_foundEntryPoint = ( m_slot->parentSlot == nullptr );
93  m_previousNodeName = node.name();
94  parent->accept( *this );
95 
96  // Any active parent means that this node is active
97  if ( this->reply() ) break;
98  }
99 
100  if ( oldSlot ) m_slot = oldSlot;
101  }
std::string entryPoint
Event Views bookkeeping (TODO: optimize view bookkeeping)
Definition: EventSlot.h:94
Class representing an event slot.
Definition: EventSlot.h:24
bool reply() const override
Definition: Validators.h:98
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:96
const EventSlot * m_slot
Definition: Validators.h:77

Member Data Documentation

◆ m_foundEntryPoint

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

Definition at line 103 of file Validators.h.


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