The Gaudi Framework  v29r0 (ff2e7097)
EventSchedulingState.cpp
Go to the documentation of this file.
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 
13 {
16 }
17 
18 bool EventSchedulingState::hasStarted( unsigned int& index ) const { return m_algosStarted[index]; }
19 
20 void EventSchedulingState::algoStarts( unsigned int& index )
21 {
23  m_algosStarted[index] = true;
24 }
25 
26 void EventSchedulingState::update_state( unsigned int& product_index ) { m_eventState[product_index] = true; }
void update_state(unsigned int &product_index)
void algoStarts(unsigned int &index)
std::atomic_uint m_algosInFlight
Number of algos in flight.
bool hasStarted(unsigned int &index) const
tbb::concurrent_vector< bool > m_algosStarted
Register of algorithms started.
std::atomic_uint m_algosFinished
Number of finished algos.
state_type m_eventState
Event state recording which products are there.
T fill(T...args)
EventSchedulingState(const unsigned int &n_algos, const unsigned int &n_products)