The Gaudi Framework  v33r2 (a6f0ec87)
concurrency::PrecedenceRulesGraph Class Reference

#include <src/PRGraph/PrecedenceRulesGraph.h>

Inheritance diagram for concurrency::PrecedenceRulesGraph:
Collaboration diagram for concurrency::PrecedenceRulesGraph:

Public Member Functions

 PrecedenceRulesGraph (const std::string &name, SmartIF< ISvcLocator > svc)
 Constructor. More...
 
StatusCode initialize ()
 Initialize graph. More...
 
void accept (IGraphVisitor &visitor) const
 An entry point to visit all graph nodes. More...
 
StatusCode addDataNode (const DataObjID &dataPath)
 Add DataNode that represents DataObject. More...
 
DataNodegetDataNode (const DataObjID &dataPath) const
 Get DataNode by DataObject path using graph index. More...
 
void registerIODataObjects (const Gaudi::Algorithm *algo)
 Register algorithm in the Data Dependency index. More...
 
StatusCode buildDataDependenciesRealm ()
 Build data dependency realm WITH data object nodes participating. More...
 
void addHeadNode (const std::string &headName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted)
 Add a node, which has no parents. More...
 
DecisionNodegetHeadNode () const
 Get head node. More...
 
StatusCode addAlgorithmNode (Gaudi::Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass)
 Add algorithm node. More...
 
AlgorithmNodegetAlgorithmNode (const std::string &algoName) const
 Get the AlgorithmNode from by algorithm name using graph index. More...
 
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. More...
 
unsigned int getControlFlowNodeCounter () const
 Get total number of control flow graph nodes. More...
 
void rankAlgorithms (IGraphVisitor &ranker) const
 Rank Algorithm nodes by the number of data outputs. More...
 
const std::stringname () const override
 Retrieve name of the service. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
void printState (std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const
 Print a string representing the control flow state. More...
 
void enableAnalysis ()
 BGL-based facilities. More...
 
PRVertexDesc node (const std::string &) const
 
std::string dumpDataFlow () const
 Print out all data origins and destinations, as reflected in the EF graph. More...
 
std::string dumpControlFlow () const
 Print out control flow of Algorithms and Sequences. More...
 
void dumpPrecRules (const boost::filesystem::path &, const EventSlot &slot)
 dump to file the precedence rules More...
 
void dumpPrecTrace (const boost::filesystem::path &)
 dump to file the precedence trace More...
 
void addEdgeToPrecTrace (const AlgorithmNode *u, const AlgorithmNode *v)
 set cause-effect connection between two algorithms in the precedence trace More...
 
void dumpControlFlow (std::ostringstream &, ControlFlowNode *, const int &) const
 
- Public Member Functions inherited from CommonMessaging< IPrecedenceRulesGraph >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 

Private Attributes

DecisionNodem_headNode = nullptr
 the head node of the control flow graph More...
 
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
 Index: map of algorithm's name to AlgorithmNode. More...
 
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
 Index: map of decision's name to DecisionHub. More...
 
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasherm_dataPathToDataNodeMap
 Index: map of data path to DataNode. More...
 
std::unordered_map< std::string, DataObjIDCollm_algoNameToAlgoInputsMap
 Indexes: maps of algorithm's name to algorithm's inputs/outputs. More...
 
std::unordered_map< std::string, DataObjIDCollm_algoNameToAlgoOutputsMap
 
unsigned int m_nodeCounter = 0
 Total number of nodes in the graph. More...
 
unsigned int m_algoCounter = 0
 Total number of algorithm nodes in the graph. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Service locator (needed to access the MessageSvc) More...
 
const std::string m_name
 
precedence::PrecTrace m_precTrace
 facilities for algorithm precedence tracing More...
 
std::map< std::string, precedence::AlgoTraceVertexm_prec_trace_map
 
bool m_enableAnalysis {false}
 
precedence::PRGraph m_PRGraph
 BGL-based graph of precedence rules. More...
 
bool m_conditionsRealmEnabled {false}
 Enable conditions realm of precedence rules. More...
 

Additional Inherited Members

- Public Types inherited from CommonMessaging< IPrecedenceRulesGraph >
using base_class = CommonMessaging
 
- Protected Member Functions inherited from CommonMessaging< IPrecedenceRulesGraph >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Detailed Description

Definition at line 632 of file PrecedenceRulesGraph.h.

Constructor & Destructor Documentation

◆ PrecedenceRulesGraph()

concurrency::PrecedenceRulesGraph::PrecedenceRulesGraph ( const std::string name,
SmartIF< ISvcLocator svc 
)
inline

Constructor.

Definition at line 635 of file PrecedenceRulesGraph.h.

635  : m_svcLocator( svc ), m_name( name ) {
636  // make sure that CommonMessaging is initialized
637  setUpMessaging();
638  }
MSG::Level setUpMessaging() const
Set up local caches.
const std::string & name() const override
Retrieve name of the service.
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)

Member Function Documentation

◆ accept()

void concurrency::PrecedenceRulesGraph::accept ( IGraphVisitor visitor) const

An entry point to visit all graph nodes.

Definition at line 533 of file PrecedenceRulesGraph.cpp.

