| The Gaudi Framework v30r0 (c919700c)

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

- File List
- File Members

PrecedenceSvc.cpp
Go to the documentation of this file.
1 #include "PrecedenceSvc.h"
2 #include "AlgResourcePool.h"
3 #include "EventSlot.h"
4 #include "PRGraphVisitors.h"
5
6 #include "GaudiKernel/Algorithm.h"
7 #include "GaudiKernel/SvcFactory.h"
8
9 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
10 #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) )
11
12 DECLARE_SERVICE_FACTORY( PrecedenceSvc )
13
14 // ============================================================================
15 // Standard constructor, initializes variables
16 // ============================================================================
17
18 PrecedenceSvc::PrecedenceSvc( const std::string& name, ISvcLocator* svcLoc ) : base_class( name, svcLoc ) {}
19
20 // ============================================================================
21 // Initialization
22 // ============================================================================
23 StatusCode PrecedenceSvc::initialize()
24 {
25 using namespace concurrency;
26
27 auto sc = Service::initialize(); // parent class must be initialized first
28 if ( sc.isFailure() ) {
29 fatal() << "Base class failed to initialize" << endmsg;
30 return sc;
31 }
32
33 // prepare a directory to dump precedence analysis files to.
34 if ( m_dumpPrecTrace || m_dumpPrecRules ) {
35 if ( !boost::filesystem::create_directory( m_dumpDirName ) ) {
36 error() << "Could not create directory " << m_dumpDirName << "required "
37 "for task precedence tracing"
38 << endmsg;
39 return StatusCode::FAILURE;
40 }
41 }
42
43 if ( m_dumpPrecRules ) m_PRGraph.enableAnalysis();
44
45 // Get the algo resource pool
46 m_algResourcePool = serviceLocator()->service( "AlgResourcePool" );
47 if ( !m_algResourcePool.isValid() ) {
48 fatal() << "Error retrieving AlgoResourcePool" << endmsg;
49 return StatusCode::FAILURE;
50 }
51
52 info() << "Assembling CF and DF task precedence rules" << endmsg;
53
54 ON_DEBUG debug() << "Assembling CF precedence realm:" << endmsg;
55 // create the root CF node
56 m_PRGraph.addHeadNode( "RootDecisionHub", Concurrent{true}, PromptDecision{false}, ModeOr{true}, AllPass{true},
57 Inverted{false} );
58 // assemble the CF rules
59 for ( const auto& ialgoPtr : m_algResourcePool->getTopAlgList() ) {
60 auto algorithm = dynamic_cast<Algorithm*>( ialgoPtr );
61 if ( !algorithm ) fatal() << "Conversion from IAlgorithm to Algorithm failed" << endmsg;
62 sc = assembleCFRules( algorithm, "RootDecisionHub" );
63 if ( sc.isFailure() ) {
64 fatal() << "Could not assemble the CF precedence realm" << endmsg;
65 return sc;
66 }
67 }
68
69 if ( m_ignoreDFRules ) {
70 warning() << "Ignoring DF precedence rules, disabling all associated features" << endmsg;
71 return StatusCode::SUCCESS;
72 }
73
74 ON_DEBUG debug() << "Assembling DF precedence realm:" << endmsg;
75 sc = m_PRGraph.initialize();
76 if ( sc.isFailure() ) {
77 fatal() << "Could not assemble the DF precedence realm" << endmsg;
78 return sc;
79 }
80
81 // Rank algorithms if a prioritization rule is supplied
82 if ( m_mode == "PCE" ) {
83 auto ranker = concurrency::RankerByProductConsumption();
84 m_PRGraph.rankAlgorithms( ranker );
85 } else if ( m_mode == "COD" ) {
86 auto ranker = concurrency::RankerByCummulativeOutDegree();
87 m_PRGraph.rankAlgorithms( ranker );
88 } else if ( m_mode == "E" ) {
89 auto ranker = concurrency::RankerByEccentricity();
90 m_PRGraph.rankAlgorithms( ranker );
91 } else if ( m_mode == "T" ) {
92 auto ranker = concurrency::RankerByTiming();
93 m_PRGraph.rankAlgorithms( ranker );
94 } else if ( m_mode == "DRE" ) {
95 auto ranker = concurrency::RankerByDataRealmEccentricity();
96 m_PRGraph.rankAlgorithms( ranker );
97 } else if ( !m_mode.empty() ) {
98 error() << "Requested prioritization rule '" << m_mode << "' is unknown" << endmsg;
99 return StatusCode::FAILURE;
100 }
101
102 ON_DEBUG debug() << m_PRGraph.dumpDataFlow() << endmsg;
103
104 if ( sc.isSuccess() ) info() << "PrecedenceSvc initialized successfully" << endmsg;
105
106 return sc;
107 }
108
109 // ============================================================================
110 StatusCode PrecedenceSvc::assembleCFRules( Algorithm* algo, const std::string& parentName, unsigned int recursionDepth )
111 {
112 using namespace concurrency;
113
114 StatusCode sc = StatusCode::SUCCESS;
115
116 ++recursionDepth;
117
118 bool isGaudiSequencer( false );
119 bool isAthSequencer( false );
120
121 if ( algo->isSequence() ) {
122 if ( algo->hasProperty( "ShortCircuit" ) )
123 isGaudiSequencer = true;
124 else if ( algo->hasProperty( "StopOverride" ) )
125 isAthSequencer = true;
126 }
127
128 std::vector<Algorithm*>* subAlgorithms = algo->subAlgorithms();
129 if ( // we only want to add basic algorithms -> have no subAlgs
130 // and exclude the case of empty sequencers
131 ( subAlgorithms->empty() && !( isGaudiSequencer || isAthSequencer ) ) ) {
132
133 ON_DEBUG debug() << std::string( recursionDepth, ' ' ) << "Algorithm '" << algo->name() << "' discovered" << endmsg;
134 sc = m_PRGraph.addAlgorithmNode( algo, parentName, false, false );
135 return sc;
136 }
137
138 // Recursively unroll
139 ON_DEBUG debug() << std::string( recursionDepth, ' ' ) << "Decision hub '" << algo->name() << "' discovered"
140 << endmsg;
141 bool modeOr = false;
142 bool allPass = false;
143 bool promptDecision = false;
144 bool isSequential = false;
145 bool isInverted = false;
146
147 if ( isGaudiSequencer ) {
148 modeOr = ( algo->getProperty( "ModeOR" ).toString() == "True" );
149 allPass = ( algo->getProperty( "IgnoreFilterPassed" ).toString() == "True" );
150 promptDecision = ( algo->getProperty( "ShortCircuit" ).toString() == "True" );
151 isInverted = ( algo->getProperty( "Invert" ).toString() == "True" );
152 if ( allPass ) promptDecision = false; // standard GaudiSequencer behavior on all pass is to execute everything
153 isSequential = ( algo->hasProperty( "Sequential" ) && ( algo->getProperty( "Sequential" ).toString() == "True" ) );
154 } else if ( isAthSequencer ) {
155 modeOr = ( algo->getProperty( "ModeOR" ).toString() == "True" );
156 allPass = ( algo->getProperty( "IgnoreFilterPassed" ).toString() == "True" );
157 promptDecision = ( algo->getProperty( "StopOverride" ).toString() == "False" );
158 isSequential = ( algo->hasProperty( "Sequential" ) && ( algo->getProperty( "Sequential" ).toString() == "True" ) );
159 }
160 sc = m_PRGraph.addDecisionHubNode( algo, parentName, Concurrent{!isSequential}, PromptDecision{promptDecision},
161 ModeOr{modeOr}, AllPass{allPass}, Inverted{isInverted} );
162 if ( sc.isFailure() ) {
163 error() << "Failed to add DecisionHub " << algo->name() << " to graph of precedence rules" << endmsg;
164 return sc;
165 }
166
167 for ( Algorithm* subalgo : *subAlgorithms ) {
168 sc = assembleCFRules( subalgo, algo->name(), recursionDepth );
169 if ( sc.isFailure() ) {
170 error() << "Algorithm " << subalgo->name() << " could not be flattened" << endmsg;
171 return sc;
172 }
173 }
174 return sc;
175 }
176
177 // ============================================================================
178 StatusCode PrecedenceSvc::iterate( EventSlot& slot, const Cause& cause )
179 {
180
181 if ( LIKELY( Cause::source::Task == cause.m_source ) ) {
182 ON_VERBOSE verbose() << "Triggering bottom-up traversal at node '" << cause.m_sourceName << "'" << endmsg;
183 auto visitor = concurrency::DecisionUpdater( slot, cause, m_dumpPrecTrace );
184 m_PRGraph.getAlgorithmNode( cause.m_sourceName )->accept( visitor );
185 } else {
186 ON_VERBOSE verbose() << "Triggering top-down traversal at the root node" << endmsg;
187 auto visitor = concurrency::Supervisor( slot, cause, m_dumpPrecTrace );
188 m_PRGraph.getHeadNode()->accept( visitor );
189 }
190
191 if ( UNLIKELY( m_dumpPrecTrace ) )
192 if ( UNLIKELY( CFRulesResolved( slot ) ) ) dumpPrecedenceTrace( slot );
193 if ( UNLIKELY( m_dumpPrecRules ) )
194 if ( UNLIKELY( CFRulesResolved( slot ) ) ) dumpPrecedenceRules( slot );
195
196 return StatusCode::SUCCESS;
197 }
198
199 // ============================================================================
200 StatusCode PrecedenceSvc::simulate( EventSlot& slot ) const
201 {
202
203 Cause cs = {Cause::source::Root, "RootDecisionHub"};
204 auto visitor = concurrency::RunSimulator( slot, cs );
205
206 auto& nodeDecisions = slot.controlFlowState;
207
208 std::vector<int> prevNodeDecisions;
209 int cntr = 0;
210 std::vector<int> counters;
211
212 while ( !CFRulesResolved( slot ) ) {
213 cntr += 1;
214 int prevAlgosNum = visitor.m_nodesSucceeded;
215 debug() << " Proceeding with iteration #" << cntr << endmsg;
216 prevNodeDecisions = slot.controlFlowState;
217 m_PRGraph.getHeadNode()->accept( visitor );
218 if ( prevNodeDecisions == nodeDecisions ) {
219 error() << " No progress on iteration " << cntr << " detected, node decisions are:" << nodeDecisions << endmsg;
220 return StatusCode::FAILURE;
221 }
222 info() << " Iteration #" << cntr << " finished, total algorithms executed: " << visitor.m_nodesSucceeded
223 << endmsg;
224
225 std::stringstream s;
226 s << cntr << ", " << ( visitor.m_nodesSucceeded - prevAlgosNum ) << "\n";
227
228 std::ofstream myfile;
229 myfile.open( "RunSimulation.csv", std::ios::app );
230 myfile << s.str();
231 myfile.close();
232
233 if ( visitor.m_nodesSucceeded != prevAlgosNum ) counters.push_back( visitor.m_nodesSucceeded );
234 }
235
236 info() << "Asymptotical concurrency speedup depth: " << (float)visitor.m_nodesSucceeded / (float)counters.size()
237 << endmsg;
238
239 // Reset algorithm states and node decisions
240 slot.algsStates.reset();
241 nodeDecisions.assign( nodeDecisions.size(), -1 );
242
243 return StatusCode::SUCCESS;
244 }
245
246 // ============================================================================
247 bool PrecedenceSvc::CFRulesResolved( EventSlot& slot ) const
248 {
249 return ( -1 != slot.controlFlowState[m_PRGraph.getHeadNode()->getNodeIndex()] ? true : false );
250 }
251
252 // ============================================================================
253 void PrecedenceSvc::dumpControlFlow() const
254 {
255
256 info() << std::endl << "==================== Control Flow Configuration ==================" << std::endl << std::endl;
257 info() << m_PRGraph.dumpControlFlow() << endmsg;
258 }
259 // ============================================================================
260 void PrecedenceSvc::dumpDataFlow() const
261 {
262 info() << std::endl << "===================== Data Flow Configuration ====================" << std::endl;
263 info() << m_PRGraph.dumpDataFlow() << endmsg;
264 }
265
266 // ============================================================================
267 const std::string PrecedenceSvc::printState( EventSlot& slot ) const
268 {
269
270 std::stringstream ss;
271 m_PRGraph.printState( ss, slot.algsStates, slot.controlFlowState, 0 );
272 return ss.str();
273 }
274
275 // ============================================================================
276 void PrecedenceSvc::dumpPrecedenceRules( EventSlot& slot )
277 {
278
279 if ( !m_dumpPrecRules ) {
280 warning() << "No temporal and topological aspects of execution flow were traced. "
281 << "To get them traced, please set DumpPrecedenceRules "
282 << "property to True " << endmsg;
283 return;
284 }
285
286 ON_DEBUG debug() << "Dumping temporal precedence rules" << endmsg;
287
288 std::string fileName;
289 if ( m_dumpPrecRulesFile.empty() ) {
290 const auto& eventID = slot.eventContext->eventID();
291 fileName = "rules.evt-" + std::to_string( eventID.event_number() ) + "." + "run-" +
292 std::to_string( eventID.run_number() ) + ".graphml";
293 } else {
294 fileName = m_dumpPrecRulesFile;
295 }
296
297 boost::filesystem::path pth{m_dumpDirName};
298 pth.append( fileName );
299
300 m_PRGraph.dumpPrecRules( pth, slot );
301 }
302
303 // ============================================================================
304 void PrecedenceSvc::dumpPrecedenceTrace( EventSlot& slot )
305 {
306
307 if ( !m_dumpPrecTrace ) {
308 warning() << "Task precedence was not traced. To get it traced, please set "
309 << "DumpPrecedenceTrace property to True " << endmsg;
310 return;
311 }
312
313 ON_DEBUG debug() << "Dumping temporal precedence trace" << endmsg;
314
315 std::string fileName;
316 if ( m_dumpPrecTraceFile.empty() ) {
317 const auto& eventID = slot.eventContext->eventID();
318 fileName = "trace.evt-" + std::to_string( eventID.event_number() ) + "." + "run-" +
319 std::to_string( eventID.run_number() ) + ".graphml";
320 } else {
321 fileName = m_dumpPrecTraceFile;
322 }
323
324 boost::filesystem::path pth{m_dumpDirName};
325 pth.append( fileName );
326
327 m_PRGraph.dumpPrecTrace( pth );
328 }
329
330 // ============================================================================
331 // Finalize
332 // ============================================================================
333 StatusCode PrecedenceSvc::finalize() { return Service::finalize(); }
PropertyHolder::getProperty
StatusCode getProperty(Gaudi::Details::PropertyBase *p) const override
get the property
Definition: PropertyHolder.h:291
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
PrecedenceSvc::m_dumpPrecTrace
Gaudi::Property< bool > m_dumpPrecTrace
Definition: PrecedenceSvc.h:85
StatusCode::SUCCESS
Definition: StatusCode.h:29
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:77
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
Algorithm.h
PrecedenceSvc::dumpPrecedenceRules
void dumpPrecedenceRules(EventSlot &) override
Dump precedence rules (available only in DEBUG mode, and must be enabled with the corresponding servi...
Definition: PrecedenceSvc.cpp:276
Cause::source::Task
PRGraphVisitors.h
std::vector::empty
T empty(T...args)
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
std::ofstream::open
T open(T...args)
concurrency::PrecedenceRulesGraph::addAlgorithmNode
StatusCode addAlgorithmNode(Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass)
Add algorithm node.
Definition: PrecedenceRulesGraph.cpp:260
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:737
PrecedenceSvc::dumpDataFlow
void dumpDataFlow() const override
Definition: PrecedenceSvc.cpp:260
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:895
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:174
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:112
concurrency::RunSimulator
Definition: PRGraphVisitors.h:135
concurrency
Definition: IGraphVisitor.h:4
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:33
PrecedenceSvc::assembleCFRules
StatusCode assembleCFRules(Algorithm *, const std::string &, unsigned int recursionDepth=0)
Definition: PrecedenceSvc.cpp:110
EventSlot::eventContext
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:28
PrecedenceSvc
A service to resolve the task execution precedence.
Definition: PrecedenceSvc.h:21
PropertyHolder::hasProperty
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
Definition: PropertyHolder.h:334
concurrency::PrecedenceRulesGraph::dumpPrecRules
void dumpPrecRules(const boost::filesystem::path &, const EventSlot &slot)
dump to file the precedence rules
Definition: PrecedenceRulesGraph.cpp:529
std::to_string
T to_string(T...args)
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:118
std::endl
T endl(T...args)
concurrency::PrecedenceRulesGraph::printState
void printState(std::stringstream &output, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.h:757
PrecedenceSvc::m_dumpDirName
boost::filesystem::path m_dumpDirName
Precedence analysis facilities.
Definition: PrecedenceSvc.h:83
std
STL namespace.
Cause::m_source
source m_source
Definition: PrecedenceRulesGraph.h:429
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:9
concurrency::PrecedenceRulesGraph::getAlgorithmNode
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
Definition: PrecedenceRulesGraph.cpp:305
concurrency::PrecedenceRulesGraph::rankAlgorithms
void rankAlgorithms(IGraphVisitor &ranker) const
Rank Algorithm nodes by the number of data outputs.
Definition: PrecedenceRulesGraph.cpp:453
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
std::stringstream
STL class.
concurrency::ModeOr
Gaudi::tagged_bool< class ModeOr_tag > ModeOr
Definition: PrecedenceRulesGraph.h:32
PrecedenceSvc::m_ignoreDFRules
Gaudi::Property< bool > m_ignoreDFRules
Scheduling strategy.
Definition: PrecedenceSvc.h:81
PrecedenceSvc::iterate
StatusCode iterate(EventSlot &, const Cause &) override
Infer the precedence effect caused by an execution flow event.
Definition: PrecedenceSvc.cpp:178
std::string
STL class.
PrecedenceSvc::m_dumpPrecRulesFile
Gaudi::Property< std::string > m_dumpPrecRulesFile
Definition: PrecedenceSvc.h:96
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:79
concurrency::DecisionNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:61
concurrency::PrecedenceRulesGraph::initialize
StatusCode initialize()
Initialize graph.
Definition: PrecedenceRulesGraph.cpp:142
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
std::ofstream
STL class.
SvcFactory.h
concurrency::RankerByTiming
Definition: PRGraphVisitors.h:98
PrecedenceSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
A shortcut to the algorithm resource pool.
Definition: PrecedenceSvc.h:75
concurrency::PrecedenceRulesGraph::dumpPrecTrace
void dumpPrecTrace(const boost::filesystem::path &)
dump to file the precedence trace
Definition: PrecedenceRulesGraph.cpp:615
concurrency::RankerByDataRealmEccentricity
Definition: PRGraphVisitors.h:114
IAlgResourcePool::getTopAlgList
virtual std::list< IAlgorithm * > getTopAlgList()=0
Get top list of algorithms.
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:109
ON_VERBOSE
#define ON_VERBOSE
Definition: PrecedenceSvc.cpp:10
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:37
Cause
Definition: PrecedenceRulesGraph.h:426
concurrency::Inverted
Gaudi::tagged_bool< class Inverted_tag > Inverted
Definition: PrecedenceRulesGraph.h:34
concurrency::PrecedenceRulesGraph::enableAnalysis
void enableAnalysis()
BGL-based facilities.
Definition: PrecedenceRulesGraph.h:764
PrecedenceSvc::finalize
StatusCode finalize() override
Finalize.
Definition: PrecedenceSvc.cpp:333
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
concurrency::PrecedenceRulesGraph::dumpDataFlow
std::string dumpDataFlow() const
Print out all data origins and destinations, as reflected in the EF graph.
Definition: PrecedenceRulesGraph.cpp:501
PrecedenceSvc::m_mode
Gaudi::Property< std::string > m_mode
Scheduling strategy.
Definition: PrecedenceSvc.h:79
concurrency::RankerByEccentricity
Definition: PRGraphVisitors.h:106
concurrency::DecisionUpdater
Definition: PRGraphVisitors.h:38
std::stringstream::str
T str(T...args)
Cause::source::Root
DECLARE_SERVICE_FACTORY
#define DECLARE_SERVICE_FACTORY(x)
Definition: Service.h:211
PrecedenceSvc::dumpPrecedenceTrace
void dumpPrecedenceTrace(EventSlot &) override
Dump precedence trace (available only in DEBUG mode, and must be enabled with the corresponding servi...
Definition: PrecedenceSvc.cpp:304
PrecedenceSvc::CFRulesResolved
bool CFRulesResolved(EventSlot &) const override
Check if the root CF decision is resolved.
Definition: PrecedenceSvc.cpp:247
PrecedenceSvc::simulate
StatusCode simulate(EventSlot &) const override
Simulate execution flow.
Definition: PrecedenceSvc.cpp:200
concurrency::Concurrent
Gaudi::tagged_bool< class Concurrent_tag > Concurrent
Definition: PrecedenceRulesGraph.h:30
LIKELY
#define LIKELY(x)
Definition: Kernel.h:127
Algorithm::subAlgorithms
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Definition: Algorithm.cpp:782
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
std::vector::size
T size(T...args)
std::vector< Algorithm * >
concurrency::PromptDecision
Gaudi::tagged_bool< class PromptDecision_tag > PromptDecision
Definition: PrecedenceRulesGraph.h:31
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:115
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
Algorithm::isSequence
bool isSequence() const override
Are we a Sequence?
Definition: Algorithm.h:220
PrecedenceSvc::m_dumpPrecRules
Gaudi::Property< bool > m_dumpPrecRules
Definition: PrecedenceSvc.h:93
concurrency::PrecedenceRulesGraph::addDecisionHubNode
StatusCode addDecisionHubNode(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:359
concurrency::RankerByProductConsumption
Definition: PRGraphVisitors.h:77
AlgsExecutionStates::reset
void reset()
Definition: AlgsExecutionStates.h:51
PrecedenceSvc.h
EventSlot
Class representing the event slot.
Definition: EventSlot.h:10
concurrency::AllPass
Gaudi::tagged_bool< class AllPass_tag > AllPass
Definition: PrecedenceRulesGraph.h:33
gaudirun.s
string s
Definition: gaudirun.py:253
CommonMessaging
Definition: CommonMessaging.h:62
concurrency::AlgorithmNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:109
PrecedenceSvc::m_dumpPrecTraceFile
Gaudi::Property< std::string > m_dumpPrecTraceFile
Definition: PrecedenceSvc.h:89
PrecedenceSvc::printState
const std::string printState(EventSlot &) const override
Definition: PrecedenceSvc.cpp:267
EventContext::eventID
const EventIDBase & eventID() const
Definition: EventContext.h:42
concurrency::Supervisor
Definition: PRGraphVisitors.h:54
concurrency::ControlFlowNode::getNodeIndex
const unsigned int & getNodeIndex() const
Get node index.
Definition: PrecedenceRulesGraph.h:464
AlgResourcePool.h
StatusCode::FAILURE
Definition: StatusCode.h:29
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:100
PrecedenceSvc::dumpControlFlow
void dumpControlFlow() const override
Dump precedence rules.
Definition: PrecedenceSvc.cpp:253
concurrency::PrecedenceRulesGraph::dumpControlFlow
std::string dumpControlFlow() const
Print out control flow of Algorithms and Sequences.
Definition: PrecedenceRulesGraph.cpp:464
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
EventSlot.h
concurrency::RankerByCummulativeOutDegree
Definition: PRGraphVisitors.h:85
Cause::m_sourceName
std::string m_sourceName
Definition: PrecedenceRulesGraph.h:430
PrecedenceSvc::initialize
StatusCode initialize() override
Initialize.
Definition: PrecedenceSvc.cpp:23
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:405
concurrency::PrecedenceRulesGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: PrecedenceRulesGraph.h:734