| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

PrecedenceRulesGraph.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_PRECEDENCERULESGRAPH_H
2 #define GAUDIHIVE_PRECEDENCERULESGRAPH_H
3
4 // std includes
5 #include <vector>
6 #include <algorithm>
7 #include <unordered_map>
8 #include <chrono>
9 #include <fstream>
10 #include <sstream>
11
12 #include <boost/graph/adjacency_list.hpp>
13 #include <boost/graph/graphml.hpp>
14
15 // fwk includes
16 #include "AlgsExecutionStates.h"
17 #include "EventSlot.h"
18 #include "IGraphVisitor.h"
19 #include "GaudiKernel/Algorithm.h"
20 #include "GaudiKernel/CommonMessaging.h"
21
22 #include "CPUCruncher.h"
23
24 namespace boost {
25
26 struct AlgoNodeStruct {
27 AlgoNodeStruct () {}
28 AlgoNodeStruct (const std::string& name, const int index = -1, const int& rank = -1, const double& runtime = -1, const double& eccentricity = -1.0) :
29 m_name(name), m_index(index), m_rank(rank), m_runtime(runtime), m_eccentricity(eccentricity) {}
30 std::string m_name;
31 int m_index;
32 int m_rank;
33 double m_runtime;
34 double m_eccentricity;
35 };
36
37 typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct> ExecPlan;
38 typedef graph_traits<ExecPlan>::vertex_descriptor AlgoVertex;
39 }
40
41 namespace concurrency {
42
43 typedef AlgsExecutionStates::State State;
44 class PrecedenceRulesGraph;
45
46 class ControlFlowNode {
47 public:
49 ControlFlowNode(PrecedenceRulesGraph& graph, unsigned int nodeIndex, const std::string& name) :
50 m_graph(&graph), m_nodeIndex(nodeIndex), m_nodeName(name) {}
52 virtual ~ControlFlowNode() {}
54 virtual void initialize(const std::unordered_map<std::string,unsigned int>& algname_index_map) = 0;
56 virtual bool accept(IGraphVisitor& visitor) = 0;
58 virtual bool promoteToControlReadyState(const int& slotNum,
59 AlgsExecutionStates& states,
60 std::vector<int>& node_decisions) const = 0;
62 virtual int updateState(AlgsExecutionStates& states,
63 std::vector<int>& node_decisions) const = 0;
65 virtual void printState(std::stringstream& output,
66 AlgsExecutionStates& states,
67 const std::vector<int>& node_decisions,
68 const unsigned int& recursionLevel) const = 0;
70 const unsigned int& getNodeIndex() const { return m_nodeIndex; }
71 const std::string& getNodeName() const { return m_nodeName; }
72 virtual void updateDecision(const int& slotNum,
73 AlgsExecutionStates& states,
74 std::vector<int>& node_decisions,
75 const AlgorithmNode* requestor = nullptr) const = 0;
76 public:
77 PrecedenceRulesGraph* m_graph;
78 protected:
80 std::string stateToString(const int& stateId) const;
81 unsigned int m_nodeIndex;
82 std::string m_nodeName;
83 };
84
85
86 class DecisionNode : public ControlFlowNode {
87 public:
89 DecisionNode(PrecedenceRulesGraph& graph, unsigned int nodeIndex, const std::string& name, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass) :
90 ControlFlowNode(graph, nodeIndex, name),
91 m_modeConcurrent(modeConcurrent), m_modePromptDecision(modePromptDecision), m_modeOR(modeOR), m_allPass(allPass), m_children()
92 {}
94 ~DecisionNode() override;
96 void initialize(const std::unordered_map<std::string,unsigned int>& algname_index_map) override;
97 bool accept(IGraphVisitor& visitor) override;
99 bool promoteToControlReadyState(const int& slotNum,
100 AlgsExecutionStates& states,
101 std::vector<int>& node_decisions) const override;
103 void updateDecision(const int& slotNum,
104 AlgsExecutionStates& states,
105 std::vector<int>& node_decisions,
106 const AlgorithmNode* requestor = nullptr) const override;
108 int updateState(AlgsExecutionStates& states,
109 std::vector<int>& node_decisions) const override;
111 void addParentNode(DecisionNode* node);
113 void addDaughterNode(ControlFlowNode* node);
115 const std::vector<ControlFlowNode*>& getDaughters() const {return m_children;}
117 void printState(std::stringstream& output,
118 AlgsExecutionStates& states,
119 const std::vector<int>& node_decisions,
120 const unsigned int& recursionLevel) const override;
121 public:
123 bool m_modeConcurrent;
126 bool m_modePromptDecision;
128 bool m_modeOR;
130 bool m_allPass;
131 private:
133 std::vector<ControlFlowNode*> m_children;
135 std::vector<DecisionNode*> m_parents;
136 };
137
138 class DataNode;
139
140 class AlgorithmNode : public ControlFlowNode {
141 public:
143 AlgorithmNode(PrecedenceRulesGraph& graph, unsigned int nodeIndex, const std::string& algoName, bool inverted, bool allPass, bool IOBound) :
144 ControlFlowNode(graph, nodeIndex, algoName),
145 m_algoIndex(0),m_algoName(algoName),m_inverted(inverted),m_allPass(allPass),m_rank(-1),m_isIOBound(IOBound)
146 {};
148 ~AlgorithmNode();
150 void initialize(const std::unordered_map<std::string,unsigned int>& algname_index_map) override;
152 bool accept(IGraphVisitor& visitor) override;
154 void addParentNode(DecisionNode* node);
155
157 void addSupplierNode(AlgorithmNode* node) { m_suppliers.push_back(node); }
159 void addConsumerNode(AlgorithmNode* node) { m_consumers.push_back(node); }
161 void attachAlgorithm(IAlgorithm* ialgo) { m_representatives.push_back(ialgo); }
163 const std::vector<IAlgorithm*>& getAlgorithmRepresentatives () const { return m_representatives; }
165 const std::vector<AlgorithmNode*>& getSupplierNodes() const {return m_suppliers;}
167 const std::vector<AlgorithmNode*>& getConsumerNodes() const {return m_consumers;}
168
170 void addOutputDataNode(DataNode* node);
172 void addInputDataNode(DataNode* node);
174 const std::vector<DataNode*>& getOutputDataNodes() const {return m_outputs;}
176 const std::vector<DataNode*>& getInputDataNodes() const {return m_inputs;}
178 void setRank(float& rank) {m_rank = rank;}
180 const float& getRank() const {return m_rank;}
181
183 const unsigned int& getAlgoIndex() const { return m_algoIndex; }
185 void setIOBound(bool value) { m_isIOBound = value;}
187 bool isIOBound() const {return m_isIOBound;}
189 bool dataDependenciesSatisfied(const int& slotNum) const;
190 bool dataDependenciesSatisfied(AlgsExecutionStates& states) const;
192 int updateState(AlgsExecutionStates& states,
193 std::vector<int>& node_decisions) const override;
195 bool promoteToControlReadyState(const int& slotNum,
196 AlgsExecutionStates& states,
197 std::vector<int>& node_decisions) const override;
199 bool promoteToDataReadyState(const int& slotNum, const AlgorithmNode* requestor = nullptr) const;
201 void updateDecision(const int& slotNum,
202 AlgsExecutionStates& states,
203 std::vector<int>& node_decisions,
204 const AlgorithmNode* requestor = nullptr) const override;
206 void printState(std::stringstream& output,
207 AlgsExecutionStates& states,
208 const std::vector<int>& node_decisions,
209 const unsigned int& recursionLevel) const override;
210 private:
212 unsigned int m_algoIndex;
214 std::string m_algoName;
216 bool m_inverted;
218 bool m_allPass;
220 std::vector<DecisionNode*> m_parents;
221
224 std::vector<AlgorithmNode*> m_suppliers;
226 std::vector<AlgorithmNode*> m_consumers;
227
230 std::vector<DataNode*> m_outputs;
232 std::vector<DataNode*> m_inputs;
234 float m_rank;
236 std::vector<IAlgorithm*> m_representatives;
238 bool m_isIOBound;
239 };
240
241 class DataNode {
242 public:
244 DataNode(PrecedenceRulesGraph& /*graph*/, const DataObjID& path): m_data_object_path(path) {}
246 ~DataNode() {}
247 const DataObjID& getPath() {return m_data_object_path;}
249 void addProducerNode(AlgorithmNode* node) {
250 if (std::find(m_producers.begin(),m_producers.end(),node) == m_producers.end())
251 m_producers.push_back(node);
252 }
254 void addConsumerNode(AlgorithmNode* node) {
255 if (std::find(m_consumers.begin(),m_consumers.end(),node) == m_consumers.end())
256 m_consumers.push_back(node);
257 }
259 const std::vector<AlgorithmNode*>& getProducers() const {return m_producers;}
261 const std::vector<AlgorithmNode*>& getConsumers() const {return m_consumers;}
262 private:
263 DataObjID m_data_object_path;
264 std::vector<AlgorithmNode*> m_producers;
265 std::vector<AlgorithmNode*> m_consumers;
266 };
267
268 typedef std::unordered_map<std::string,AlgorithmNode*> AlgoNodesMap;
269 typedef std::unordered_map<std::string,DecisionNode*> DecisionHubsMap;
270 typedef std::unordered_map<DataObjID,DataNode*,DataObjID_Hasher> DataNodesMap;
271
272 typedef std::unordered_map<std::string, DataObjIDColl > AlgoInputsMap;
273 typedef std::unordered_map<std::string, DataObjIDColl > AlgoOutputsMap;
274
275 class ExecutionFlowManager;
276 struct IPrecedenceRulesGraph {
277 virtual ~IPrecedenceRulesGraph() = default;
278 };
279
280 class PrecedenceRulesGraph : public CommonMessaging<IPrecedenceRulesGraph> {
281 friend ExecutionFlowManager;
282 public:
284 PrecedenceRulesGraph(const std::string& name, SmartIF<ISvcLocator> svc) :
285 m_headNode(0), m_nodeCounter(0), m_svcLocator(svc), m_name(name), m_initTime(std::chrono::system_clock::now()),
286 m_eventSlots(nullptr) {}
288 ~PrecedenceRulesGraph() override {
289 if (m_headNode != 0) delete m_headNode;
290 }
292 StatusCode initialize(const std::unordered_map<std::string,unsigned int>& algname_index_map);
293 StatusCode initialize(const std::unordered_map<std::string,unsigned int>& algname_index_map,
294 std::vector<EventSlot>& eventSlots);
296 void registerIODataObjects(const Algorithm* algo);
298 StatusCode buildDataDependenciesRealm();
300 StatusCode buildAugmentedDataDependenciesRealm();
302 void addHeadNode(const std::string& headName, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass);
304 StatusCode addAlgorithmNode(Algorithm* daughterAlgo, const std::string& parentName, bool inverted, bool allPass);
306 template<class T>
307 void attachAlgorithmsToNodes(const std::string& algo_name, const T& container) {
308 auto node = getAlgorithmNode(algo_name);
309 for (auto ialgoIt = container.unsafe_begin(); ialgoIt != container.unsafe_end(); ++ialgoIt)
310 node->attachAlgorithm(*ialgoIt);
311 }
313 AlgorithmNode* getAlgorithmNode(const std::string& algoName) const;
315 StatusCode addDataNode(const DataObjID& dataPath);
317 DataNode* getDataNode(const DataObjID& dataPath) const;
319 StatusCode addDecisionHubNode(Algorithm* daughterAlgo, const std::string& parentName, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass);
321 unsigned int getControlFlowNodeCounter() const {return m_nodeCounter;}
323 void updateEventState(AlgsExecutionStates& states,
324 std::vector<int>& node_decisions) const;
326 void updateDecision(const std::string& algo_name,
327 const int& slotNum,
328 AlgsExecutionStates& states,
329 std::vector<int>& node_decisions) const;
331 void rankAlgorithms(IGraphVisitor& ranker) const;
333 void printState(std::stringstream& output,
334 AlgsExecutionStates& states,
335 const std::vector<int>& node_decisions,
336 const unsigned int& recursionLevel) const {m_headNode->printState(output,states,node_decisions,recursionLevel);}
338 const std::vector<AlgorithmNode*> getDataIndependentNodes() const;
340 const std::string& name() const override {return m_name;}
342 SmartIF<ISvcLocator>& serviceLocator() const override {return m_svcLocator;}
344 const std::chrono::system_clock::time_point getInitTime() const {return m_initTime;}
346 AlgsExecutionStates& getAlgoStates(const int& slotNum) const {return m_eventSlots->at(slotNum).algsStates;}
348 std::vector<int>& getNodeDecisions(const int& slotNum) const {return m_eventSlots->at(slotNum).controlFlowState;}
350 std::string dumpDataFlow() const;
352 void dumpExecutionPlan();
354 void addEdgeToExecutionPlan(const AlgorithmNode* u, const AlgorithmNode* v);
355
356 private:
358 DecisionNode* m_headNode;
360 AlgoNodesMap m_algoNameToAlgoNodeMap;
362 DecisionHubsMap m_decisionNameToDecisionHubMap;
364 DataNodesMap m_dataPathToDataNodeMap;
366 AlgoInputsMap m_algoNameToAlgoInputsMap;
367 AlgoOutputsMap m_algoNameToAlgoOutputsMap;
369 unsigned int m_nodeCounter;
371 mutable SmartIF<ISvcLocator> m_svcLocator;
372 const std::string m_name;
373 const std::chrono::system_clock::time_point m_initTime;
375 std::vector<EventSlot>* m_eventSlots;
377 boost::ExecPlan m_ExecPlan;
378 std::map<std::string,boost::AlgoVertex> m_exec_plan_map;
379 };
380
381
382 } // namespace concurrency
383
384
385 #endif
boost::AlgoNodeStruct::m_index
int m_index
Definition: PrecedenceRulesGraph.h:31
concurrency::AlgorithmNode::m_outputs
std::vector< DataNode * > m_outputs
Vectors, used in augmented data dependencies realm Outputs of the algorithm, represented as DataNode&#39;...
Definition: PrecedenceRulesGraph.h:230
Algorithm.h
concurrency::AlgorithmNode::getAlgoIndex
const unsigned int & getAlgoIndex() const
XXX: CF tests.
Definition: PrecedenceRulesGraph.h:183
SmartIF< ISvcLocator >
concurrency::DecisionNode::m_parents
std::vector< DecisionNode * > m_parents
XXX: CF tests. All direct parent nodes in the tree.
Definition: PrecedenceRulesGraph.h:135
concurrency::DecisionNode
Definition: PrecedenceRulesGraph.h:86
concurrency::ControlFlowNode::ControlFlowNode
ControlFlowNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name)
Constructor.
Definition: PrecedenceRulesGraph.h:49
concurrency::AlgoOutputsMap
std::unordered_map< std::string, DataObjIDColl > AlgoOutputsMap
Definition: PrecedenceRulesGraph.h:273
concurrency::AlgorithmNode::m_algoIndex
unsigned int m_algoIndex
The index of the algorithm.
Definition: PrecedenceRulesGraph.h:212
concurrency::PrecedenceRulesGraph::getInitTime
const std::chrono::system_clock::time_point getInitTime() const
Definition: PrecedenceRulesGraph.h:344
concurrency::DecisionNode::DecisionNode
DecisionNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass)
Constructor.
Definition: PrecedenceRulesGraph.h:89
boost::AlgoNodeStruct::AlgoNodeStruct
AlgoNodeStruct(const std::string &name, const int index=-1, const int &rank=-1, const double &runtime=-1, const double &eccentricity=-1.0)
Definition: PrecedenceRulesGraph.h:28
boost
The namespace threadpool contains a thread pool and related utility classes.
Definition: iter_pos.hpp:13
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:772
concurrency::AlgorithmNode::setIOBound
void setIOBound(bool value)
Set the I/O-boundness flag.
Definition: PrecedenceRulesGraph.h:185
concurrency::PrecedenceRulesGraph::attachAlgorithmsToNodes
void attachAlgorithmsToNodes(const std::string &algo_name, const T &container)
Attach pointers to real Algorithms (and their clones) to Algorithm nodes of the graph.
Definition: PrecedenceRulesGraph.h:307
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
concurrency::PrecedenceRulesGraph::ExecutionFlowManager
friend ExecutionFlowManager
Definition: PrecedenceRulesGraph.h:281
DataObjID
Definition: DataObjID.h:38
concurrency::DataNode
Definition: PrecedenceRulesGraph.h:241
concurrency::PrecedenceRulesGraph::m_initTime
const std::chrono::system_clock::time_point m_initTime
Definition: PrecedenceRulesGraph.h:373
concurrency::AlgorithmNode::m_algoName
std::string m_algoName
The name of the algorithm.
Definition: PrecedenceRulesGraph.h:214
boost::ExecPlan
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoNodeStruct > ExecPlan
Definition: PrecedenceRulesGraph.h:37
concurrency::AlgorithmNode::getInputDataNodes
const std::vector< DataNode * > & getInputDataNodes() const
Get all consumer nodes.
Definition: PrecedenceRulesGraph.h:176
gaudirun.output
output
Definition: gaudirun.py:388
concurrency
Definition: ExecutionFlowManager.cpp:3
concurrency::AlgorithmNode::m_consumers
std::vector< AlgorithmNode * > m_consumers
AlgorithmNodes that represent algorithms which need the output of the algorithm.
Definition: PrecedenceRulesGraph.h:226
concurrency::PrecedenceRulesGraph::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: PrecedenceRulesGraph.h:342
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoNodeMap
AlgoNodesMap m_algoNameToAlgoNodeMap
Index: map of algorithm&#39;s name to AlgorithmNode.
Definition: PrecedenceRulesGraph.h:360
concurrency::AlgorithmNode::setRank
void setRank(float &rank)
Set Algorithm rank.
Definition: PrecedenceRulesGraph.h:178
concurrency::DecisionNode::m_children
std::vector< ControlFlowNode * > m_children
All direct daughter nodes in the tree.
Definition: PrecedenceRulesGraph.h:133
concurrency::DecisionHubsMap
std::unordered_map< std::string, DecisionNode * > DecisionHubsMap
Definition: PrecedenceRulesGraph.h:269
concurrency::DataNode::~DataNode
~DataNode()
Destructor.
Definition: PrecedenceRulesGraph.h:246
concurrency::AlgorithmNode::getAlgorithmRepresentatives
const std::vector< IAlgorithm * > & getAlgorithmRepresentatives() const
get Algorithm representatives
Definition: PrecedenceRulesGraph.h:163
concurrency::PrecedenceRulesGraph::printState
void printState(std::stringstream &output, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.h:333
concurrency::AlgorithmNode::m_parents
std::vector< DecisionNode * > m_parents
XXX: CF tests.
Definition: PrecedenceRulesGraph.h:220
concurrency::ControlFlowNode
Definition: PrecedenceRulesGraph.h:46
std
STL namespace.
concurrency::AlgorithmNode::getOutputDataNodes
const std::vector< DataNode * > & getOutputDataNodes() const
Get all supplier nodes.
Definition: PrecedenceRulesGraph.h:174
boost::AlgoNodeStruct::m_rank
int m_rank
Definition: PrecedenceRulesGraph.h:32
concurrency::AlgorithmNode::m_inverted
bool m_inverted
Whether the selection result is negated or not.
Definition: PrecedenceRulesGraph.h:216
concurrency::DecisionNode::m_allPass
bool m_allPass
Whether always passing regardless of daughter results.
Definition: PrecedenceRulesGraph.h:130
concurrency::PrecedenceRulesGraph::getNodeDecisions
std::vector< int > & getNodeDecisions(const int &slotNum) const
Definition: PrecedenceRulesGraph.h:348
boost::AlgoNodeStruct::m_runtime
double m_runtime
Definition: PrecedenceRulesGraph.h:33
std::map< std::string, boost::AlgoVertex >
concurrency::AlgorithmNode::isIOBound
bool isIOBound() const
Check if algorithm is I/O-bound.
Definition: PrecedenceRulesGraph.h:187
std::stringstream
STL class.
concurrency::PrecedenceRulesGraph::~PrecedenceRulesGraph
~PrecedenceRulesGraph() override
Destructor.
Definition: PrecedenceRulesGraph.h:288
std::string
STL class.
concurrency::AlgorithmNode::AlgorithmNode
AlgorithmNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &algoName, bool inverted, bool allPass, bool IOBound)
Constructor.
Definition: PrecedenceRulesGraph.h:143
concurrency::ControlFlowNode::~ControlFlowNode
virtual ~ControlFlowNode()
Destructor.
Definition: PrecedenceRulesGraph.h:52
boost::AlgoNodeStruct::m_eccentricity
double m_eccentricity
Definition: PrecedenceRulesGraph.h:34
boost::AlgoNodeStruct::AlgoNodeStruct
AlgoNodeStruct()
Definition: PrecedenceRulesGraph.h:27
concurrency::DecisionNode::m_modeOR
bool m_modeOR
Whether acting as "and" (false) or "or" node (true)
Definition: PrecedenceRulesGraph.h:128
std::vector::at
T at(T...args)
boost::AlgoNodeStruct
Definition: PrecedenceRulesGraph.h:26
concurrency::AlgorithmNode::getRank
const float & getRank() const
Get Algorithm rank.
Definition: PrecedenceRulesGraph.h:180
concurrency::PrecedenceRulesGraph::m_eventSlots
std::vector< EventSlot > * m_eventSlots
Definition: PrecedenceRulesGraph.h:375
AlgsExecutionStates
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
Definition: AlgsExecutionStates.h:28
concurrency::ExecutionFlowManager
Manage the execution flow using a graph of task precedence rules Once initialized, the graph is const and can be shared across events.
Definition: ExecutionFlowManager.h:21
concurrency::ControlFlowNode::m_graph
PrecedenceRulesGraph * m_graph
Definition: PrecedenceRulesGraph.h:77
concurrency::DataNode::getPath
const DataObjID & getPath()
Definition: PrecedenceRulesGraph.h:247
concurrency::PrecedenceRulesGraph::m_headNode
DecisionNode * m_headNode
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths...
Definition: PrecedenceRulesGraph.h:358
concurrency::ControlFlowNode::m_nodeIndex
unsigned int m_nodeIndex
Definition: PrecedenceRulesGraph.h:81
concurrency::DataNode::m_consumers
std::vector< AlgorithmNode * > m_consumers
Definition: PrecedenceRulesGraph.h:265
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
concurrency::DataNodesMap
std::unordered_map< DataObjID, DataNode *, DataObjID_Hasher > DataNodesMap
Definition: PrecedenceRulesGraph.h:270
concurrency::PrecedenceRulesGraph::m_name
const std::string m_name
Definition: PrecedenceRulesGraph.h:372
concurrency::DecisionNode::getDaughters
const std::vector< ControlFlowNode * > & getDaughters() const
Definition: PrecedenceRulesGraph.h:115
CommonMessaging.h
boost::AlgoVertex
graph_traits< ExecPlan >::vertex_descriptor AlgoVertex
Definition: PrecedenceRulesGraph.h:38
concurrency::AlgoInputsMap
std::unordered_map< std::string, DataObjIDColl > AlgoInputsMap
Definition: PrecedenceRulesGraph.h:272
concurrency::PrecedenceRulesGraph::m_exec_plan_map
std::map< std::string, boost::AlgoVertex > m_exec_plan_map
Definition: PrecedenceRulesGraph.h:378
boost::AlgoNodeStruct::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:30
concurrency::DataNode::getConsumers
const std::vector< AlgorithmNode * > & getConsumers() const
Get all data object consumers.
Definition: PrecedenceRulesGraph.h:261
concurrency::IGraphVisitor
Definition: IGraphVisitor.h:9
concurrency::AlgorithmNode::getConsumerNodes
const std::vector< AlgorithmNode * > & getConsumerNodes() const
Get all consumer nodes.
Definition: PrecedenceRulesGraph.h:167
CPUCruncher.h
concurrency::AlgorithmNode::addConsumerNode
void addConsumerNode(AlgorithmNode *node)
Associate an AlgorithmNode, which is a data consumer of this one.
Definition: PrecedenceRulesGraph.h:159
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoOutputsMap
AlgoOutputsMap m_algoNameToAlgoOutputsMap
Definition: PrecedenceRulesGraph.h:367
concurrency::AlgorithmNode::attachAlgorithm
void attachAlgorithm(IAlgorithm *ialgo)
Attach Algorithm representative.
Definition: PrecedenceRulesGraph.h:161
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:27
concurrency::PrecedenceRulesGraph::PrecedenceRulesGraph
PrecedenceRulesGraph(const std::string &name, SmartIF< ISvcLocator > svc)
Constructor.
Definition: PrecedenceRulesGraph.h:284
concurrency::DecisionNode::m_modePromptDecision
bool m_modePromptDecision
Whether to evaluate the hub decision ASA its child decisions allow to do that.
Definition: PrecedenceRulesGraph.h:126
concurrency::DataNode::m_data_object_path
DataObjID m_data_object_path
Definition: PrecedenceRulesGraph.h:263
concurrency::PrecedenceRulesGraph::getAlgoStates
AlgsExecutionStates & getAlgoStates(const int &slotNum) const
Definition: PrecedenceRulesGraph.h:346
concurrency::ControlFlowNode::m_nodeName
std::string m_nodeName
Definition: PrecedenceRulesGraph.h:82
concurrency::AlgorithmNode::m_rank
float m_rank
Algorithm rank of any kind.
Definition: PrecedenceRulesGraph.h:234
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:134
concurrency::PrecedenceRulesGraph
Definition: PrecedenceRulesGraph.h:280
concurrency::AlgorithmNode::m_representatives
std::vector< IAlgorithm * > m_representatives
Representatives (including clones) of the node.
Definition: PrecedenceRulesGraph.h:236
concurrency::AlgoNodesMap
std::unordered_map< std::string, AlgorithmNode * > AlgoNodesMap
Definition: PrecedenceRulesGraph.h:268
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::find
T find(T...args)
concurrency::AlgorithmNode::addSupplierNode
void addSupplierNode(AlgorithmNode *node)
Associate an AlgorithmNode, which is a data supplier for this one.
Definition: PrecedenceRulesGraph.h:157
Gaudi::Functional::m_inputs
std::vector< InputHandle_t< In > > m_inputs
Definition: MergingTransformer.h:39
std::vector< int >
concurrency::AlgorithmNode::getSupplierNodes
const std::vector< AlgorithmNode * > & getSupplierNodes() const
Get all supplier nodes.
Definition: PrecedenceRulesGraph.h:165
concurrency::AlgorithmNode::m_inputs
std::vector< DataNode * > m_inputs
Inputs of the algorithm, represented as DataNode&#39;s.
Definition: PrecedenceRulesGraph.h:232
concurrency::DecisionNode::m_modeConcurrent
bool m_modeConcurrent
Whether all daughters will be evaluated concurrently or sequentially.
Definition: PrecedenceRulesGraph.h:123
time_point
Clock::time_point time_point
Definition: ITimelineSvc.h:11
concurrency::DataNode::m_producers
std::vector< AlgorithmNode * > m_producers
Definition: PrecedenceRulesGraph.h:264
concurrency::PrecedenceRulesGraph::m_ExecPlan
boost::ExecPlan m_ExecPlan
temporary items to experiment with execution planning
Definition: PrecedenceRulesGraph.h:377
concurrency::DataNode::DataNode
DataNode(PrecedenceRulesGraph &, const DataObjID &path)
Constructor.
Definition: PrecedenceRulesGraph.h:244
concurrency::PrecedenceRulesGraph::m_nodeCounter
unsigned int m_nodeCounter
Total number of nodes in the graph.
Definition: PrecedenceRulesGraph.h:369
concurrency::IPrecedenceRulesGraph
Definition: PrecedenceRulesGraph.h:276
CommonMessaging
Definition: CommonMessaging.h:55
concurrency::AlgorithmNode
Definition: PrecedenceRulesGraph.h:140
IGraphVisitor.h
concurrency::ControlFlowNode::getNodeName
const std::string & getNodeName() const
Definition: PrecedenceRulesGraph.h:71
concurrency::ControlFlowNode::getNodeIndex
const unsigned int & getNodeIndex() const
XXX: CF tests.
Definition: PrecedenceRulesGraph.h:70
concurrency::AlgorithmNode::m_suppliers
std::vector< AlgorithmNode * > m_suppliers
Vectors, used in data dependencies realm AlgorithmNodes that represent algorithms producing an input ...
Definition: PrecedenceRulesGraph.h:224
AlgsExecutionStates.h
AlgsExecutionStates::State
State
Execution states of the algorithms.
Definition: AlgsExecutionStates.h:32
concurrency::PrecedenceRulesGraph::name
const std::string & name() const override
Retrieve name of the service.
Definition: PrecedenceRulesGraph.h:340
concurrency::AlgorithmNode::m_isIOBound
bool m_isIOBound
If an algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)
Definition: PrecedenceRulesGraph.h:238
EventSlot.h
concurrency::AlgorithmNode::m_allPass
bool m_allPass
Whether the selection result is relevant or always "pass".
Definition: PrecedenceRulesGraph.h:218
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoInputsMap
AlgoInputsMap m_algoNameToAlgoInputsMap
Indexes: maps of algorithm&#39;s name to algorithm&#39;s inputs/outputs.
Definition: PrecedenceRulesGraph.h:366
concurrency::DataNode::addProducerNode
void addProducerNode(AlgorithmNode *node)
Associate an AlgorithmNode, which is a data supplier for this one.
Definition: PrecedenceRulesGraph.h:249
concurrency::DataNode::getProducers
const std::vector< AlgorithmNode * > & getProducers() const
Get all data object producers.
Definition: PrecedenceRulesGraph.h:259
concurrency::PrecedenceRulesGraph::m_dataPathToDataNodeMap
DataNodesMap m_dataPathToDataNodeMap
Index: map of data path to DataNode.
Definition: PrecedenceRulesGraph.h:364
concurrency::PrecedenceRulesGraph::getControlFlowNodeCounter
unsigned int getControlFlowNodeCounter() const
Get total number of graph nodes.
Definition: PrecedenceRulesGraph.h:321
concurrency::PrecedenceRulesGraph::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: PrecedenceRulesGraph.h:371
std::unordered_map< std::string, unsigned int >
concurrency::State
AlgsExecutionStates::State State
Definition: PrecedenceRulesGraph.h:43
concurrency::DataNode::addConsumerNode
void addConsumerNode(AlgorithmNode *node)
Associate an AlgorithmNode, which is a data consumer of this one.
Definition: PrecedenceRulesGraph.h:254
concurrency::PrecedenceRulesGraph::m_decisionNameToDecisionHubMap
DecisionHubsMap m_decisionNameToDecisionHubMap
Index: map of decision&#39;s name to DecisionHub.
Definition: PrecedenceRulesGraph.h:362