533  {
534  // iterate through Algorithm nodes
535  for ( auto& pr : m_algoNameToAlgoNodeMap ) pr.second->accept( visitor );
536 
537  // iterate through DecisionHub nodes
538  for ( auto& pr : m_decisionNameToDecisionHubMap ) pr.second->accept( visitor );
539 
540  // iterate through Data [and Conditions] nodes
541  for ( auto& pr : m_dataPathToDataNodeMap ) pr.second->accept( visitor );
542  }
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.

◆ addAlgorithmNode()

StatusCode concurrency::PrecedenceRulesGraph::addAlgorithmNode ( Gaudi::Algorithm daughterAlgo,
const std::string parentName,
bool  inverted,
bool  allPass 
)

Add algorithm node.

Create new, or fetch existent, AlgorithmNode

Attach AlgorithmNode to its parent DecisionNode

Definition at line 363 of file PrecedenceRulesGraph.cpp.

364  {
365 
367 
369 
370  auto& algoName = algo->name();
371 
372  concurrency::AlgorithmNode* algoNode;
373 
374  auto itA = m_algoNameToAlgoNodeMap.find( algoName );
375  if ( itA != m_algoNameToAlgoNodeMap.end() ) {
376  algoNode = itA->second.get();
377  } else {
378  auto r = m_algoNameToAlgoNodeMap.emplace(
379  algoName, std::make_unique<concurrency::AlgorithmNode>( *this, algo, m_nodeCounter, m_algoCounter, inverted,
380  allPass ) );
381  algoNode = r.first->second.get();
382 
383  // Mirror AlgorithmNode in the BGL-based graph
384  if ( m_enableAnalysis ) {
385  boost::add_vertex( AlgoProps( algo, m_nodeCounter, m_algoCounter, inverted, allPass ), m_PRGraph );
386  }
387  ++m_nodeCounter;
388  ++m_algoCounter;
389  ON_VERBOSE verbose() << "AlgorithmNode '" << algoName << "' added @ " << algoNode << endmsg;
390 
391  registerIODataObjects( algo );
392  }
393 
395  auto itP = m_decisionNameToDecisionHubMap.find( parentName );
396  if ( itP != m_decisionNameToDecisionHubMap.end() ) {
397  auto parentNode = itP->second.get();
398 
399  parentNode->addDaughterNode( algoNode );
400  algoNode->addParentNode( parentNode );
401 
402  // Mirror algorithm to CF parent relationship in the BGL-based graph
403  if ( m_enableAnalysis ) boost::add_edge( node( algo->name() ), node( parentName ), m_PRGraph );
404 
405  ON_VERBOSE verbose() << "Attached AlgorithmNode '" << algo->name() << "' to parent DecisionNode '" << parentName
406  << "'" << endmsg;
407  } else {
408  sc = StatusCode::FAILURE;
409  error() << "Parent DecisionNode '" << parentName << "' was not found" << endmsg;
410  }
411 
412  return sc;
413  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
unsigned int m_algoCounter
Total number of algorithm nodes in the graph.
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
void registerIODataObjects(const Gaudi::Algorithm *algo)
Register algorithm in the Data Dependency index.
PRVertexDesc node(const std::string &) const
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.
unsigned int m_nodeCounter
Total number of nodes in the graph.
constexpr static const auto FAILURE
Definition: StatusCode.h:101
void addParentNode(DecisionNode *node)
Add a parent node.
#define ON_VERBOSE
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ addDataNode()

StatusCode concurrency::PrecedenceRulesGraph::addDataNode ( const DataObjID dataPath)

Add DataNode that represents DataObject.

Definition at line 416 of file PrecedenceRulesGraph.cpp.

416  {
417 
418  auto itD = m_dataPathToDataNodeMap.find( dataPath );
419  if ( itD != m_dataPathToDataNodeMap.end() ) return StatusCode::SUCCESS;
420 
422  if ( !m_conditionsRealmEnabled ) {
423  dataNode = std::make_unique<concurrency::DataNode>( *this, dataPath );
424  ON_VERBOSE verbose() << " DataNode " << dataPath << " added @ " << dataNode.get() << endmsg;
425  // Mirror the action above in the BGL-based graph
426  if ( m_enableAnalysis ) boost::add_vertex( DataProps( dataPath ), m_PRGraph );
427  } else {
428  SmartIF<ICondSvc> condSvc{serviceLocator()->service( "CondSvc", false )};
429  if ( condSvc->isRegistered( dataPath ) ) {
430  dataNode = std::make_unique<concurrency::ConditionNode>( *this, dataPath, condSvc );
431  ON_VERBOSE verbose() << " ConditionNode " << dataPath << " added @ " << dataNode.get() << endmsg;
432  // Mirror the action above in the BGL-based graph
433  if ( m_enableAnalysis ) boost::add_vertex( CondDataProps( dataPath ), m_PRGraph );
434  } else {
435  dataNode = std::make_unique<concurrency::DataNode>( *this, dataPath );
436  ON_VERBOSE verbose() << " DataNode " << dataPath << " added @ " << dataNode.get() << endmsg;
437  // Mirror the action above in the BGL-based graph
438  if ( m_enableAnalysis ) boost::add_vertex( DataProps( dataPath ), m_PRGraph );
439  }
440  }
441  m_dataPathToDataNodeMap.emplace( dataPath, std::move( dataNode ) );
442  return StatusCode::SUCCESS;
443  }
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:86
bool m_conditionsRealmEnabled
Enable conditions realm of precedence rules.
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
T move(T... args)
T get(T... args)
#define ON_VERBOSE
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ addDecisionHubNode()

StatusCode concurrency::PrecedenceRulesGraph::addDecisionHubNode ( Gaudi::Algorithm daughterAlgo,
const std::string parentName,
concurrency::Concurrent  modeConcurrent,
concurrency::PromptDecision  modePromptDecision,
concurrency::ModeOr  modeOR,
concurrency::AllPass  allPass,
concurrency::Inverted  isInverted 
)

Add a node, which aggregates decisions of direct daughter nodes.

Create new, or fetch existent, DecisionNode

Attach DecisionNode to its parent DecisionNode

Definition at line 446 of file PrecedenceRulesGraph.cpp.

448  {
449 
451 
453 
454  auto& decisionHubName = decisionHubAlgo->name();
455 
456  auto itA = m_decisionNameToDecisionHubMap.find( decisionHubName );
457  concurrency::DecisionNode* decisionHubNode;
458  if ( itA != m_decisionNameToDecisionHubMap.end() ) {
459  decisionHubNode = itA->second.get();
460  } else {
461  auto r = m_decisionNameToDecisionHubMap.emplace(
462  decisionHubName,
463  std::make_unique<concurrency::DecisionNode>( *this, m_nodeCounter, decisionHubName, modeConcurrent,
464  modePromptDecision, modeOR, allPass, isInverted ) );
465  decisionHubNode = r.first->second.get();
466  // Mirror DecisionNode in the BGL-based graph
467  if ( m_enableAnalysis ) {
468  boost::add_vertex( DecisionHubProps( decisionHubName, m_nodeCounter, modeConcurrent, modePromptDecision, modeOR,
469  allPass, isInverted ),
470  m_PRGraph );
471  }
472 
473  ++m_nodeCounter;
474 
475  ON_VERBOSE verbose() << "DecisionNode '" << decisionHubName << "' added @ " << decisionHubNode << endmsg;
476  }
477 
479  auto itP = m_decisionNameToDecisionHubMap.find( parentName );
480  if ( itP != m_decisionNameToDecisionHubMap.end() ) {
481  auto parentNode = itP->second.get();
482  parentNode->addDaughterNode( decisionHubNode );
483  decisionHubNode->addParentNode( parentNode );
484 
485  // Mirror DecisionNode-to-DecisionNode relationship in the BGL-based graph
486  if ( m_enableAnalysis ) boost::add_edge( node( decisionHubName ), node( parentName ), m_PRGraph );
487 
488  ON_VERBOSE verbose() << "Attached DecisionNode '" << decisionHubName << "' to parent DecisionNode '" << parentName
489  << "'" << endmsg;
490  } else {
491  sc = StatusCode::FAILURE;
492  error() << "Parent DecisionNode '" << parentName << "' was not found" << endmsg;
493  }
494 
495  return sc;
496  }
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
PRVertexDesc node(const std::string &) const
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.
void addParentNode(DecisionNode *node)
Add a parent node.
unsigned int m_nodeCounter
Total number of nodes in the graph.
constexpr static const auto FAILURE
Definition: StatusCode.h:101
#define ON_VERBOSE
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ addEdgeToPrecTrace()

void concurrency::PrecedenceRulesGraph::addEdgeToPrecTrace ( const AlgorithmNode u,
const AlgorithmNode v 
)

set cause-effect connection between two algorithms in the precedence trace

Definition at line 689 of file PrecedenceRulesGraph.cpp.

689  {
690 
691  std::string u_name = u == nullptr ? "ENTRY" : u->name();
692  std::string v_name = v->name();
693 
695 
696  if ( !u ) {
697  auto itT = m_prec_trace_map.find( "ENTRY" );
698  if ( itT != m_prec_trace_map.end() ) {
699  source = itT->second;
700  } else {
701  source = boost::add_vertex( precedence::AlgoTraceProps( "ENTRY", -1, -1, -1.0 ), m_precTrace );
702  m_prec_trace_map["ENTRY"] = source;
703  }
704  } else {
705  auto itS = m_prec_trace_map.find( u_name );
706  if ( itS != m_prec_trace_map.end() ) {
707  source = itS->second;
708  } else {
709 
710  source =
711  boost::add_vertex( precedence::AlgoTraceProps( u_name, u->getAlgoIndex(), u->getRank(), -1 ), m_precTrace );
712  m_prec_trace_map[u_name] = source;
713  }
714  }
715 
717 
718  auto itP = m_prec_trace_map.find( v_name );
719  if ( itP != m_prec_trace_map.end() ) {
720  target = itP->second;
721  } else {
722 
723  target =
724  boost::add_vertex( precedence::AlgoTraceProps( v_name, v->getAlgoIndex(), v->getRank(), -1 ), m_precTrace );
725  m_prec_trace_map[v_name] = target;
726  }
727 
728  boost::add_edge( source, target, m_precTrace );
729 
730  ON_DEBUG debug() << u_name << "-->" << v_name << " precedence trait added" << endmsg;
731  }
precedence::PrecTrace m_precTrace
facilities for algorithm precedence tracing
boost::graph_traits< PrecTrace >::vertex_descriptor AlgoTraceVertex
std::map< std::string, precedence::AlgoTraceVertex > m_prec_trace_map
T end(T... args)
#define ON_DEBUG
STL class.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
T find(T... args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ addHeadNode()

void concurrency::PrecedenceRulesGraph::addHeadNode ( const std::string headName,
concurrency::Concurrent  modeConcurrent,
concurrency::PromptDecision  modePromptDecision,
concurrency::ModeOr  modeOR,
concurrency::AllPass  allPass,
concurrency::Inverted  isInverted 
)

Add a node, which has no parents.

Definition at line 499 of file PrecedenceRulesGraph.cpp.

501  {
502 
503  auto itH = m_decisionNameToDecisionHubMap.find( headName );
504  if ( itH != m_decisionNameToDecisionHubMap.end() ) {
505  m_headNode = itH->second.get();
506  } else {
507  auto r = m_decisionNameToDecisionHubMap.emplace(
508  headName, std::make_unique<concurrency::DecisionNode>( *this, m_nodeCounter, headName, modeConcurrent,
509  modePromptDecision, modeOR, allPass, isInverted ) );
510  m_headNode = r.first->second.get();
511 
512  // Mirror the action above in the BGL-based graph
513  if ( m_enableAnalysis ) {
514  boost::add_vertex( DecisionHubProps( headName, m_nodeCounter, modeConcurrent, modePromptDecision, modeOR,
515  allPass, isInverted ),
516  m_PRGraph );
517  }
518 
519  ++m_nodeCounter;
520  }
521  }
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
DecisionNode * m_headNode
the head node of the control flow graph
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.
unsigned int m_nodeCounter
Total number of nodes in the graph.

◆ buildDataDependenciesRealm()

StatusCode concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm ( )

Build data dependency realm WITH data object nodes participating.

Definition at line 317 of file PrecedenceRulesGraph.cpp.

317  {
318 
319  StatusCode global_sc( StatusCode::SUCCESS, true );
320 
321  // Production of DataNodes by AlgorithmNodes (DataNodes are created here)
322  for ( auto& algo : m_algoNameToAlgoNodeMap ) {
323 
324  auto& outputs = m_algoNameToAlgoOutputsMap[algo.first];
325  for ( auto output : outputs ) {
326  const auto sc = addDataNode( output );
327  if ( !sc.isSuccess() ) {
328  error() << "Extra producer (" << algo.first << ") for DataObject @ " << output
329  << " has been detected: this is not allowed." << endmsg;
330  global_sc = sc;
331  }
332  auto dataNode = getDataNode( output );
333  dataNode->addProducerNode( algo.second.get() );
334  algo.second->addOutputDataNode( dataNode );
335 
336  // Mirror the action above in the BGL-based graph
337  if ( m_enableAnalysis ) boost::add_edge( node( algo.second->name() ), node( output.fullKey() ), m_PRGraph );
338  }
339  }
340 
341  // Consumption of DataNodes by AlgorithmNodes
342  for ( auto& algo : m_algoNameToAlgoNodeMap ) {
343 
344  for ( auto input : m_algoNameToAlgoInputsMap[algo.first] ) {
345 
346  auto itP = m_dataPathToDataNodeMap.find( input );
347 
348  DataNode* dataNode = ( itP != m_dataPathToDataNodeMap.end() ? getDataNode( input ) : nullptr );
349  if ( dataNode ) {
350  dataNode->addConsumerNode( algo.second.get() );
351  algo.second->addInputDataNode( dataNode );
352 
353  // Mirror the action above in the BGL-based graph
354  if ( m_enableAnalysis ) boost::add_edge( node( input.fullKey() ), node( algo.second->name() ), m_PRGraph );
355  }
356  }
357  }
358 
359  return global_sc;
360  }
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoInputsMap
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
StatusCode addDataNode(const DataObjID &dataPath)
Add DataNode that represents DataObject.
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoOutputsMap
PRVertexDesc node(const std::string &) const
DataNode * getDataNode(const DataObjID &dataPath) const
Get DataNode by DataObject path using graph index.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ dumpControlFlow() [1/2]

std::string concurrency::PrecedenceRulesGraph::dumpControlFlow ( ) const

Print out control flow of Algorithms and Sequences.

Definition at line 555 of file PrecedenceRulesGraph.cpp.

555  {
556  std::ostringstream ost;
557  dumpControlFlow( ost, m_headNode, 0 );
558  return ost.str();
559  }
DecisionNode * m_headNode
the head node of the control flow graph
std::string dumpControlFlow() const
Print out control flow of Algorithms and Sequences.
T str(T... args)

◆ dumpControlFlow() [2/2]

void concurrency::PrecedenceRulesGraph::dumpControlFlow ( std::ostringstream ost,
ControlFlowNode node,
const int &  indent 
) const

Definition at line 561 of file PrecedenceRulesGraph.cpp.

562  {
563  ost << std::string( indent * 2, ' ' );
564  DecisionNode* dn = dynamic_cast<DecisionNode*>( node );
565  AlgorithmNode* an = dynamic_cast<AlgorithmNode*>( node );
566  if ( dn != 0 ) {
567  if ( node != m_headNode ) {
568  ost << node->name() << " [Seq] ";
569  ost << ( ( dn->m_modeConcurrent ) ? " [Concurrent] " : " [Sequential] " );
570  ost << ( ( dn->m_modePromptDecision ) ? " [Prompt] " : "" );
571  ost << ( ( dn->m_modeOR ) ? " [OR] " : "" );
572  ost << ( ( dn->m_allPass ) ? " [PASS] " : "" );
573  ost << "\n";
574  }
575  for ( const auto& i : dn->getDaughters() ) dumpControlFlow( ost, i, indent + 1 );
576  } else if ( an != 0 ) {
577  ost << node->name() << " [Alg] ";
578  if ( an != 0 ) {
579  auto ar = an->getAlgorithm();
580  ost << " [n= " << ar->cardinality() << "]";
581  ost << ( ( !ar->isClonable() ) ? " [unclonable] " : "" );
582  }
583  ost << "\n";
584  }
585  }
STL class.
DecisionNode * m_headNode
the head node of the control flow graph
std::string dumpControlFlow() const
Print out control flow of Algorithms and Sequences.
PRVertexDesc node(const std::string &) const

◆ dumpDataFlow()

std::string concurrency::PrecedenceRulesGraph::dumpDataFlow ( ) const

Print out all data origins and destinations, as reflected in the EF graph.

Definition at line 588 of file PrecedenceRulesGraph.cpp.

588  {
589 
590  const char idt[] = " ";
591  std::ostringstream ost;
592 
593  ost << "\n" << idt << "====================================\n";
594  ost << idt << "Data origins and destinations:\n";
595  ost << idt << "====================================\n";
596 
597  for ( auto& pair : m_dataPathToDataNodeMap ) {
598 
599  for ( auto algoNode : pair.second->getProducers() ) ost << idt << " " << algoNode->name() << "\n";
600 
601  ost << idt << " V\n";
602  ost << idt << " o " << pair.first << "\n";
603  ost << idt << " V\n";
604 
605  for ( auto algoNode : pair.second->getConsumers() ) ost << idt << " " << algoNode->name() << "\n";
606 
607  ost << idt << "====================================\n";
608  }
609 
610  return ost.str();
611  }
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.
T str(T... args)

◆ dumpPrecRules()

void concurrency::PrecedenceRulesGraph::dumpPrecRules ( const boost::filesystem::path &  fileName,
const EventSlot slot 
)

dump to file the precedence rules

Definition at line 615 of file PrecedenceRulesGraph.cpp.

615  {
616  boost::filesystem::ofstream myfile;
617  myfile.open( fileName, std::ios::app );
618 
619  // Declare properties to dump
620  boost::dynamic_properties dp;
621 
622  dp.property( "Entity",
623  boost::make_transform_value_property_map(
624  []( const VariantVertexProps& v ) {
625  return std::visit( []( const auto& w ) { return boost::lexical_cast<std::string>( w ); }, v );
626  },
627  boost::get( boost::vertex_bundle, m_PRGraph ) ) );
628 
629  auto add_prop = [&]( auto name, auto&& vis ) {
630  dp.property( name, boost::make_transform_value_property_map(
631  [vis = std::forward<decltype( vis )>( vis )]( const VariantVertexProps& v ) {
632  return std::visit( vis, v );
633  },
634  boost::get( boost::vertex_bundle, m_PRGraph ) ) );
635  };
636 
637  add_prop( "Name", precedence::VertexName() );
638  add_prop( "Mode", precedence::GroupMode() );
639  add_prop( "Logic", precedence::GroupLogic() );
640  add_prop( "Decision Negation", precedence::DecisionNegation() );
641  add_prop( "Negative Decision Inversion", precedence::AllPass() );
642  add_prop( "Exit Policy", precedence::GroupExit() );
643  add_prop( "Operations", precedence::Operations() );
644  add_prop( "CF Decision", precedence::CFDecision( slot ) );
645  add_prop( "State", precedence::EntityState( slot, serviceLocator(), m_conditionsRealmEnabled ) );
646  add_prop( "Start Time (Epoch ns)", precedence::StartTime( slot, serviceLocator() ) );
647  add_prop( "End Time (Epoch ns)", precedence::EndTime( slot, serviceLocator() ) );
648  add_prop( "Runtime (ns)", precedence::Duration( slot, serviceLocator() ) );
649 
650  boost::write_graphml( myfile, m_PRGraph, dp );
651 
652  myfile.close();
653  }
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
bool m_conditionsRealmEnabled
Enable conditions realm of precedence rules.
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
const std::string & name() const override
Retrieve name of the service.
T forward(T... args)
std::variant< AlgoProps, DecisionHubProps, DataProps, CondDataProps > VariantVertexProps

◆ dumpPrecTrace()

void concurrency::PrecedenceRulesGraph::dumpPrecTrace ( const boost::filesystem::path &  fileName)

dump to file the precedence trace

Definition at line 656 of file PrecedenceRulesGraph.cpp.

656  {
657  boost::filesystem::ofstream myfile;
658  myfile.open( fileName, std::ios::app );
659 
660  // Fill runtimes (as this could not be done on the fly during trace assembling)
661  SmartIF<ITimelineSvc> timelineSvc = m_svcLocator->service<ITimelineSvc>( "TimelineSvc", false );
662  if ( !timelineSvc.isValid() ) {
663  warning() << "Failed to get the TimelineSvc, timing will not be added to "
664  << "the task precedence trace dump" << endmsg;
665  } else {
666 
667  for ( auto vp = vertices( m_precTrace ); vp.first != vp.second; ++vp.first ) {
668  TimelineEvent te{};
669  te.algorithm = m_precTrace[*vp.first].m_name;
670  timelineSvc->getTimelineEvent( te );
671  int runtime = std::chrono::duration_cast<std::chrono::microseconds>( te.end - te.start ).count();
672  m_precTrace[*vp.first].m_runtime = runtime;
673  }
674  }
675 
676  // Declare properties to dump
677  boost::dynamic_properties dp;
678  using boost::get;
680  dp.property( "Name", get( &AlgoTraceProps::m_name, m_precTrace ) );
681  dp.property( "Rank", get( &AlgoTraceProps::m_rank, m_precTrace ) );
682  dp.property( "Runtime", get( &AlgoTraceProps::m_runtime, m_precTrace ) );
683 
684  boost::write_graphml( myfile, m_precTrace, dp );
685 
686  myfile.close();
687  }
precedence::PrecTrace m_precTrace
facilities for algorithm precedence tracing
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:72
virtual bool getTimelineEvent(TimelineEvent &) const =0
std::string algorithm
Definition: ITimelineSvc.h:31
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:86
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)

◆ enableAnalysis()

void concurrency::PrecedenceRulesGraph::enableAnalysis ( )
inline

BGL-based facilities.

Definition at line 686 of file PrecedenceRulesGraph.h.

◆ getAlgorithmNode()

AlgorithmNode* concurrency::PrecedenceRulesGraph::getAlgorithmNode ( const std::string algoName) const
inline

Get the AlgorithmNode from by algorithm name using graph index.

Definition at line 664 of file PrecedenceRulesGraph.h.

664  {
665  return m_algoNameToAlgoNodeMap.at( algoName ).get();
666  }
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.

◆ getControlFlowNodeCounter()

unsigned int concurrency::PrecedenceRulesGraph::getControlFlowNodeCounter ( ) const
inline

Get total number of control flow graph nodes.

Definition at line 672 of file PrecedenceRulesGraph.h.

672 { return m_nodeCounter; }
unsigned int m_nodeCounter
Total number of nodes in the graph.

◆ getDataNode()

DataNode* concurrency::PrecedenceRulesGraph::getDataNode ( const DataObjID dataPath) const
inline

Get DataNode by DataObject path using graph index.

Definition at line 649 of file PrecedenceRulesGraph.h.

649 { return m_dataPathToDataNodeMap.at( dataPath ).get(); }
std::unordered_map< DataObjID, std::unique_ptr< DataNode >, DataObjID_Hasher > m_dataPathToDataNodeMap
Index: map of data path to DataNode.

◆ getHeadNode()

DecisionNode* concurrency::PrecedenceRulesGraph::getHeadNode ( ) const
inline

Get head node.

Definition at line 659 of file PrecedenceRulesGraph.h.

659 { return m_headNode; };
DecisionNode * m_headNode
the head node of the control flow graph

◆ initialize()

StatusCode concurrency::PrecedenceRulesGraph::initialize ( )

Initialize graph.

Definition at line 219 of file PrecedenceRulesGraph.cpp.

219  {
220  if ( serviceLocator()->existsService( "CondSvc" ) ) {
222  if ( condSvc.isValid() ) {
223  info() << "CondSvc found. DF precedence rules will be augmented with 'Conditions'" << endmsg;
225  }
226  }
227 
228  // Detach condition algorithms from the CF realm
229  if ( m_conditionsRealmEnabled ) {
230  SmartIF<ICondSvc> condSvc{serviceLocator()->service( "CondSvc", false )};
231  auto& condAlgs = condSvc->condAlgs();
232  for ( const auto algo : condAlgs ) {
233  auto itA = m_algoNameToAlgoNodeMap.find( algo->name() );
234  if ( itA != m_algoNameToAlgoNodeMap.end() ) {
235  concurrency::AlgorithmNode* algoNode = itA->second.get();
236  debug() << "Detaching condition algorithm '" << algo->name() << "' from the CF realm.." << endmsg;
237  for ( auto parent : algoNode->getParentDecisionHubs() ) {
238  parent->m_children.erase( std::remove( parent->m_children.begin(), parent->m_children.end(), algoNode ),
239  parent->m_children.end() );
240  // clean up also auxiliary BGL-based graph of precedence rules
241  if ( m_enableAnalysis ) boost::remove_edge( node( algoNode->name() ), node( parent->name() ), m_PRGraph );
242  }
243  algoNode->m_parents.clear();
244 
245  } else {
246  warning() << "Algorithm '" << algo->name() << "' is not registered in the graph" << endmsg;
247  }
248  }
249  }
250 
252 
253  if ( !sc.isSuccess() ) error() << "Could not build the data dependency realm." << endmsg;
254 
255  return sc;
256  }
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
const std::vector< DecisionNode * > & getParentDecisionHubs() const
Get all parent decision hubs.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
std::vector< DecisionNode * > m_parents
Control flow parents of an AlgorithmNode (DecisionNodes)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
T remove(T... args)
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:86
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
bool m_conditionsRealmEnabled
Enable conditions realm of precedence rules.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isSuccess() const
Definition: StatusCode.h:366
PRVertexDesc node(const std::string &) const
const Gaudi::Algorithm & parent
StatusCode buildDataDependenciesRealm()
Build data dependency realm WITH data object nodes participating.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
const std::string & name() const
Get node name.
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:549

◆ name()

const std::string& concurrency::PrecedenceRulesGraph::name ( ) const
inlineoverride

Retrieve name of the service.

Definition at line 678 of file PrecedenceRulesGraph.h.

678 { return m_name; }

◆ node()

PRVertexDesc concurrency::PrecedenceRulesGraph::node ( const std::string name) const

Definition at line 524 of file PrecedenceRulesGraph.cpp.

524  {
525  auto vp = vertices( m_PRGraph );
526  auto i = std::find_if( vp.first, vp.second, [&]( const PRVertexDesc& v ) {
527  return std::visit( precedence::VertexName(), m_PRGraph[v] ) == name;
528  } );
529  return i != vp.second ? *i : PRVertexDesc{};
530  }
boost::graph_traits< PRGraph >::vertex_descriptor PRVertexDesc
precedence::PRGraph m_PRGraph
BGL-based graph of precedence rules.
T find_if(T... args)

◆ printState()

void concurrency::PrecedenceRulesGraph::printState ( std::stringstream output,
EventSlot slot,
const unsigned int &  recursionLevel 
) const

Print a string representing the control flow state.

Definition at line 259 of file PrecedenceRulesGraph.cpp.

260  {
261  if ( slot.parentSlot ) {
262  // Start at sub-slot entry point
263  m_decisionNameToDecisionHubMap.at( slot.entryPoint )->printState( output, slot, recursionLevel );
264  } else {
265  // Start at the head node for whole-event slots
266  m_headNode->printState( output, slot, recursionLevel );
267  }
268 
269  // Find detached conditions algs in interesting states
270  if ( m_conditionsRealmEnabled ) {
271  bool firstPrint = true;
272  SmartIF<ICondSvc> condSvc{serviceLocator()->service( "CondSvc", false )};
273  auto& condAlgs = condSvc->condAlgs();
274  for ( const auto algo : condAlgs ) {
275  auto itA = m_algoNameToAlgoNodeMap.find( algo->name() );
276  if ( itA != m_algoNameToAlgoNodeMap.end() ) {
277 
278  concurrency::AlgorithmNode* algoNode = itA->second.get();
279 
280  // Ignore boring states (reduces verbosity)
281  auto& thisState = slot.algsStates[algoNode->getAlgoIndex()];
282  if ( thisState == AlgsExecutionStates::State::INITIAL ||
283  thisState == AlgsExecutionStates::State::EVTACCEPTED )
284  continue;
285 
286  // Make output
287  if ( firstPrint ) {
288  firstPrint = false;
289  output << std::endl << "Detached algorithms:" << std::endl;
290  }
291  algoNode->printState( output, slot, recursionLevel );
292  }
293  }
294  }
295  }
std::string entryPoint
Event Views bookkeeping (TODO: optimize view bookkeeping)
Definition: EventSlot.h:94
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
T endl(T... args)
const unsigned int & getAlgoIndex() const
Get algorithm index.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:86
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
bool m_conditionsRealmEnabled
Enable conditions realm of precedence rules.
DecisionNode * m_headNode
the head node of the control flow graph
std::unordered_map< std::string, std::unique_ptr< DecisionNode > > m_decisionNameToDecisionHubMap
Index: map of decision's name to DecisionHub.
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override
Print a string representing the control flow state.
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:96
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override
Print a string representing the control flow state.
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:85

◆ rankAlgorithms()

void concurrency::PrecedenceRulesGraph::rankAlgorithms ( IGraphVisitor ranker) const

Rank Algorithm nodes by the number of data outputs.

Definition at line 545 of file PrecedenceRulesGraph.cpp.

545  {
546 
547  info() << "Starting ranking by data outputs .. " << endmsg;
548  for ( auto& pair : m_algoNameToAlgoNodeMap ) {
549  ON_DEBUG debug() << " Ranking " << pair.first << "... " << endmsg;
550  pair.second->accept( ranker );
551  ON_DEBUG debug() << " ... rank of " << pair.first << ": " << pair.second->getRank() << endmsg;
552  }
553  }
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
#define ON_DEBUG
std::unordered_map< std::string, std::unique_ptr< AlgorithmNode > > m_algoNameToAlgoNodeMap
Index: map of algorithm's name to AlgorithmNode.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202

◆ registerIODataObjects()

void concurrency::PrecedenceRulesGraph::registerIODataObjects ( const Gaudi::Algorithm algo)

Register algorithm in the Data Dependency index.

Definition at line 298 of file PrecedenceRulesGraph.cpp.

298  {
299 
300  const std::string& algoName = algo->name();
301 
302  m_algoNameToAlgoInputsMap[algoName] = algo->inputDataObjs();
303  m_algoNameToAlgoOutputsMap[algoName] = algo->outputDataObjs();
304 
305  ON_VERBOSE {
306  verbose() << " Inputs of " << algoName << ": ";
307  for ( auto tag : algo->inputDataObjs() ) verbose() << tag << " | ";
308  verbose() << endmsg;
309 
310  verbose() << " Outputs of " << algoName << ": ";
311  for ( auto tag : algo->outputDataObjs() ) verbose() << tag << " | ";
312  verbose() << endmsg;
313  }
314  }
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoInputsMap
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
STL class.
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
std::unordered_map< std::string, DataObjIDColl > m_algoNameToAlgoOutputsMap
const DataObjIDColl & outputDataObjs() const override
#define ON_VERBOSE
const DataObjIDColl & inputDataObjs() const override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:549

◆ serviceLocator()

SmartIF<ISvcLocator>& concurrency::PrecedenceRulesGraph::serviceLocator ( ) const
inlineoverride

Retrieve pointer to service locator.

Definition at line 680 of file PrecedenceRulesGraph.h.

680 { return m_svcLocator; }
SmartIF< ISvcLocator > m_svcLocator
Service locator (needed to access the MessageSvc)

Member Data Documentation

◆ m_algoCounter

unsigned int concurrency::PrecedenceRulesGraph::m_algoCounter = 0
private

Total number of algorithm nodes in the graph.

Definition at line 718 of file PrecedenceRulesGraph.h.

◆ m_algoNameToAlgoInputsMap

std::unordered_map<std::string, DataObjIDColl> concurrency::PrecedenceRulesGraph::m_algoNameToAlgoInputsMap
private

Indexes: maps of algorithm's name to algorithm's inputs/outputs.

Definition at line 712 of file PrecedenceRulesGraph.h.

◆ m_algoNameToAlgoNodeMap

std::unordered_map<std::string, std::unique_ptr<AlgorithmNode> > concurrency::PrecedenceRulesGraph::m_algoNameToAlgoNodeMap
private

Index: map of algorithm's name to AlgorithmNode.

Definition at line 706 of file PrecedenceRulesGraph.h.

◆ m_algoNameToAlgoOutputsMap

std::unordered_map<std::string, DataObjIDColl> concurrency::PrecedenceRulesGraph::m_algoNameToAlgoOutputsMap
private

Definition at line 713 of file PrecedenceRulesGraph.h.

◆ m_conditionsRealmEnabled

bool concurrency::PrecedenceRulesGraph::m_conditionsRealmEnabled {false}
private

Enable conditions realm of precedence rules.

Definition at line 732 of file PrecedenceRulesGraph.h.

◆ m_dataPathToDataNodeMap

std::unordered_map<DataObjID, std::unique_ptr<DataNode>, DataObjID_Hasher> concurrency::PrecedenceRulesGraph::m_dataPathToDataNodeMap
private

Index: map of data path to DataNode.

Definition at line 710 of file PrecedenceRulesGraph.h.

◆ m_decisionNameToDecisionHubMap

std::unordered_map<std::string, std::unique_ptr<DecisionNode> > concurrency::PrecedenceRulesGraph::m_decisionNameToDecisionHubMap
private

Index: map of decision's name to DecisionHub.

Definition at line 708 of file PrecedenceRulesGraph.h.

◆ m_enableAnalysis

bool concurrency::PrecedenceRulesGraph::m_enableAnalysis {false}
private

Definition at line 727 of file PrecedenceRulesGraph.h.

◆ m_headNode

DecisionNode* concurrency::PrecedenceRulesGraph::m_headNode = nullptr
private

the head node of the control flow graph

Definition at line 704 of file PrecedenceRulesGraph.h.

◆ m_name

const std::string concurrency::PrecedenceRulesGraph::m_name
private

Definition at line 722 of file PrecedenceRulesGraph.h.

◆ m_nodeCounter

unsigned int concurrency::PrecedenceRulesGraph::m_nodeCounter = 0
private

Total number of nodes in the graph.

Definition at line 716 of file PrecedenceRulesGraph.h.

◆ m_prec_trace_map

std::map<std::string, precedence::AlgoTraceVertex> concurrency::PrecedenceRulesGraph::m_prec_trace_map
private

Definition at line 726 of file PrecedenceRulesGraph.h.

◆ m_precTrace

precedence::PrecTrace concurrency::PrecedenceRulesGraph::m_precTrace
private

facilities for algorithm precedence tracing

Definition at line 725 of file PrecedenceRulesGraph.h.

◆ m_PRGraph

precedence::PRGraph concurrency::PrecedenceRulesGraph::m_PRGraph
private

BGL-based graph of precedence rules.

Definition at line 729 of file PrecedenceRulesGraph.h.

◆ m_svcLocator

SmartIF<ISvcLocator> concurrency::PrecedenceRulesGraph::m_svcLocator
mutableprivate

Service locator (needed to access the MessageSvc)

Definition at line 721 of file PrecedenceRulesGraph.h.


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