| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Public Attributes | List of all members
concurrency::DecisionNode Class Referencefinal

`#include <src/PRGraph/PrecedenceRulesGraph.h>`

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

## Public Member Functions
| DecisionNode (PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name, Concurrent modeConcurrent, PromptDecision modePromptDecision, ModeOr modeOR, AllPass allPass, Inverted isInverted)
| Constructor. More...
bool | accept (IGraphVisitor &visitor) override
| Visitor entry point. More...
void | addParentNode (DecisionNode *node)
| Add a parent node. More...
void | addDaughterNode (ControlFlowNode *node)
| Add a daughter node. More...
const std::vector< ControlFlowNode * > & | getDaughters () const
| Get children nodes. More...
void | printState (std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override
| Print a string representing the control flow state. More...
Public Member Functions inherited from concurrency::ControlFlowNode
| ControlFlowNode (PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name)
| Constructor. More...
virtual | ~ControlFlowNode ()=default
| Destructor. More...
const unsigned int & | getNodeIndex () const
| Get node index. More...
const std::string & | getNodeName () const
| Get node name. More...

## Public Attributes
bool | m_modeConcurrent
| Whether all daughters will be evaluated concurrently or sequentially. More...
bool | m_modePromptDecision
| Whether to evaluate the hub decision ASA its child decisions allow to do that. More...
bool | m_modeOR
| Whether acting as "and" (false) or "or" node (true) More...
bool | m_allPass
| Whether always passing regardless of daughter results. More...
bool | m_inverted {false}
| Whether the selection result is negated or not. More...
std::vector< ControlFlowNode * > | m_children
| All direct daughter nodes in the tree. More...
std::vector< DecisionNode * > | m_parents
| Direct parent nodes. More...
Public Attributes inherited from concurrency::ControlFlowNode
PrecedenceRulesGraph * | m_graph

## Additional Inherited Members
Protected Attributes inherited from concurrency::ControlFlowNode
unsigned int | m_nodeIndex
std::string | m_nodeName

## Detailed Description

Definition at line 430 of file PrecedenceRulesGraph.h.

## Constructor & Destructor Documentation

## ◆ DecisionNode()

concurrency::DecisionNode::DecisionNode | ( | PrecedenceRulesGraph & | graph,
|  | unsigned int | nodeIndex,
|  | const std::string & | name,
|  | Concurrent | modeConcurrent,
|  | PromptDecision | modePromptDecision,
|  | ModeOr | modeOR,
|  | AllPass | allPass,
|  | Inverted | isInverted
| ) |  |
| inline

Constructor.

Definition at line 433 of file PrecedenceRulesGraph.h.

436 : ControlFlowNode( graph, nodeIndex, name )
437 , m_modeConcurrent( modeConcurrent )
438 , m_modePromptDecision( modePromptDecision )
439 , m_modeOR( modeOR )
440 , m_allPass( allPass )
441 , m_inverted( isInverted ) {}
concurrency::ControlFlowNode::ControlFlowNode
ControlFlowNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name)
Constructor.
Definition: PrecedenceRulesGraph.h:408
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
concurrency::DecisionNode::m_allPass
bool m_allPass
Whether always passing regardless of daughter results.
Definition: PrecedenceRulesGraph.h:463
concurrency::DecisionNode::m_modeOR
bool m_modeOR
Whether acting as "and" (false) or "or" node (true)
Definition: PrecedenceRulesGraph.h:461
concurrency::DecisionNode::m_modePromptDecision
bool m_modePromptDecision
Whether to evaluate the hub decision ASA its child decisions allow to do that.
Definition: PrecedenceRulesGraph.h:459
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:140
concurrency::DecisionNode::m_modeConcurrent
bool m_modeConcurrent
Whether all daughters will be evaluated concurrently or sequentially.
Definition: PrecedenceRulesGraph.h:456
concurrency::DecisionNode::m_inverted
bool m_inverted
Whether the selection result is negated or not.
Definition: PrecedenceRulesGraph.h:465

## Member Function Documentation

## ◆ accept()

bool concurrency::DecisionNode::accept | ( | IGraphVisitor & | visitor | ) |
| override virtual

Visitor entry point.

Implements concurrency::ControlFlowNode.

Definition at line 54 of file PrecedenceRulesGraph.cpp.

54 {
55
56 if ( visitor.visitEnter( *this ) ) {
57 // try to aggregate a decision
58 bool result = visitor.visit( *this );
59 return !result;
60 }
61
62 return false; // visitor was rejected (since the decision node has an aggregated decision already)
63 }

## ◆ addDaughterNode()

