The Gaudi Framework  master (37c0b60a)
concurrency::SubSlotScout Class Referencefinal

#include </builds/gaudi/Gaudi/GaudiHive/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 ) {}

Member Function Documentation

◆ reply()

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

Reimplemented from concurrency::ActiveLineageScout.

Definition at line 98 of file Validators.h.

98 { return m_active && m_foundEntryPoint; }

◆ 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
96  }

◆ 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;
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  }

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:
concurrency::SubSlotScout::m_foundEntryPoint
bool m_foundEntryPoint
Definition: Validators.h:103
EventSlot
Class representing an event slot.
Definition: EventSlot.h:24
concurrency::ActiveLineageScout::m_previousNodeName
std::string m_previousNodeName
Definition: Validators.h:80
concurrency::ControlFlowNode::name
const std::string & name() const
Get node name.
Definition: PrecedenceRulesGraph.h:429
concurrency::ActiveLineageScout::m_slot
const EventSlot * m_slot
Definition: Validators.h:77
EventSlot::entryPoint
std::string entryPoint
Event Views bookkeeping (TODO: optimize view bookkeeping)
Definition: EventSlot.h:94
EventSlot::parentSlot
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:96
GaudiPython.Bindings.nullptr
nullptr
Definition: Bindings.py:87
concurrency::ActiveLineageScout::ActiveLineageScout
ActiveLineageScout(const EventSlot *slot, const ControlFlowNode &node)
Constructor.
Definition: Validators.h:55
concurrency::ActiveLineageScout::m_active
bool m_active
Definition: Validators.h:79
concurrency::ActiveLineageScout::m_startNode
const ControlFlowNode & m_startNode
Definition: Validators.h:78
concurrency::SubSlotScout::reply
bool reply() const override
Definition: Validators.h:98