RDFAnalysis  0.1.1
Physics analysis with ROOT::RDataFrame
SchedulerBase::Action Struct Reference

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 >, CostOrderingexpand (const SchedulerBase &scheduler, const std::set< Action > &preExisting={}) const
 Expand the dependencies of this action. More...
 
std::map< Action, std::set< Action >, CostOrderingexpand (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Action ( ActionType  type,
const std::string &  name,
float  cost = 0 
)
inline

Create the action.

Member Function Documentation

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.

Parameters
schedulerThe scheduler instance to use
preExistingAny actions that already exist by the point in the schedule in which this action is to be inserted
Exceptions
std::runtime_errorif a circular dependency is found
Returns
A map of this action and all its direct and indirect dependencies to their direct dependencies
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.

Parameters
schedulerThe scheduler instance to use
preExistingAny actions that already exist by the point in the schedule in which this action is to be inserted
processingA list of the actions currently being processed. This is used to catch circular dependencies that would otherwise cause an infinite loop
Exceptions
std::runtime_errorif a circular dependency is found
Returns
A map of this action and all its direct and indirect dependencies to their direct dependencies
bool operator< ( const Action rhs) const
inline

Operator used to construct sets of actions. Order by type first, then name.

bool operator== ( const Action rhs) const
inline

Equality comparison operator for actions.

void retrieveCost ( const SchedulerBase scheduler)

Get the cost of this action from the scheduler.

Field Documentation

float cost

The cost-estimate of this action.

std::string name

The name of this action.

ActionType type

The type of this action.


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