void concurrency::DecisionNode::addDaughterNode | ( | ControlFlowNode * | node | ) |

Add a daughter node.

Definition at line 36 of file PrecedenceRulesGraph.cpp.

36 {
37
38 if ( std::find( m_children.begin(), m_children.end(), node ) == m_children.end() ) m_children.push_back( node );
39 }
concurrency::DecisionNode::m_children
std::vector< ControlFlowNode * > m_children
All direct daughter nodes in the tree.
Definition: PrecedenceRulesGraph.h:467
std::find
T find(T... args)

## ◆ addParentNode()

void concurrency::DecisionNode::addParentNode | ( | DecisionNode * | node | ) |

Add a parent node.

Definition at line 30 of file PrecedenceRulesGraph.cpp.

30 {
31
32 if ( std::find( m_parents.begin(), m_parents.end(), node ) == m_parents.end() ) m_parents.push_back( node );
33 }
concurrency::DecisionNode::m_parents
std::vector< DecisionNode * > m_parents
Direct parent nodes.
Definition: PrecedenceRulesGraph.h:469
std::find
T find(T... args)

## ◆ getDaughters()

const std::vector<ControlFlowNode*>& concurrency::DecisionNode::getDaughters | ( |  | ) | const
| inline

Get children nodes.

Definition at line 450 of file PrecedenceRulesGraph.h.

450 { return m_children; }
concurrency::DecisionNode::m_children
std::vector< ControlFlowNode * > m_children
All direct daughter nodes in the tree.
Definition: PrecedenceRulesGraph.h:467

## ◆ printState()

void concurrency::DecisionNode::printState | ( | std::stringstream & | output,
|  | EventSlot & | slot,
|  | const unsigned int & | recursionLevel
| ) |  | const
| override virtual

Print a string representing the control flow state.

Implements concurrency::ControlFlowNode.

Definition at line 42 of file PrecedenceRulesGraph.cpp.

43 {
44
45 auto& node_decisions = slot.controlFlowState;
46 output << std::string( recursionLevel, ' ' ) << m_nodeName << " (" << m_nodeIndex << ")"
47 << ", w/ decision: " << stateToString( node_decisions[m_nodeIndex] ) << "(" << node_decisions[m_nodeIndex]
48 << ")" << std::endl;
49
50 for ( auto daughter : m_children ) daughter->printState( output, slot, recursionLevel + 2 );
51 }
gaudirun.output
output
Definition: gaudirun.py:484
concurrency::DecisionNode::m_children
std::vector< ControlFlowNode * > m_children
All direct daughter nodes in the tree.
Definition: PrecedenceRulesGraph.h:467
std::endl
T endl(T... args)
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:77
std::string
STL class.
concurrency::ControlFlowNode::m_nodeIndex
unsigned int m_nodeIndex
Definition: PrecedenceRulesGraph.h:426
concurrency::ControlFlowNode::m_nodeName
std::string m_nodeName
Definition: PrecedenceRulesGraph.h:427

## Member Data Documentation

## ◆ m_allPass

bool concurrency::DecisionNode::m_allPass

Whether always passing regardless of daughter results.

Definition at line 463 of file PrecedenceRulesGraph.h.

## ◆ m_children

std::vector<ControlFlowNode*> concurrency::DecisionNode::m_children

All direct daughter nodes in the tree.

Definition at line 467 of file PrecedenceRulesGraph.h.

## ◆ m_inverted

bool concurrency::DecisionNode::m_inverted {false}

Whether the selection result is negated or not.

Definition at line 465 of file PrecedenceRulesGraph.h.

## ◆ m_modeConcurrent

bool concurrency::DecisionNode::m_modeConcurrent

Whether all daughters will be evaluated concurrently or sequentially.

Definition at line 456 of file PrecedenceRulesGraph.h.

## ◆ m_modeOR

bool concurrency::DecisionNode::m_modeOR

Whether acting as "and" (false) or "or" node (true)

Definition at line 461 of file PrecedenceRulesGraph.h.

## ◆ m_modePromptDecision

bool concurrency::DecisionNode::m_modePromptDecision

Whether to evaluate the hub decision ASA its child decisions allow to do that.

Applicable to "sequential" hub only.

Definition at line 459 of file PrecedenceRulesGraph.h.

## ◆ m_parents

std::vector<DecisionNode*> concurrency::DecisionNode::m_parents

Direct parent nodes.

Definition at line 469 of file PrecedenceRulesGraph.h.

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

- GaudiHive/src/PRGraph/PrecedenceRulesGraph.h
- GaudiHive/src/PRGraph/PrecedenceRulesGraph.cpp