The Gaudi Framework  v30r3 (a5ef0a68)
EventSlot.h
Go to the documentation of this file.
1 #ifndef EVENTSLOT_H_
2 #define EVENTSLOT_H_
3 
4 // Framework includes
5 #include "AlgsExecutionStates.h"
7 
8 // Event slots management -------------------------------------------------
10 class EventSlot
11 {
12 public:
13  EventSlot( unsigned int numberOfAlgorithms, unsigned int numberOfControlFlowNodes, SmartIF<IMessageSvc> MS )
14  : eventContext( nullptr )
15  , algsStates( numberOfAlgorithms, MS )
16  , complete( false )
17  , controlFlowState( numberOfControlFlowNodes, -1 )
18  , entryPoint( "" )
19  , parentSlot( nullptr ){};
20 
22 
24  EventSlot( EventSlot& original, EventContext* theeventContext )
25  : eventContext( theeventContext )
26  , algsStates( original.algsStates )
27  , complete( false )
29  , entryPoint( "" )
30  , parentSlot( &original ){};
31 
33  void reset( EventContext* theeventContext )
34  {
35  eventContext = theeventContext;
36  algsStates.reset();
37  complete = false;
40  entryPoint = "";
41  parentSlot = nullptr;
44  };
45 
51  bool complete;
64 };
65 
66 #endif /* EVENTSLOT_H_ */
EventSlot(unsigned int numberOfAlgorithms, unsigned int numberOfControlFlowNodes, SmartIF< IMessageSvc > MS)
Definition: EventSlot.h:13
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:49
EventContext * eventContext
Cache for the eventContext.
Definition: EventSlot.h:44
std::string entryPoint
Name of the node this slot is attached to ("" for top level)
Definition: EventSlot.h:57
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
STL class.
STL class.
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:53
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:59
bool complete
Flags completion of the event.
Definition: EventSlot.h:51
T clear(T...args)
std::map< std::string, std::vector< unsigned int > > subSlotsByNode
Listing of sub-slots by the node (name) they are attached to.
Definition: EventSlot.h:55
T size(T...args)
T assign(T...args)
std::vector< EventSlot > allSubSlots
Actual sub-slot instances.
Definition: EventSlot.h:63
void reset(EventContext *theeventContext)
Reset all resources in order to reuse the slot.
Definition: EventSlot.h:33
Class representing the event slot.
Definition: EventSlot.h:10
std::map< EventContext *, unsigned int > contextToSlot
Quick lookup for sub-slots by event context (top level only)
Definition: EventSlot.h:61
EventSlot(EventSlot &original, EventContext *theeventContext)
Copy a slot as a subslot with a new context.
Definition: EventSlot.h:24
~EventSlot()
Definition: EventSlot.h:21