#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h>
|
| AlgorithmNode (PrecedenceRulesGraph &graph, Gaudi::Algorithm *algoPtr, unsigned int nodeIndex, unsigned int algoIndex, bool inverted, bool allPass) |
| Constructor. More...
|
|
bool | accept (IGraphVisitor &visitor) override |
| Visitor entry point. More...
|
|
void | addParentNode (DecisionNode *node) |
| Add a parent node. More...
|
|
const std::vector< DecisionNode * > & | getParentDecisionHubs () const |
| Get all parent decision hubs. More...
|
|
void | addOutputDataNode (DataNode *node) |
| Associate an AlgorithmNode, which is a data supplier for this one. More...
|
|
void | addInputDataNode (DataNode *node) |
| Associate an AlgorithmNode, which is a data consumer of this one. More...
|
|
const std::vector< DataNode * > & | getOutputDataNodes () const |
| Get all supplier nodes. More...
|
|
const std::vector< DataNode * > & | getInputDataNodes () const |
| Get all consumer nodes. More...
|
|
void | setRank (float &rank) |
| Set Algorithm rank. More...
|
|
const float & | getRank () const |
| Get Algorithm rank. More...
|
|
Gaudi::Algorithm * | getAlgorithm () const |
| get Algorithm representatives More...
|
|
const unsigned int & | getAlgoIndex () const |
| Get algorithm index. More...
|
|
void | setBlocking (bool value) |
| Set the CPU-blocking flag. More...
|
|
bool | isBlocking () const |
| Check if algorithm is CPU-blocking. More...
|
|
bool | isOptimist () const |
| Check if positive control flow decision is enforced. More...
|
|
bool | isLiar () const |
| Check if control flow logic is always inverted. More...
|
|
void | printState (std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const override |
| Print a string representing the control flow state. More...
|
|
| ControlFlowNode (PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name) |
| Constructor. More...
|
|
virtual | ~ControlFlowNode ()=default |
| Destructor. More...
|
|
const unsigned int & | getNodeIndex () const |
| Get node index. More...
|
|
const std::string & | name () const |
| Get node name. More...
|
|
Definition at line 487 of file PrecedenceRulesGraph.h.
◆ AlgorithmNode()
◆ accept()
bool concurrency::AlgorithmNode::accept |
( |
IGraphVisitor & |
visitor | ) |
|
|
overridevirtual |
◆ addInputDataNode()
void concurrency::AlgorithmNode::addInputDataNode |
( |
DataNode * |
node | ) |
|
◆ addOutputDataNode()
void concurrency::AlgorithmNode::addOutputDataNode |
( |
DataNode * |
node | ) |
|
◆ addParentNode()
void concurrency::AlgorithmNode::addParentNode |
( |
DecisionNode * |
node | ) |
|
◆ getAlgoIndex()
const unsigned int& concurrency::AlgorithmNode::getAlgoIndex |
( |
| ) |
const |
|
inline |
◆ getAlgorithm()
◆ getInputDataNodes()
◆ getOutputDataNodes()
◆ getParentDecisionHubs()
◆ getRank()
const float& concurrency::AlgorithmNode::getRank |
( |
| ) |
const |
|
inline |
◆ isBlocking()
bool concurrency::AlgorithmNode::isBlocking |
( |
| ) |
const |
|
inline |
◆ isLiar()
bool concurrency::AlgorithmNode::isLiar |
( |
| ) |
const |
|
inline |
◆ isOptimist()
bool concurrency::AlgorithmNode::isOptimist |
( |
| ) |
const |
|
inline |
◆ printState()
void concurrency::AlgorithmNode::printState |
( |
std::stringstream & |
output, |
|
|
EventSlot & |
slot, |
|
|
const unsigned int & |
recursionLevel |
|
) |
| const |
|
overridevirtual |
Print a string representing the control flow state.
Implements concurrency::ControlFlowNode.
Definition at line 77 of file PrecedenceRulesGraph.cpp.
89 if ( states[
m_algoIndex] == AlgsExecutionStates::State::CONTROLREADY ) {
96 ConditionNode* conditionNode =
dynamic_cast<ConditionNode*
>( dataNode );
97 DataReadyPromoter visitor( slot, {} );
98 bool wasProduced =
false;
99 if ( conditionNode ) {
102 wasProduced = !visitor.visitEnter( *conditionNode );
105 wasProduced = visitor.visit( *dataNode );
109 if ( !wasProduced ) {
113 output << indent <<
"missing conditions data: " << dataNode->name() <<
std::endl;
120 if ( finder.holderNames().size() > 1 ) {
121 output << indent <<
"required by tool:";
122 for (
auto const& holderName : finder.holderNames() ) {
123 if ( holderName != this->
name() ) output <<
" " << holderName;
128 if ( conditionNode ) {
132 conditionNode->m_condSvc->validRanges( validRanges, dataNode->name() )
135 if ( validRanges.empty() )
output << indent <<
"no interval(s) of validity" <<
std::endl;
138 output << indent <<
"can be produced by alg(s): ";
139 for (
auto algoNode : dataNode->getProducers() ) {
140 output <<
"( " << algoNode->name() <<
" in state: " << states[algoNode->getAlgoIndex()] <<
" ) ";
146 if ( !conditionNode ) {
155 if ( visitor.visit( *dataNode ) ) {
156 output << indent <<
"data is available at whole-event level" <<
std::endl;
161 for (
auto& pair : *subSlotMap ) {
162 if ( pair.second.size() > 0 ) {
163 bool madeLine =
false;
166 for (
int slotIndex : pair.second ) {
168 EventSlot* subSlot = &testSubSlots->
at( slotIndex );
169 visitor.m_slot = subSlot;
170 if ( visitor.visit( *dataNode ) ) {
174 output << indent <<
"data is available in sub-slot(s) ";
177 output << slotIndex <<
", ";
180 if ( madeLine ) {
output <<
"entered from " << pair.first <<
std::endl; }
◆ setBlocking()
void concurrency::AlgorithmNode::setBlocking |
( |
bool |
value | ) |
|
|
inline |
◆ setRank()
void concurrency::AlgorithmNode::setRank |
( |
float & |
rank | ) |
|
|
inline |
◆ m_algoIndex
unsigned int concurrency::AlgorithmNode::m_algoIndex |
|
private |
◆ m_algoName
◆ m_algorithm
◆ m_allPass
bool concurrency::AlgorithmNode::m_allPass |
|
private |
◆ m_inputs
◆ m_inverted
bool concurrency::AlgorithmNode::m_inverted |
|
private |
◆ m_isBlocking
bool concurrency::AlgorithmNode::m_isBlocking |
|
private |
◆ m_outputs
◆ m_parents
◆ m_rank
float concurrency::AlgorithmNode::m_rank = -1 |
|
private |
The documentation for this class was generated from the following files:
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
float m_rank
Algorithm rank of any kind.
std::vector< DecisionNode * > m_parents
Control flow parents of an AlgorithmNode (DecisionNodes)
void acceptDHVisitor(IDataHandleVisitor *) const override
std::unordered_map< std::string, std::vector< unsigned int > > subSlotsByNode
Listing of sub-slots by the node (name) they are attached to.
const std::string & name() const override
The identifying name of the algorithm object.
const EventIDBase & eventID() const
const std::vector< DataNode * > & getInputDataNodes() const
Get all consumer nodes.
Class representing an event slot.
const std::string & name() const
Get node name.
std::vector< DataNode * > m_outputs
Algorithm outputs (DataNodes)
std::string m_algoName
The name of the algorithm.
unsigned int m_algoIndex
The index of the algorithm.
EventSlot * parentSlot
Pointer to parent slot (null for top level)
bool m_inverted
Whether the selection result is negated or not.
std::vector< EventSlot > allSubSlots
Actual sub-slot instances.
ControlFlowNode(PrecedenceRulesGraph &graph, unsigned int nodeIndex, const std::string &name)
Constructor.
Gaudi::Algorithm * m_algorithm
Algorithm representative behind the AlgorithmNode.
std::vector< DataNode * > m_inputs
Algorithm inputs (DataNodes)
bool m_allPass
Whether the selection result is relevant or always "pass".
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
bool m_isBlocking
If an algorithm is CPU-blocking.
std::vector< int > controlFlowState
State of the control flow.
AlgsExecutionStates algsStates
Vector of algorithms states.
Gaudi::Algorithm * getAlgorithm() const
get Algorithm representatives
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.