RDFAnalysis
0.1.1
Physics analysis with ROOT::RDataFrame
|
Helper struct to represent all the information that the scheduler needs to know about an action in order to form the ordering. More...
#include <SchedulerBase.h>
Data Structures | |
struct | CostOrdering |
Ordering used in the actual scheduling process. Order by cost first, then type, then name. More... | |
Public Member Functions | |
Action (ActionType type, const std::string &name, float cost=0) | |
Create the action. More... | |
bool | operator< (const Action &rhs) const |
Operator used to construct sets of actions. Order by type first, then name. More... | |
bool | operator== (const Action &rhs) const |
Equality comparison operator for actions. More... | |
std::map< Action, std::set< Action >, CostOrdering > | expand (const SchedulerBase &scheduler, const std::set< Action > &preExisting={}) const |
Expand the dependencies of this action. More... | |
std::map< Action, std::set< Action >, CostOrdering > | expand (const SchedulerBase &scheduler, const std::set< Action > &preExisting, std::vector< Action > &processing) const |
Expand the dependencies of this action. More... | |
void | retrieveCost (const SchedulerBase &scheduler) |
Get the cost of this action from the scheduler. More... | |
Data Fields | |
ActionType | type |
The type of this action. More... | |
std::string | name |
The name of this action. More... | |
float | cost |
The cost-estimate of this action. More... | |
Helper struct to represent all the information that the scheduler needs to know about an action in order to form the ordering.
An action is uniquely identified by its type and name. Note that often when passing around actions the cost value is not filled, as it is only relevant at one point in the schedule building.
|
inline |
Create the action.
std::map< SchedulerBase::Action, std::set< SchedulerBase::Action >, SchedulerBase::Action::CostOrdering > expand | ( | const SchedulerBase & | scheduler, |
const std::set< Action > & | preExisting = {} |
||
) | const |
Expand the dependencies of this action.
scheduler | The scheduler instance to use |
preExisting | Any actions that already exist by the point in the schedule in which this action is to be inserted |
std::runtime_error | if a circular dependency is found |
std::map< SchedulerBase::Action, std::set< SchedulerBase::Action >, SchedulerBase::Action::CostOrdering > expand | ( | const SchedulerBase & | scheduler, |
const std::set< Action > & | preExisting, | ||
std::vector< Action > & | processing | ||
) | const |
Expand the dependencies of this action.
scheduler | The scheduler instance to use |
preExisting | Any actions that already exist by the point in the schedule in which this action is to be inserted |
processing | A list of the actions currently being processed. This is used to catch circular dependencies that would otherwise cause an infinite loop |
std::runtime_error | if a circular dependency is found |
|
inline |
Operator used to construct sets of actions. Order by type first, then name.
|
inline |
Equality comparison operator for actions.
void retrieveCost | ( | const SchedulerBase & | scheduler | ) |
Get the cost of this action from the scheduler.
float cost |
The cost-estimate of this action.
std::string name |
The name of this action.
ActionType type |
The type of this action.