Loading [MathJax]/extensions/MathZoom.js
The Gaudi Framework  master (181af51f)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages Concepts
Promoters.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13#include "../../EventSlot.h"
15#include "IGraphVisitor.h"
16
17namespace concurrency {
18
19 //--------------------------------------------------------------------------
21 public:
23 DataReadyPromoter( EventSlot& slot, const Cause& cause, bool ifTrace = false )
24 : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {}
25
28
29 bool visitEnter( AlgorithmNode& ) const override;
30
31 bool visit( AlgorithmNode& ) override;
32
33 bool visitEnter( DataNode& ) const override;
34
35 bool visit( DataNode& ) override;
36
37 bool visitEnter( ConditionNode& ) const override;
38
39 bool visit( ConditionNode& ) override;
40
43 bool m_trace;
44 };
45
46 //--------------------------------------------------------------------------
48 public:
50 DecisionUpdater( EventSlot& slot, const Cause& cause, bool ifTrace = false )
51 : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {}
52
54
55 bool visit( AlgorithmNode& ) override;
56
59 bool m_trace;
60 };
61
62 //--------------------------------------------------------------------------
63 class Supervisor : public IGraphVisitor {
64 public:
66 Supervisor( EventSlot& slot, const Cause& cause, bool ifTrace = false )
67 : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {}
68
71
72 bool visitEnter( DecisionNode& ) const override;
73
74 bool visit( DecisionNode& ) override;
75
76 bool visitEnter( AlgorithmNode& ) const override;
77
78 bool visit( AlgorithmNode& ) override;
79
82 bool m_trace;
83 };
84
85 //--------------------------------------------------------------------------
86 class RunSimulator : public IGraphVisitor {
87 public:
89 RunSimulator( EventSlot& slot, const Cause& cause ) : m_slot( &slot ), m_cause( cause ) {}
90
93
94 bool visitEnter( DecisionNode& ) const override;
95
96 bool visit( DecisionNode& ) override;
97
98 bool visitEnter( AlgorithmNode& ) const override;
99
100 bool visit( AlgorithmNode& ) override;
101
102 void reset() override { m_nodesSucceeded = 0; }
103
107 };
108} // namespace concurrency
DataReadyPromoter(EventSlot &slot, const Cause &cause, bool ifTrace=false)
Constructor.
Definition Promoters.h:23
bool visitEnter(AlgorithmNode &) const override
Definition Promoters.cpp:24
bool visit(AlgorithmNode &) override
Definition Promoters.cpp:32
bool visit(AlgorithmNode &) override
DecisionUpdater(EventSlot &slot, const Cause &cause, bool ifTrace=false)
Constructor.
Definition Promoters.h:50
virtual bool visit(DecisionNode &)
virtual bool visitEnter(DecisionNode &) const
bool visit(DecisionNode &) override
bool visitEnter(DecisionNode &) const override
RunSimulator(EventSlot &slot, const Cause &cause)
Constructor.
Definition Promoters.h:89
void reset() override
Definition Promoters.h:102
bool visitEnter(DecisionNode &) const override
Supervisor(EventSlot &slot, const Cause &cause, bool ifTrace=false)
Constructor.
Definition Promoters.h:66
bool visit(DecisionNode &) override
Class representing an event slot.
Definition EventSlot.h:23