| The Gaudi Framework v28r2-patches (bc4ad17a)

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

- File List
- File Members

EventSchedulingState.cpp
Go to the documentation of this file.
1 #include "GaudiHive/EventSchedulingState.h"
2
3 EventSchedulingState::EventSchedulingState(const unsigned int& n_algos, const unsigned int& n_products)
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 }
11
12 void EventSchedulingState::algoFinished() {
13 --m_algosInFlight;
14 ++m_algosFinished;
15 }
16
17 bool EventSchedulingState::hasStarted(unsigned int& index) const {
18 return m_algosStarted[index];
19 }
20
21 void EventSchedulingState::algoStarts(unsigned int& index) {
22 ++m_algosInFlight;
23 m_algosStarted[index] = true;
24 }
25
26 void EventSchedulingState::update_state(unsigned int& product_index){
27 m_eventState[product_index] = true;
28 }
EventSchedulingState::update_state
void update_state(unsigned int &product_index)
Definition: EventSchedulingState.cpp:26
EventSchedulingState::algoStarts
void algoStarts(unsigned int &index)
Definition: EventSchedulingState.cpp:21
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:28
EventSchedulingState::hasStarted
bool hasStarted(unsigned int &index) const
Definition: EventSchedulingState.cpp:17
EventSchedulingState.h
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
EventSchedulingState::algoFinished
void algoFinished()
Definition: EventSchedulingState.cpp:12
std::fill
T fill(T...args)
EventSchedulingState::EventSchedulingState
EventSchedulingState(const unsigned int &n_algos, const unsigned int &n_products)
Definition: EventSchedulingState.cpp:3