| The Gaudi Framework v29r0 (ff2e7097)

- 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 {
14 --m_algosInFlight;
15 ++m_algosFinished;
16 }
17
18 bool EventSchedulingState::hasStarted( unsigned int& index ) const { return m_algosStarted[index]; }
19
20 void EventSchedulingState::algoStarts( unsigned int& index )
21 {
22 ++m_algosInFlight;
23 m_algosStarted[index] = true;
24 }
25
26 void EventSchedulingState::update_state( unsigned int& product_index ) { m_eventState[product_index] = true; }
EventSchedulingState::update_state
void update_state(unsigned int &product_index)
Definition: EventSchedulingState.cpp:26
EventSchedulingState::algoStarts
void algoStarts(unsigned int &index)
Definition: EventSchedulingState.cpp:20
EventSchedulingState::m_algosInFlight
std::atomic_uint m_algosInFlight
Number of algos in flight.
Definition: EventSchedulingState.h:27
EventSchedulingState::hasStarted
bool hasStarted(unsigned int &index) const
Definition: EventSchedulingState.cpp:18
EventSchedulingState.h
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
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