Warning, file /include/GaudiKernel/IScheduler.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef GAUDIKERNEL_ISCHEDULER_H
0012 #define GAUDIKERNEL_ISCHEDULER_H
0013
0014
0015 #include <GaudiKernel/EventContext.h>
0016 #include <GaudiKernel/IInterface.h>
0017
0018
0019 #include <chrono>
0020 #include <functional>
0021 #include <memory>
0022 #include <vector>
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 class GAUDI_API IScheduler : virtual public IInterface {
0033 public:
0034
0035 DeclareInterfaceID( IScheduler, 1, 0 );
0036
0037
0038 virtual StatusCode pushNewEvent( EventContext* eventContext ) = 0;
0039
0040
0041
0042 virtual StatusCode pushNewEvents( std::vector<EventContext*>& eventContexts ) = 0;
0043
0044
0045 virtual StatusCode popFinishedEvent( EventContext*& eventContext ) = 0;
0046
0047
0048 virtual StatusCode tryPopFinishedEvent( EventContext*& eventContext ) = 0;
0049
0050
0051 virtual unsigned int freeSlots() = 0;
0052
0053 virtual void dumpState() {}
0054
0055
0056 virtual StatusCode scheduleEventView( const EventContext* sourceContext, const std::string& nodeName,
0057 std::unique_ptr<EventContext> viewContext ) = 0;
0058
0059
0060
0061
0062 struct OccupancySnapshot {
0063 std::chrono::system_clock::time_point time;
0064 std::vector<std::vector<int>> states;
0065 };
0066 virtual void recordOccupancy( int samplePeriod, std::function<void( OccupancySnapshot )> callback ) = 0;
0067 };
0068 #endif