The Gaudi Framework  master (37c0b60a)
PrecedenceRulesGraph.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef GAUDIHIVE_PRECEDENCERULESGRAPH_H
12 #define GAUDIHIVE_PRECEDENCERULESGRAPH_H
13 
14 // std includes
15 #include <algorithm>
16 #include <memory>
17 #include <sstream>
18 #include <unordered_map>
19 #include <variant>
20 #include <vector>
21 
22 #include <boost/filesystem.hpp>
23 #include <boost/graph/adjacency_list.hpp>
24 #include <boost/graph/graphml.hpp>
25 
26 // fwk includes
27 #include "../AlgsExecutionStates.h"
28 #include "../EventSlot.h"
29 #include "Visitors/IGraphVisitor.h"
30 #include <Gaudi/Algorithm.h>
32 #include <GaudiKernel/DataObject.h>
33 #include <GaudiKernel/ICondSvc.h>
36 #include <GaudiKernel/TaggedBool.h>
37 
38 namespace concurrency {
44 } // namespace concurrency
45 
46 namespace precedence {
47 
48  // Precedence trace utilities ==============================================
49  struct AlgoTraceProps {
51  AlgoTraceProps( const std::string& name, int index = -1, int rank = -1, long int runtime = -1,
52  long long int start = -1 )
53  : m_name( name ), m_index( index ), m_rank( rank ), m_runtime( runtime ), m_start( start ) {}
55  int m_index{ -1 };
56  int m_rank{ -1 };
57  long int m_runtime{ -1 }; // us
58  long long int m_start{ -1 }; // ns
59  int m_eccentricity{ -1 };
60  };
61 
62  using PrecTrace = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps>;
63  using AlgoTraceVertex = boost::graph_traits<PrecTrace>::vertex_descriptor;
64 
65  // Precedence rules utilities ==============================================
66  struct AlgoProps {
67  AlgoProps() {}
68  AlgoProps( Gaudi::Algorithm* algo, uint nodeIndex, uint algoIndex )
69  : m_name( algo->name() )
70  , m_nodeIndex( nodeIndex )
71  , m_algoIndex( algoIndex )
72  , m_algorithm( algo )
73  , m_isAsynchronous( algo->isAsynchronous() ) {}
74 
76  int m_nodeIndex{ -1 };
77  int m_algoIndex{ -1 };
78  int m_rank{ -1 };
82  bool m_isAsynchronous{ false };
83  };
84 
86  DecisionHubProps( const std::string& name, uint nodeIndex, concurrency::Concurrent modeConcurrent,
87  concurrency::PromptDecision modePromptDecision, concurrency::ModeOr modeOR,
88  concurrency::AllPass allPass, concurrency::Inverted isInverted )
89  : m_name( name )
90  , m_nodeIndex( nodeIndex )
91  , m_modeConcurrent( modeConcurrent )
92  , m_modePromptDecision( modePromptDecision )
93  , m_inverted( isInverted )
94  , m_modeOR( modeOR )
95  , m_allPass( allPass ) {}
96 
99 
106  bool m_inverted{ false };
108  bool m_modeOR;
110  bool m_allPass;
111  };
112 
113  struct DataProps {
114  DataProps( const DataObjID& id ) : m_id( id ) {}
115 
117  };
118 
120  CondDataProps( const DataObjID& id ) : DataProps( id ) {}
121  };
122 
123  // Vertex unpacking ========================================================
124 
125  struct VertexName {
126  std::string operator()( const AlgoProps& props ) const { return props.m_name; }
127 
128  std::string operator()( const DecisionHubProps& props ) const { return props.m_name; }
129 
130  std::string operator()( const DataProps& props ) const { return props.m_id.fullKey(); }
131  };
132 
133  struct GroupMode {
134  std::string operator()( const AlgoProps& ) const { return ""; }
135 
137  return props.m_modeConcurrent ? "Concurrent" : "Sequential";
138  }
139 
140  std::string operator()( const DataProps& ) const { return ""; }
141  };
142 
143  struct GroupLogic {
144  std::string operator()( const AlgoProps& ) const { return ""; }
145 
146  std::string operator()( const DecisionHubProps& props ) const { return props.m_modeOR ? "OR" : "AND"; }
147 
148  std::string operator()( const DataProps& ) const { return ""; }
149  };
150 
151  struct GroupExit {
152  std::string operator()( const AlgoProps& ) const { return ""; }
153 
155  return props.m_modePromptDecision ? "Early" : "Late";
156  }
157 
158  std::string operator()( const DataProps& ) const { return ""; }
159  };
160 
162  std::string operator()( const AlgoProps& ) const { return ""; }
163 
165  return props.m_inverted ? "Inverted" : "Non-inverted";
166  }
167 
168  std::string operator()( const DataProps& ) const { return ""; }
169  };
170 
171  struct AllPass {
172  std::string operator()( const AlgoProps& ) const { return ""; }
173 
174  std::string operator()( const DecisionHubProps& props ) const { return props.m_allPass ? "Optimist" : "Realist"; }
175 
176  std::string operator()( const DataProps& ) const { return ""; }
177  };
178 
179  struct CFDecision {
180  CFDecision( const EventSlot& slot ) : m_slot( slot ) {}
181 
183  return std::to_string( m_slot.controlFlowState.at( props.m_nodeIndex ) );
184  }
185 
187  return std::to_string( m_slot.controlFlowState.at( props.m_nodeIndex ) );
188  }
189 
190  std::string operator()( const DataProps& ) const { return ""; }
191 
193  };
194 
195  struct EntityState {
196  EntityState( const EventSlot& slot, SmartIF<ISvcLocator>& svcLocator, bool conditionsEnabled )
197  : m_slot( slot ), m_conditionsEnabled( conditionsEnabled ) {
199  MsgStream log{ msgSvc, "EntityState.Getter" };
200 
201  // Figure if we can discover the data object states
202  m_whiteboard = svcLocator->service<IHiveWhiteBoard>( "EventDataSvc", false );
203  if ( !m_whiteboard.isValid() ) {
204  log << MSG::WARNING << "Failed to locate EventDataSvc: no way to add DO "
205  << "states to the TTT dump " << endmsg;
206  }
207 
208  if ( m_conditionsEnabled ) {
209  // Figure if we can discover Condition data object states
210  m_condSvc = svcLocator->service<ICondSvc>( "CondSvc", false );
211  if ( !m_condSvc.isValid() )
212  log << MSG::WARNING << "Failed to locate CondSvc: no way to add Condition DO "
213  << "states to the TTT dump " << endmsg;
214  }
215 
216  if ( !m_slot.eventContext->valid() )
217  log << MSG::WARNING << "Event context is invalid: no way to add DO states"
218  << " in the TTT dump" << endmsg;
219  }
220 
221  // Returns algorithm's FSM state
223  std::ostringstream oss;
224  oss << m_slot.algsStates[props.m_algoIndex];
225  return oss.str();
226  }
227 
228  std::string operator()( const DecisionHubProps& ) const { return ""; }
229 
232 
234  if ( m_whiteboard->selectStore( m_slot.eventContext->slot() ).isSuccess() )
235  state = m_whiteboard->exists( props.m_id ) ? "Produced" : "Missing";
236 
237  return state;
238  }
239 
242 
243  if ( m_condSvc.isValid() && m_slot.eventContext->valid() )
244  state = m_condSvc->isValidID( *( m_slot.eventContext ), props.m_id ) ? "Produced" : "Missing";
245 
246  return state;
247  }
248 
250 
253  bool m_conditionsEnabled{ false };
254  };
255 
256  struct StartTime {
259  MsgStream log{ msgSvc, "StartTime.Getter" };
260 
261  // Figure if we can discover the algorithm timings
262  m_timelineSvc = svcLocator->service<ITimelineSvc>( "TimelineSvc", false );
263  if ( !m_timelineSvc.isValid() ) {
264  log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to "
265  << "add algorithm start time to the TTT dumps" << endmsg;
266  }
267  }
268 
270 
271  std::string startTime;
272 
273  if ( m_timelineSvc.isValid() ) {
274 
275  TimelineEvent te{};
276  te.algorithm = props.m_name;
277  te.slot = m_slot.eventContext->slot();
278  te.event = m_slot.eventContext->evt();
279 
280  m_timelineSvc->getTimelineEvent( te );
281  startTime = std::to_string(
282  std::chrono::duration_cast<std::chrono::nanoseconds>( te.start.time_since_epoch() ).count() );
283  }
284 
285  return startTime;
286  }
287 
288  std::string operator()( const DecisionHubProps& ) const { return ""; }
289 
290  std::string operator()( const DataProps& ) const { return ""; }
291 
294  };
295 
296  struct EndTime {
299  MsgStream log{ msgSvc, "EndTime.Getter" };
300 
301  // Figure if we can discover the algorithm timings
302  m_timelineSvc = svcLocator->service<ITimelineSvc>( "TimelineSvc", false );
303  if ( !m_timelineSvc.isValid() )
304  log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to add "
305  << "algorithm completion time to the TTT dumps" << endmsg;
306  }
307 
309 
310  std::string endTime;
311 
312  if ( m_timelineSvc.isValid() ) {
313 
314  TimelineEvent te{};
315  te.algorithm = props.m_name;
316  te.slot = m_slot.eventContext->slot();
317  te.event = m_slot.eventContext->evt();
318 
319  m_timelineSvc->getTimelineEvent( te );
320  endTime =
321  std::to_string( std::chrono::duration_cast<std::chrono::nanoseconds>( te.end.time_since_epoch() ).count() );
322  }
323 
324  return endTime;
325  }
326 
327  std::string operator()( const DecisionHubProps& ) const { return ""; }
328 
329  std::string operator()( const DataProps& ) const { return ""; }
330 
333  };
334 
335  struct Duration {
338  MsgStream log{ msgSvc, "Duration.Getter" };
339 
340  // Figure if we can discover the algorithm timings
341  m_timelineSvc = svcLocator->service<ITimelineSvc>( "TimelineSvc", false );
342  if ( !m_timelineSvc.isValid() )
343  log << MSG::WARNING << "Failed to locate the TimelineSvc: no way to add "
344  << "algorithm's runtimes to the TTT dumps" << endmsg;
345  }
346 
348 
350 
351  if ( m_timelineSvc.isValid() ) {
352 
353  TimelineEvent te;
354  te.algorithm = props.m_name;
355  te.slot = m_slot.eventContext->slot();
356  te.event = m_slot.eventContext->evt();
357 
358  m_timelineSvc->getTimelineEvent( te );
359  time = std::to_string( std::chrono::duration_cast<std::chrono::nanoseconds>( te.end - te.start ).count() );
360  }
361 
362  return time;
363  }
364 
365  std::string operator()( const DecisionHubProps& ) const { return ""; }
366 
367  std::string operator()( const DataProps& ) const { return ""; }
368 
371  };
372 
373  struct Operations {
375  return props.m_isAsynchronous ? "Asynchronous" : "CPU-bound";
376  }
377 
378  std::string operator()( const DecisionHubProps& ) const { return ""; }
379 
380  std::string operator()( const DataProps& ) const { return ""; }
381  };
382 
383  static inline std::ostream& operator<<( std::ostream& os, const AlgoProps& ) { return os << "Algorithm"; }
384  static inline std::ostream& operator<<( std::ostream& os, const DecisionHubProps& ) { return os << "DecisionHub"; }
385  static inline std::ostream& operator<<( std::ostream& os, const DataProps& ) { return os << "Data"; }
386  static inline std::ostream& operator<<( std::ostream& os, const CondDataProps& ) { return os << "ConditionData"; }
387 
388  //=========================================================================
389 
390  using VariantVertexProps = std::variant<AlgoProps, DecisionHubProps, DataProps, CondDataProps>;
391  using PRGraph = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, VariantVertexProps>;
392  using PRVertexDesc = boost::graph_traits<PRGraph>::vertex_descriptor;
393 
394 } // namespace precedence
395 
396 struct Cause final {
397  enum class source { Root, Task };
398 
401 };
402 
403 namespace concurrency {
404  class PrecedenceRulesGraph;
405 
406  using precedence::AlgoProps;
408  using precedence::DataProps;
412 
413  // ==========================================================================
415  public:
417  ControlFlowNode( PrecedenceRulesGraph& graph, unsigned int nodeIndex, const std::string& name )
418  : m_graph( &graph ), m_nodeIndex( nodeIndex ), m_nodeName( name ) {}
420  virtual ~ControlFlowNode() = default;
421 
423  virtual bool accept( IGraphVisitor& visitor ) = 0;
425  virtual void printState( std::stringstream& output, EventSlot& slot, const unsigned int& recursionLevel ) const = 0;
427  const unsigned int& getNodeIndex() const { return m_nodeIndex; }
429  const std::string& name() const { return m_nodeName; }
430 
431  public:
433 
434  protected:
435  unsigned int m_nodeIndex;
437  };
438 
439  class DecisionNode final : public ControlFlowNode {
440  public:
442  DecisionNode( PrecedenceRulesGraph& graph, unsigned int nodeIndex, const std::string& name,
443  Concurrent modeConcurrent, PromptDecision modePromptDecision, ModeOr modeOR, AllPass allPass,
444  Inverted isInverted )
445  : ControlFlowNode( graph, nodeIndex, name )
446  , m_modeConcurrent( modeConcurrent )
447  , m_modePromptDecision( modePromptDecision )
448  , m_modeOR( modeOR )
449  , m_allPass( allPass )
450  , m_inverted( isInverted ) {}
451 
453  bool accept( IGraphVisitor& visitor ) override;
455  void addParentNode( DecisionNode* node );
457  void addDaughterNode( ControlFlowNode* node );
461  void printState( std::stringstream& output, EventSlot& slot, const unsigned int& recursionLevel ) const override;
462 
463  public:
470  bool m_modeOR;
472  bool m_allPass;
474  bool m_inverted{ false };
479  };
480 
481  // ==========================================================================
482  class DataNode;
483 
484  class AlgorithmNode final : public ControlFlowNode {
485  public:
487  AlgorithmNode( PrecedenceRulesGraph& graph, Gaudi::Algorithm* algoPtr, unsigned int nodeIndex,
488  unsigned int algoIndex )
489  : ControlFlowNode( graph, nodeIndex, algoPtr->name() )
490  , m_algorithm( algoPtr )
491  , m_algoIndex( algoIndex )
492  , m_algoName( algoPtr->name() )
493  , m_isAsynchronous( algoPtr->isAsynchronous() ) {}
494 
496  bool accept( IGraphVisitor& visitor ) override;
497 
499  void addParentNode( DecisionNode* node );
502 
504  void addOutputDataNode( DataNode* node );
506  void addInputDataNode( DataNode* node );
511 
513  void setRank( float rank ) { m_rank = rank; }
515  float getRank() const { return m_rank; }
516 
520  unsigned int getAlgoIndex() const { return m_algoIndex; }
521 
523  void setAsynchronous( bool value ) { m_isAsynchronous = value; }
525  bool isAsynchronous() const { return m_isAsynchronous; }
526 
528  void printState( std::stringstream& output, EventSlot& slot, const unsigned int& recursionLevel ) const override;
529 
530  public:
533 
534  private:
538  unsigned int m_algoIndex;
542  float m_rank = -1;
545 
550  };
551 
552  // ==========================================================================
553  class DataNode {
554  public:
557 
559  virtual ~DataNode() = default;
560 
561  const DataObjID& name() const { return m_data_object_path; }
562 
564  virtual bool accept( IGraphVisitor& visitor ) {
565  return visitor.visitEnter( *this ) ? visitor.visit( *this ) : true;
566  }
569  if ( std::find( m_producers.begin(), m_producers.end(), node ) == m_producers.end() )
570  m_producers.push_back( node );
571  }
574  if ( std::find( m_consumers.begin(), m_consumers.end(), node ) == m_consumers.end() )
575  m_consumers.push_back( node );
576  }
581 
582  public:
584 
585  private:
589  };
590 
591  class ConditionNode final : public DataNode {
592  public:
595  : DataNode( graph, path ), m_condSvc( condSvc ) {}
596 
600  bool accept( IGraphVisitor& visitor ) override {
601  return visitor.visitEnter( *this ) ? visitor.visit( *this ) : true;
602  }
603 
604  public:
605  // Service for Conditions handling
607  };
608 
609  // ==========================================================================
610 
612  virtual ~IPrecedenceRulesGraph() = default;
613  };
614 
615  template <typename T>
616  struct CompareNodes {
617  bool operator()( const T& a, const T& b ) const { return a->name() < b->name(); }
618  };
619 
620  class PrecedenceRulesGraph : public CommonMessaging<IPrecedenceRulesGraph> {
621  public:
624  // make sure that CommonMessaging is initialized
625  setUpMessaging();
626  }
627 
630 
632  void accept( IGraphVisitor& visitor ) const;
633 
635  StatusCode addDataNode( const DataObjID& dataPath );
637  DataNode* getDataNode( const DataObjID& dataPath ) const { return m_dataPathToDataNodeMap.at( dataPath ).get(); }
639  void registerIODataObjects( const Gaudi::Algorithm* algo );
642 
647  DecisionNode* getHeadNode() const { return m_headNode; }
649  StatusCode addAlgorithmNode( Gaudi::Algorithm* daughterAlgo, const std::string& parentName );
651  AlgorithmNode* getAlgorithmNode( const std::string& algoName ) const {
652  return m_algoNameToAlgoNodeMap.at( algoName ).get();
653  }
655  StatusCode addDecisionHubNode( Gaudi::Algorithm* daughterAlgo, const std::string& parentName,
659  unsigned int getControlFlowNodeCounter() const { return m_nodeCounter; }
660 
662  void rankAlgorithms( IGraphVisitor& ranker ) const;
663 
665  const std::string& name() const override { return m_name; }
667  SmartIF<ISvcLocator>& serviceLocator() const override { return m_svcLocator; }
670  void printState( std::stringstream& output, EventSlot& slot, const unsigned int& recursionLevel ) const;
671 
673  void enableAnalysis() { m_enableAnalysis = true; }
674  PRVertexDesc node( const std::string& ) const;
675 
677  std::string dumpDataFlow() const;
681  void dumpPrecRules( const boost::filesystem::path&, const EventSlot& slot );
683  void dumpPrecTrace( const boost::filesystem::path&, const EventSlot& slot );
685  void addEdgeToPrecTrace( const AlgorithmNode* u, const AlgorithmNode* v );
687  void dumpControlFlow( std::ostringstream&, ControlFlowNode*, const int& ) const;
688 
689  private:
701 
703  unsigned int m_nodeCounter = 0;
705  unsigned int m_algoCounter = 0;
706 
710 
714  bool m_enableAnalysis{ false };
717 
720  };
721 
722 } // namespace concurrency
723 #endif
precedence
Definition: precedence.py:1
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:83
ITimelineSvc.h
EventContext::valid
bool valid() const
Definition: EventContext.h:54
concurrency::AlgorithmNode::m_rank
float m_rank
Algorithm rank of any kind.
Definition: PrecedenceRulesGraph.h:542
concurrency::AlgorithmNode::setAsynchronous
void setAsynchronous(bool value)
Set the asynchronous flag.
Definition: PrecedenceRulesGraph.h:523
concurrency::ControlFlowNode::accept
virtual bool accept(IGraphVisitor &visitor)=0
Visitor entry point.
precedence::EntityState::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:252
concurrency::AlgorithmNode::m_parents
std::vector< DecisionNode * > m_parents
Control flow parents of an AlgorithmNode (DecisionNodes)
Definition: PrecedenceRulesGraph.h:532
precedence::EndTime::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Definition: PrecedenceRulesGraph.h:332
ConditionsStallTest.condSvc
condSvc
Definition: ConditionsStallTest.py:77
concurrency::DataNode::m_producers
std::vector< AlgorithmNode * > m_producers
Definition: PrecedenceRulesGraph.h:587
precedence::DecisionHubProps::DecisionHubProps
DecisionHubProps(const std::string &name, uint nodeIndex, concurrency::Concurrent modeConcurrent, concurrency::PromptDecision modePromptDecision, concurrency::ModeOr modeOR, concurrency::AllPass allPass, concurrency::Inverted isInverted)
Definition: PrecedenceRulesGraph.h:86
concurrency::PrecedenceRulesGraph::printState
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.cpp:260
std::string
STL class.
concurrency::PrecedenceRulesGraph::dumpPrecTrace
void dumpPrecTrace(const boost::filesystem::path &, const EventSlot &slot)
dump to file the precedence trace
Definition: PrecedenceRulesGraph.cpp:666
concurrency::PrecedenceRulesGraph::addDataNode
StatusCode addDataNode(const DataObjID &dataPath)
Add DataNode that represents DataObject.
Definition: PrecedenceRulesGraph.cpp:421
concurrency::ControlFlowNode::printState
virtual void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const =0
Print a string representing the control flow state.
Gaudi.Configuration.log
log
Definition: Configuration.py:28
concurrency::PrecedenceRulesGraph::accept
void accept(IGraphVisitor &visitor) const
An entry point to visit all graph nodes.
Definition: PrecedenceRulesGraph.cpp:538
precedence::DataProps::m_id
DataObjID m_id
Definition: PrecedenceRulesGraph.h:116
precedence::DecisionHubProps::m_modeConcurrent
bool m_modeConcurrent
Whether all daughters will be evaluated concurrently or sequentially.
Definition: PrecedenceRulesGraph.h:101
precedence::AlgoProps::AlgoProps
AlgoProps()
Definition: PrecedenceRulesGraph.h:67
AtlasMCRecoFullPrecedenceDump.path
path
Definition: AtlasMCRecoFullPrecedenceDump.py:49
precedence::Duration::operator()
std::string operator()(const DecisionHubProps &) const
Definition: PrecedenceRulesGraph.h:365
precedence::AlgoProps::m_algoIndex
int m_algoIndex
Definition: PrecedenceRulesGraph.h:77
precedence::Operations::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:380
concurrency::AlgorithmNode::getInputDataNodes
const std::vector< DataNode * > & getInputDataNodes() const
Get all consumer nodes.
Definition: PrecedenceRulesGraph.h:510
concurrency::PrecedenceRulesGraph::getControlFlowNodeCounter
unsigned int getControlFlowNodeCounter() const
Get total number of control flow graph nodes.
Definition: PrecedenceRulesGraph.h:659
precedence::EntityState::m_conditionsEnabled
bool m_conditionsEnabled
Definition: PrecedenceRulesGraph.h:253
precedence::CondDataProps::CondDataProps
CondDataProps(const DataObjID &id)
Definition: PrecedenceRulesGraph.h:120
concurrency::DataNode::m_consumers
std::vector< AlgorithmNode * > m_consumers
Definition: PrecedenceRulesGraph.h:588
precedence::AlgoTraceProps::m_runtime
long int m_runtime
Definition: PrecedenceRulesGraph.h:57
std::vector
STL class.
TimelineEvent::start
time_point start
Definition: ITimelineSvc.h:33
std::find
T find(T... args)
concurrency::AlgorithmNode::setRank
void setRank(float rank)
Set Algorithm rank.
Definition: PrecedenceRulesGraph.h:513
check_ParticleID.props
props
Definition: check_ParticleID.py:21
concurrency::PrecedenceRulesGraph::m_name
const std::string m_name
Definition: PrecedenceRulesGraph.h:709
precedence::DecisionNegation::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:168
EventSlot
Class representing an event slot.
Definition: EventSlot.h:24
concurrency::DecisionNode::m_modeOR
bool m_modeOR
Whether acting as "and" (false) or "or" node (true)
Definition: PrecedenceRulesGraph.h:470
concurrency::PrecedenceRulesGraph
Definition: PrecedenceRulesGraph.h:620
concurrency::ControlFlowNode::name
const std::string & name() const
Get node name.
Definition: PrecedenceRulesGraph.h:429
precedence::StartTime
Definition: PrecedenceRulesGraph.h:256
concurrency::PrecedenceRulesGraph::m_decisionNameToDecisionHubMap
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.
Definition: PrecedenceRulesGraph.h:695
concurrency::PrecedenceRulesGraph::dumpPrecRules
void dumpPrecRules(const boost::filesystem::path &, const EventSlot &slot)
dump to file the precedence rules
Definition: PrecedenceRulesGraph.cpp:625
concurrency::DecisionNode::m_children
std::vector< ControlFlowNode * > m_children
All direct daughter nodes in the tree.
Definition: PrecedenceRulesGraph.h:476
std::stringstream
STL class.
concurrency::AlgorithmNode::m_outputs
std::vector< DataNode * > m_outputs
Algorithm outputs (DataNodes)
Definition: PrecedenceRulesGraph.h:547
precedence::Duration::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Definition: PrecedenceRulesGraph.h:370
precedence::EndTime::EndTime
EndTime(const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator)
Definition: PrecedenceRulesGraph.h:297
precedence::DecisionNegation::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:164
concurrency::PrecedenceRulesGraph::m_enableAnalysis
bool m_enableAnalysis
Definition: PrecedenceRulesGraph.h:714
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:25
concurrency::AlgorithmNode::getOutputDataNodes
const std::vector< DataNode * > & getOutputDataNodes() const
Get all supplier nodes.
Definition: PrecedenceRulesGraph.h:508
concurrency::AlgorithmNode::m_algoName
std::string m_algoName
The name of the algorithm.
Definition: PrecedenceRulesGraph.h:540
IHiveWhiteBoard
Definition: IHiveWhiteBoard.h:27
precedence::DecisionHubProps::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:97
concurrency::AlgorithmNode::m_algoIndex
unsigned int m_algoIndex
The index of the algorithm.
Definition: PrecedenceRulesGraph.h:538
concurrency::DecisionNode::m_modePromptDecision
bool m_modePromptDecision
Whether to evaluate the hub decision ASA its child decisions allow to do that.
Definition: PrecedenceRulesGraph.h:468
concurrency::CompareNodes::operator()
bool operator()(const T &a, const T &b) const
Definition: PrecedenceRulesGraph.h:617
precedence::EntityState::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: PrecedenceRulesGraph.h:251
precedence::AlgoProps::m_nodeIndex
int m_nodeIndex
Definition: PrecedenceRulesGraph.h:76
precedence::AlgoProps::m_isAsynchronous
bool m_isAsynchronous
If an algorithm is asynchronous.
Definition: PrecedenceRulesGraph.h:82
precedence::Duration
Definition: PrecedenceRulesGraph.h:335
precedence::EntityState::operator()
std::string operator()(const DecisionHubProps &) const
Definition: PrecedenceRulesGraph.h:228
precedence::PRGraph
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, VariantVertexProps > PRGraph
Definition: PrecedenceRulesGraph.h:391
concurrency::ConditionNode::accept
bool accept(IGraphVisitor &visitor) override
Need to hide the (identical) base method with this one so that visitEnter(ConditionNode&) and visit(C...
Definition: PrecedenceRulesGraph.h:600
precedence::Operations
Definition: PrecedenceRulesGraph.h:373
precedence::EndTime
Definition: PrecedenceRulesGraph.h:296
concurrency::DecisionNode::addParentNode
void addParentNode(DecisionNode *node)
Add a parent node.
Definition: PrecedenceRulesGraph.cpp:41
precedence::AlgoTraceProps::m_index
int m_index
Definition: PrecedenceRulesGraph.h:55
concurrency::PrecedenceRulesGraph::initialize
StatusCode initialize()
Initialize graph.
Definition: PrecedenceRulesGraph.cpp:220
gaudirun.output
output
Definition: gaudirun.py:521
concurrency::ControlFlowNode::m_nodeIndex
unsigned int m_nodeIndex
Definition: PrecedenceRulesGraph.h:435
concurrency::DataNode::m_graph
PrecedenceRulesGraph * m_graph
Definition: PrecedenceRulesGraph.h:583
concurrency::AlgorithmNode::getParentDecisionHubs
const std::vector< DecisionNode * > & getParentDecisionHubs() const
Get all parent decision hubs.
Definition: PrecedenceRulesGraph.h:501
GaudiPartProp.tests.id
id
Definition: tests.py:111
concurrency::DataNode::name
const DataObjID & name() const
Definition: PrecedenceRulesGraph.h:561
precedence::AllPass::operator()
std::string operator()(const AlgoProps &) const
Definition: PrecedenceRulesGraph.h:172
IOTest.start
start
Definition: IOTest.py:110
concurrency::IGraphVisitor
Definition: IGraphVisitor.h:21
concurrency::DecisionNode::addDaughterNode
void addDaughterNode(ControlFlowNode *node)
Add a daughter node.
Definition: PrecedenceRulesGraph.cpp:47
precedence::VertexName::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:126
concurrency::AlgorithmNode::printState
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.cpp:77
precedence::Duration::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:369
precedence::GroupMode::operator()
std::string operator()(const AlgoProps &) const
Definition: PrecedenceRulesGraph.h:134
TimelineEvent::event
size_t event
Definition: ITimelineSvc.h:29
precedence::DecisionHubProps::m_nodeIndex
uint m_nodeIndex
Definition: PrecedenceRulesGraph.h:98
concurrency::AlgorithmNode::getAlgoIndex
unsigned int getAlgoIndex() const
Get algorithm index.
Definition: PrecedenceRulesGraph.h:520
concurrency::AlgorithmNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:191
precedence::Duration::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:347
AvalancheSchedulerErrorTest.msgSvc
msgSvc
Definition: AvalancheSchedulerErrorTest.py:80
precedence::EndTime::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:308
concurrency::AlgorithmNode
Definition: PrecedenceRulesGraph.h:484
precedence::CFDecision
Definition: PrecedenceRulesGraph.h:179
TimelineEvent::slot
size_t slot
Definition: ITimelineSvc.h:28
precedence::AllPass::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:174
concurrency::AlgorithmNode::AlgorithmNode
AlgorithmNode(PrecedenceRulesGraph &graph, Gaudi::Algorithm *algoPtr, unsigned int nodeIndex, unsigned int algoIndex)
Constructor.
Definition: PrecedenceRulesGraph.h:487
precedence::PRVertexDesc
boost::graph_traits< PRGraph >::vertex_descriptor PRVertexDesc
Definition: PrecedenceRulesGraph.h:392
concurrency::PrecedenceRulesGraph::m_headNode
DecisionNode * m_headNode
the head node of the control flow graph
Definition: PrecedenceRulesGraph.h:691
precedence::AlgoTraceProps::m_eccentricity
int m_eccentricity
Definition: PrecedenceRulesGraph.h:59
TimelineEvent
Definition: ITimelineSvc.h:23
concurrency::DecisionNode::printState
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.cpp:53
precedence::CondDataProps
Definition: PrecedenceRulesGraph.h:119
precedence::EndTime::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:329
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
precedence::AlgoTraceProps::AlgoTraceProps
AlgoTraceProps(const std::string &name, int index=-1, int rank=-1, long int runtime=-1, long long int start=-1)
Definition: PrecedenceRulesGraph.h:51
concurrency::ConditionNode
Definition: PrecedenceRulesGraph.h:591
precedence::StartTime::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Definition: PrecedenceRulesGraph.h:293
concurrency::ControlFlowNode::~ControlFlowNode
virtual ~ControlFlowNode()=default
Destructor.
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:72
CommonMessaging< IPrecedenceRulesGraph >::setUpMessaging
MSG::Level setUpMessaging() const
Set up local caches.
Definition: CommonMessaging.h:174
plotSpeedupsPyRoot.graph
graph
Definition: plotSpeedupsPyRoot.py:168
StatusCode
Definition: StatusCode.h:65
Gaudi::tagged_bool_ns::tagged_bool
Definition: TaggedBool.h:16
TaggedBool.h
ITimelineSvc
Definition: ITimelineSvc.h:37
concurrency::AlgorithmNode::addInputDataNode
void addInputDataNode(DataNode *node)
Associate an AlgorithmNode, which is a data consumer of this one.
Definition: PrecedenceRulesGraph.cpp:214
std::vector::at
T at(T... args)
concurrency::PrecedenceRulesGraph::m_dataPathToDataNodeMap
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.
Definition: PrecedenceRulesGraph.h:697
IGraphVisitor.h
precedence::AlgoProps::m_rank
int m_rank
Definition: PrecedenceRulesGraph.h:78
Gaudi::Parsers::operator<<
std::ostream & operator<<(std::ostream &o, const Catalog &c)
printout operator
Definition: Catalog.h:68
std::ostream
STL class.
ICondSvc
Definition: ICondSvc.h:39
concurrency::DataNode::~DataNode
virtual ~DataNode()=default
Destructor.
CommonMessaging
Definition: CommonMessaging.h:66
EventContext::slot
ContextID_t slot() const
Definition: EventContext.h:51
Cause::m_source
source m_source
Definition: PrecedenceRulesGraph.h:399
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
precedence::GroupMode
Definition: PrecedenceRulesGraph.h:133
concurrency::IGraphVisitor::visit
virtual bool visit(DecisionNode &)
Definition: IGraphVisitor.h:26
concurrency::PrecedenceRulesGraph::name
const std::string & name() const override
Retrieve name of the service.
Definition: PrecedenceRulesGraph.h:665
precedence::DataProps::DataProps
DataProps(const DataObjID &id)
Definition: PrecedenceRulesGraph.h:114
precedence::GroupLogic::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:146
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:98
concurrency::IPrecedenceRulesGraph::~IPrecedenceRulesGraph
virtual ~IPrecedenceRulesGraph()=default
concurrency::DecisionNode::m_modeConcurrent
bool m_modeConcurrent
Whether all daughters will be evaluated concurrently or sequentially.
Definition: PrecedenceRulesGraph.h:465
precedence::GroupExit::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:154
std::to_string
T to_string(T... args)
precedence::DataProps
Definition: PrecedenceRulesGraph.h:113
concurrency::PrecedenceRulesGraph::m_prec_trace_map
std::map< std::string, precedence::AlgoTraceVertex > m_prec_trace_map
Definition: PrecedenceRulesGraph.h:713
precedence::PrecTrace
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps > PrecTrace
Definition: PrecedenceRulesGraph.h:62
concurrency::PrecedenceRulesGraph::m_nodeCounter
unsigned int m_nodeCounter
Total number of nodes in the graph.
Definition: PrecedenceRulesGraph.h:703
precedence::CFDecision::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:182
concurrency::PrecedenceRulesGraph::getDataNode
DataNode * getDataNode(const DataObjID &dataPath) const
Get DataNode by DataObject path using graph index.
Definition: PrecedenceRulesGraph.h:637
precedence::CFDecision::CFDecision
CFDecision(const EventSlot &slot)
Definition: PrecedenceRulesGraph.h:180
precedence::AllPass::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:176
precedence::GroupExit::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:158
precedence::DecisionNegation::operator()
std::string operator()(const AlgoProps &) const
Definition: PrecedenceRulesGraph.h:162
Cause::source
source
Definition: PrecedenceRulesGraph.h:397
concurrency::PrecedenceRulesGraph::PrecedenceRulesGraph
PrecedenceRulesGraph(const std::string &name, SmartIF< ISvcLocator > svc)
Constructor.
Definition: PrecedenceRulesGraph.h:623
Algorithm.h
concurrency::PrecedenceRulesGraph::rankAlgorithms
void rankAlgorithms(IGraphVisitor &ranker) const
Rank Algorithm nodes by the number of data outputs.
Definition: PrecedenceRulesGraph.cpp:550
concurrency::DataNode::accept
virtual bool accept(IGraphVisitor &visitor)
Entry point for a visitor.
Definition: PrecedenceRulesGraph.h:564
precedence::DecisionNegation
Definition: PrecedenceRulesGraph.h:161
SmartIF< ISvcLocator >
precedence::VertexName::operator()
std::string operator()(const DataProps &props) const
Definition: PrecedenceRulesGraph.h:130
precedence::VertexName
Definition: PrecedenceRulesGraph.h:125
CommonMessaging.h
IHiveWhiteBoard.h
precedence::DecisionHubProps::m_modeOR
bool m_modeOR
Whether acting as "and" (false) or "or" node (true)
Definition: PrecedenceRulesGraph.h:108
concurrency::PrecedenceRulesGraph::addDecisionHubNode
StatusCode addDecisionHubNode(Gaudi::Algorithm *daughterAlgo, const std::string &parentName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted)
Add a node, which aggregates decisions of direct daughter nodes.
Definition: PrecedenceRulesGraph.cpp:451
precedence::Duration::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:367
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
concurrency::DecisionNode::getDaughters
const std::vector< ControlFlowNode * > & getDaughters() const
Get children nodes.
Definition: PrecedenceRulesGraph.h:459
std::map< std::string, precedence::AlgoTraceVertex >
precedence::AlgoTraceProps::m_rank
int m_rank
Definition: PrecedenceRulesGraph.h:56
Cause::source::Root
@ Root
concurrency::DecisionNode::m_inverted
bool m_inverted
Whether the selection result is negated or not.
Definition: PrecedenceRulesGraph.h:474
concurrency::ControlFlowNode::ControlFlowNode
ControlFlowNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name)
Constructor.
Definition: PrecedenceRulesGraph.h:417
concurrency::PrecedenceRulesGraph::dumpControlFlow
std::string dumpControlFlow() const
Print out control flow of Algorithms and Sequences.
Definition: PrecedenceRulesGraph.cpp:560
MsgStream
Definition: MsgStream.h:33
precedence::AlgoTraceProps
Definition: PrecedenceRulesGraph.h:49
plotSpeedupsPyRoot.time
time
Definition: plotSpeedupsPyRoot.py:180
concurrency::AlgorithmNode::getRank
float getRank() const
Get Algorithm rank.
Definition: PrecedenceRulesGraph.h:515
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoNodeMap
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
Definition: PrecedenceRulesGraph.h:693
concurrency::PrecedenceRulesGraph::m_algoCounter
unsigned int m_algoCounter
Total number of algorithm nodes in the graph.
Definition: PrecedenceRulesGraph.h:705
precedence::AlgoTraceProps::AlgoTraceProps
AlgoTraceProps()
Definition: PrecedenceRulesGraph.h:50
precedence::VariantVertexProps
std::variant< AlgoProps, DecisionHubProps, DataProps, CondDataProps > VariantVertexProps
Definition: PrecedenceRulesGraph.h:390
DataObjID
Definition: DataObjID.h:47
precedence::EndTime::operator()
std::string operator()(const DecisionHubProps &) const
Definition: PrecedenceRulesGraph.h:327
concurrency::DataNode::DataNode
DataNode(PrecedenceRulesGraph &graph, const DataObjID &path)
Constructor.
Definition: PrecedenceRulesGraph.h:556
precedence::Duration::Duration
Duration(const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator)
Definition: PrecedenceRulesGraph.h:336
concurrency
Definition: PrecedenceRulesGraph.cpp:38
precedence::VertexName::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:128
concurrency::PrecedenceRulesGraph::m_conditionsRealmEnabled
bool m_conditionsRealmEnabled
Enable conditions realm of precedence rules.
Definition: PrecedenceRulesGraph.h:719
precedence::AlgoProps
Definition: PrecedenceRulesGraph.h:66
concurrency::DataNode::getConsumers
const std::vector< AlgorithmNode * > & getConsumers() const
Get all data object consumers.
Definition: PrecedenceRulesGraph.h:580
concurrency::IGraphVisitor::visitEnter
virtual bool visitEnter(DecisionNode &) const
Definition: IGraphVisitor.h:25
precedence::EntityState::operator()
std::string operator()(const CondDataProps &props) const
Definition: PrecedenceRulesGraph.h:240
concurrency::AlgorithmNode::m_algorithm
Gaudi::Algorithm * m_algorithm
Algorithm representative behind the AlgorithmNode.
Definition: PrecedenceRulesGraph.h:536
concurrency::DecisionNode
Definition: PrecedenceRulesGraph.h:439
concurrency::PrecedenceRulesGraph::m_precTrace
precedence::PrecTrace m_precTrace
facilities for algorithm precedence tracing
Definition: PrecedenceRulesGraph.h:712
concurrency::DataNode::addProducerNode
void addProducerNode(AlgorithmNode *node)
Add relationship to producer AlgorithmNode.
Definition: PrecedenceRulesGraph.h:568
std::ostringstream
STL class.
precedence::EntityState::EntityState
EntityState(const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator, bool conditionsEnabled)
Definition: PrecedenceRulesGraph.h:196
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoInputsMap
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoInputsMap
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition: PrecedenceRulesGraph.h:699
concurrency::AlgorithmNode::m_inputs
std::vector< DataNode * > m_inputs
Algorithm inputs (DataNodes)
Definition: PrecedenceRulesGraph.h:549
concurrency::ControlFlowNode::m_nodeName
std::string m_nodeName
Definition: PrecedenceRulesGraph.h:436
concurrency::DecisionNode::m_allPass
bool m_allPass
Whether always passing regardless of daughter results.
Definition: PrecedenceRulesGraph.h:472
concurrency::PrecedenceRulesGraph::getAlgorithmNode
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
Definition: PrecedenceRulesGraph.h:651
concurrency::PrecedenceRulesGraph::m_PRGraph
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
Definition: PrecedenceRulesGraph.h:716
precedence::EntityState::operator()
std::string operator()(const DataProps &props) const
Definition: PrecedenceRulesGraph.h:230
concurrency::PrecedenceRulesGraph::dumpDataFlow
std::string dumpDataFlow() const
Print out all data origins and destinations, as reflected in the EF graph.
Definition: PrecedenceRulesGraph.cpp:591
concurrency::PrecedenceRulesGraph::registerIODataObjects
void registerIODataObjects(const Gaudi::Algorithm *algo)
Register algorithm in the Data Dependency index.
Definition: PrecedenceRulesGraph.cpp:299
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
Cause::source::Task
@ Task
precedence::AlgoProps::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:75
DataObject.h
concurrency::DataNode::addConsumerNode
void addConsumerNode(AlgorithmNode *node)
Add relationship to consumer AlgorithmNode.
Definition: PrecedenceRulesGraph.h:573
precedence::DecisionHubProps::m_inverted
bool m_inverted
Whether the selection result is negated or not.
Definition: PrecedenceRulesGraph.h:106
precedence::StartTime::StartTime
StartTime(const EventSlot &slot, SmartIF< ISvcLocator > &svcLocator)
Definition: PrecedenceRulesGraph.h:257
precedence::AlgoTraceProps::m_start
long long int m_start
Definition: PrecedenceRulesGraph.h:58
precedence::GroupLogic
Definition: PrecedenceRulesGraph.h:143
concurrency::AlgorithmNode::m_isAsynchronous
bool m_isAsynchronous
If an algorithm is asynchronous.
Definition: PrecedenceRulesGraph.h:544
concurrency::ControlFlowNode
Definition: PrecedenceRulesGraph.h:414
concurrency::PrecedenceRulesGraph::m_algoNameToAlgoOutputsMap
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoOutputsMap
Definition: PrecedenceRulesGraph.h:700
precedence::DecisionHubProps
Definition: PrecedenceRulesGraph.h:85
concurrency::PrecedenceRulesGraph::addAlgorithmNode
StatusCode addAlgorithmNode(Gaudi::Algorithm *daughterAlgo, const std::string &parentName)
Add algorithm node.
Definition: PrecedenceRulesGraph.cpp:372
concurrency::IPrecedenceRulesGraph
Definition: PrecedenceRulesGraph.h:611
concurrency::PrecedenceRulesGraph::enableAnalysis
void enableAnalysis()
BGL-based facilities.
Definition: PrecedenceRulesGraph.h:673
precedence::GroupExit::operator()
std::string operator()(const AlgoProps &) const
Definition: PrecedenceRulesGraph.h:152
TimelineEvent::algorithm
std::string algorithm
Definition: ITimelineSvc.h:31
precedence::EntityState::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:222
concurrency::PrecedenceRulesGraph::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: PrecedenceRulesGraph.h:667
precedence::StartTime::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:269
Properties.v
v
Definition: Properties.py:122
precedence::StartTime::operator()
std::string operator()(const DecisionHubProps &) const
Definition: PrecedenceRulesGraph.h:288
std::ostringstream::str
T str(T... args)
concurrency::DataNode
Definition: PrecedenceRulesGraph.h:553
concurrency::CompareNodes
Definition: PrecedenceRulesGraph.h:616
precedence::EntityState
Definition: PrecedenceRulesGraph.h:195
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:87
precedence::GroupMode::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:136
precedence::AlgoTraceVertex
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
Definition: PrecedenceRulesGraph.h:63
precedence::StartTime::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:290
concurrency::DecisionNode::m_parents
std::vector< DecisionNode * > m_parents
Direct parent nodes.
Definition: PrecedenceRulesGraph.h:478
precedence::CFDecision::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:190
concurrency::DecisionNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:65
concurrency::AlgorithmNode::addOutputDataNode
void addOutputDataNode(DataNode *node)
Associate an AlgorithmNode, which is a data supplier for this one.
Definition: PrecedenceRulesGraph.cpp:208
precedence::AlgoTraceProps::m_name
std::string m_name
Definition: PrecedenceRulesGraph.h:54
precedence::AllPass
Definition: PrecedenceRulesGraph.h:171
concurrency::ConditionNode::m_condSvc
SmartIF< ICondSvc > m_condSvc
Definition: PrecedenceRulesGraph.h:606
TimelineEvent::end
time_point end
Definition: ITimelineSvc.h:34
compareRootHistos.state
state
Definition: compareRootHistos.py:496
precedence::Operations::operator()
std::string operator()(const DecisionHubProps &) const
Definition: PrecedenceRulesGraph.h:378
concurrency::PrecedenceRulesGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: PrecedenceRulesGraph.h:647
concurrency::PrecedenceRulesGraph::node
PRVertexDesc node(const std::string &) const
Definition: PrecedenceRulesGraph.cpp:529
concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm
StatusCode buildDataDependenciesRealm()
Build data dependency realm WITH data object nodes participating.
Definition: PrecedenceRulesGraph.cpp:318
precedence::GroupExit
Definition: PrecedenceRulesGraph.h:151
concurrency::ConditionNode::ConditionNode
ConditionNode(PrecedenceRulesGraph &graph, const DataObjID &path, SmartIF< ICondSvc > condSvc)
Constructor.
Definition: PrecedenceRulesGraph.h:594
precedence::CFDecision::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:192
precedence::Operations::operator()
std::string operator()(const AlgoProps &props) const
Definition: PrecedenceRulesGraph.h:374
precedence::GroupLogic::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:148
concurrency::PrecedenceRulesGraph::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)
Definition: PrecedenceRulesGraph.h:708
concurrency::DataNode::m_data_object_path
DataObjID m_data_object_path
Definition: PrecedenceRulesGraph.h:586
precedence::EntityState::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:249
precedence::DecisionHubProps::m_allPass
bool m_allPass
Whether always passing regardless of daughter results.
Definition: PrecedenceRulesGraph.h:110
concurrency::PrecedenceRulesGraph::addHeadNode
void addHeadNode(const std::string &headName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted)
Add a node, which has no parents.
Definition: PrecedenceRulesGraph.cpp:504
precedence::CFDecision::operator()
std::string operator()(const DecisionHubProps &props) const
Definition: PrecedenceRulesGraph.h:186
concurrency::ControlFlowNode::m_graph
PrecedenceRulesGraph * m_graph
Definition: PrecedenceRulesGraph.h:432
precedence::GroupMode::operator()
std::string operator()(const DataProps &) const
Definition: PrecedenceRulesGraph.h:140
std::unordered_map
STL class.
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:85
precedence::StartTime::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:292
concurrency::AlgorithmNode::isAsynchronous
bool isAsynchronous() const
Check if algorithm is asynchronous.
Definition: PrecedenceRulesGraph.h:525
Cause
Definition: PrecedenceRulesGraph.h:396
DataObjID_Hasher
Definition: DataObjID.h:114
concurrency::DecisionNode::DecisionNode
DecisionNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name, Concurrent modeConcurrent, PromptDecision modePromptDecision, ModeOr modeOR, AllPass allPass, Inverted isInverted)
Constructor.
Definition: PrecedenceRulesGraph.h:442
precedence::EndTime::m_slot
const EventSlot & m_slot
Definition: PrecedenceRulesGraph.h:331
precedence::DecisionHubProps::m_modePromptDecision
bool m_modePromptDecision
Whether to evaluate the hub decision ASA its child decisions allow to do that.
Definition: PrecedenceRulesGraph.h:104
concurrency::DataNode::getProducers
const std::vector< AlgorithmNode * > & getProducers() const
Get all data object producers.
Definition: PrecedenceRulesGraph.h:578
EventContext::evt
ContextEvt_t evt() const
Definition: EventContext.h:50
ICondSvc.h
concurrency::AlgorithmNode::getAlgorithm
Gaudi::Algorithm * getAlgorithm() const
get Algorithm representatives
Definition: PrecedenceRulesGraph.h:518
concurrency::ControlFlowNode::getNodeIndex
const unsigned int & getNodeIndex() const
Get node index.
Definition: PrecedenceRulesGraph.h:427
Gaudi::ParticleProperties::index
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...
Definition: IParticlePropertySvc.cpp:39
precedence::GroupLogic::operator()
std::string operator()(const AlgoProps &) const
Definition: PrecedenceRulesGraph.h:144
concurrency::AlgorithmNode::addParentNode
void addParentNode(DecisionNode *node)
Add a parent node.
Definition: PrecedenceRulesGraph.cpp:202
Cause::m_sourceName
std::string m_sourceName
Definition: PrecedenceRulesGraph.h:400
precedence::AlgoProps::AlgoProps
AlgoProps(Gaudi::Algorithm *algo, uint nodeIndex, uint algoIndex)
Definition: PrecedenceRulesGraph.h:68
concurrency::PrecedenceRulesGraph::addEdgeToPrecTrace
void addEdgeToPrecTrace(const AlgorithmNode *u, const AlgorithmNode *v)
set cause-effect connection between two algorithms in the precedence trace
Definition: PrecedenceRulesGraph.cpp:719
precedence::AlgoProps::m_algorithm
Gaudi::Algorithm * m_algorithm
Algorithm representative behind the AlgorithmNode.
Definition: PrecedenceRulesGraph.h:80