| The Gaudi Framework v29r0 (ff2e7097)

- 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 12 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:31
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:27
EventSchedulingState::m_algosStarted
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
Definition: EventSchedulingState.h:35
EventSchedulingState::m_algosFinished
std::atomic_uint m_algosFinished
Number of finished algos.
Definition: EventSchedulingState.h:29
EventSchedulingState::m_eventState
state_type m_eventState
Event state recording which products are there.
Definition: EventSchedulingState.h:33
std::fill
T fill(T...args)

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

Definition at line 16 of file EventSchedulingState.h.

16 {};

## Member Function Documentation

void EventSchedulingState::algoFinished | ( |  | ) |

Definition at line 12 of file EventSchedulingState.cpp.

13 {
14 --m_algosInFlight;
15 ++m_algosFinished;
16 }
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:27
EventSchedulingState::m_algosFinished
std::atomic_uint m_algosFinished
Number of finished algos.
Definition: EventSchedulingState.h:29

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

Definition at line 20 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:27
EventSchedulingState::m_algosStarted
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
Definition: EventSchedulingState.h:35

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

Definition at line 21 of file EventSchedulingState.h.

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

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

Definition at line 18 of file EventSchedulingState.cpp.

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

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

Definition at line 22 of file EventSchedulingState.h.

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

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

Definition at line 26 of file EventSchedulingState.cpp.

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

## Member Data Documentation

std::atomic_uint EventSchedulingState::m_algosFinished
| private

Number of finished algos.

Definition at line 29 of file EventSchedulingState.h.

std::atomic_uint EventSchedulingState::m_algosInFlight
| private

Number of algos in flight.

Definition at line 27 of file EventSchedulingState.h.

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

Register of algorithms started.

Definition at line 35 of file EventSchedulingState.h.

state_type EventSchedulingState::m_eventState
| private

Event state recording which products are there.

Definition at line 33 of file EventSchedulingState.h.

unsigned int EventSchedulingState::m_numberOfAlgos
| private

Total number of algos.

Definition at line 31 of file EventSchedulingState.h.

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

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