| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
EventSchedulingState Class Reference

`#include <GaudiHive/EventSchedulingState.h>`

## Public Member Functions
| EventSchedulingState (const unsigned int &n_algos, const unsigned int &n_products)
| ~EventSchedulingState ()
void | algoFinished ()
void | algoStarts (unsigned int &index)
bool | hasStarted (unsigned int &index) const
bool | hasFinished () const
const state_type & | state () const
void | update_state (unsigned int &product_index)

## Private Attributes
std::atomic_uint | m_algosInFlight
| Number of algos in flight. More...
std::atomic_uint | m_algosFinished
| Number of finished algos. More...
unsigned int | m_numberOfAlgos
| Total number of algos. More...
state_type | m_eventState
| Event state recording which products are there. More...
tbb::concurrent_vector< bool > | m_algosStarted
| Register of algorithms started. More...

## Detailed Description

Definition at line 14 of file EventSchedulingState.h.

## Constructor & Destructor Documentation

EventSchedulingState::EventSchedulingState | ( | const unsigned int & | n_algos,
|  | const unsigned int & | n_products
| ) |  |

Definition at line 3 of file EventSchedulingState.cpp.

4 : m_numberOfAlgos(n_algos), m_eventState(n_products)
5 {
6 m_algosInFlight = 0;
7 m_algosFinished = 0;
8 m_algosStarted.resize(n_algos);
9 std::fill(m_algosStarted.begin(),m_algosStarted.end(),false);
10 }
EventSchedulingState::m_numberOfAlgos
unsigned int m_numberOfAlgos
Total number of algos.
Definition: EventSchedulingState.h:32
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:28
EventSchedulingState::m_algosStarted
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
Definition: EventSchedulingState.h:36
EventSchedulingState::m_algosFinished
std::atomic_uint m_algosFinished
Number of finished algos.
Definition: EventSchedulingState.h:30
EventSchedulingState::m_eventState
state_type m_eventState
Event state recording which products are there.
Definition: EventSchedulingState.h:34
std::fill
T fill(T...args)

EventSchedulingState::~EventSchedulingState | ( |  | ) |
| inline

Definition at line 17 of file EventSchedulingState.h.

17 {};

## Member Function Documentation

void EventSchedulingState::algoFinished | ( |  | ) |

Definition at line 12 of file EventSchedulingState.cpp.

12 {
13 --m_algosInFlight;
14 ++m_algosFinished;
15 }
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:28
EventSchedulingState::m_algosFinished
std::atomic_uint m_algosFinished
Number of finished algos.
Definition: EventSchedulingState.h:30

void EventSchedulingState::algoStarts | ( | unsigned int & | index | ) |

Definition at line 21 of file EventSchedulingState.cpp.

21 {
22 ++m_algosInFlight;
23 m_algosStarted[index] = true;
24 }
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:28
EventSchedulingState::m_algosStarted
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
Definition: EventSchedulingState.h:36

bool EventSchedulingState::hasFinished | ( |  | ) | const
| inline

Definition at line 22 of file EventSchedulingState.h.

22 {return (m_algosFinished == m_numberOfAlgos);}
EventSchedulingState::m_numberOfAlgos
unsigned int m_numberOfAlgos
Total number of algos.
Definition: EventSchedulingState.h:32
EventSchedulingState::m_algosFinished
std::atomic_uint m_algosFinished
Number of finished algos.
Definition: EventSchedulingState.h:30

bool EventSchedulingState::hasStarted | ( | unsigned int & | index | ) | const

Definition at line 17 of file EventSchedulingState.cpp.

17 {
18 return m_algosStarted[index];
19 }
EventSchedulingState::m_algosStarted
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
Definition: EventSchedulingState.h:36

const state_type& EventSchedulingState::state | ( |  | ) | const
| inline

Definition at line 23 of file EventSchedulingState.h.

23 {return m_eventState;}
EventSchedulingState::m_eventState
state_type m_eventState
Event state recording which products are there.
Definition: EventSchedulingState.h:34

void EventSchedulingState::update_state | ( | unsigned int & | product_index | ) |

Definition at line 26 of file EventSchedulingState.cpp.

26 {
27 m_eventState[product_index] = true;
28 }
EventSchedulingState::m_eventState
state_type m_eventState
Event state recording which products are there.
Definition: EventSchedulingState.h:34

## Member Data Documentation

std::atomic_uint EventSchedulingState::m_algosFinished
| private

Number of finished algos.

Definition at line 30 of file EventSchedulingState.h.

std::atomic_uint EventSchedulingState::m_algosInFlight
| private

Number of algos in flight.

Definition at line 28 of file EventSchedulingState.h.

tbb::concurrent_vector<bool> EventSchedulingState::m_algosStarted
| private

Register of algorithms started.

Definition at line 36 of file EventSchedulingState.h.

state_type EventSchedulingState::m_eventState
| private

Event state recording which products are there.

Definition at line 34 of file EventSchedulingState.h.

unsigned int EventSchedulingState::m_numberOfAlgos
| private

Total number of algos.

Definition at line 32 of file EventSchedulingState.h.

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

- GaudiHive/GaudiHive/EventSchedulingState.h
- GaudiHive/src/EventSchedulingState.cpp