The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
IScheduler.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
15#include <chrono>
16#include <functional>
17#include <memory>
18#include <vector>
19
28class GAUDI_API IScheduler : virtual public IInterface {
29public:
32
34 virtual StatusCode pushNewEvent( EventContext* eventContext ) = 0;
35
38 virtual StatusCode pushNewEvents( std::vector<EventContext*>& eventContexts ) = 0;
39
41 virtual StatusCode popFinishedEvent( EventContext*& eventContext ) = 0;
42
44 virtual StatusCode tryPopFinishedEvent( EventContext*& eventContext ) = 0;
45
47 virtual unsigned int freeSlots() = 0;
48
49 virtual void dumpState() {}
50
52 virtual StatusCode scheduleEventView( const EventContext* sourceContext, const std::string& nodeName,
53 std::unique_ptr<EventContext> viewContext ) = 0;
54
59 std::chrono::system_clock::time_point time;
60 std::vector<std::vector<int>> states;
61 };
62 virtual void recordOccupancy( int samplePeriod, std::function<void( OccupancySnapshot )> callback ) = 0;
63};
#define GAUDI_API
Definition Kernel.h:49
This class represents an entry point to all the event specific data.
Definition of the basic interface.
Definition IInterface.h:225
General interface for algorithm scheduler.
Definition IScheduler.h:28
DeclareInterfaceID(IScheduler, 1, 0)
InterfaceID.
virtual StatusCode pushNewEvents(std::vector< EventContext * > &eventContexts)=0
Make a list of events available to the scheduler This method makes a bunch creation of new events ato...
virtual unsigned int freeSlots()=0
Get the free event processing slots.
virtual StatusCode pushNewEvent(EventContext *eventContext)=0
Make an event available to the scheduler.
virtual StatusCode popFinishedEvent(EventContext *&eventContext)=0
Retrieve a finished event from the scheduler.
virtual StatusCode scheduleEventView(const EventContext *sourceContext, const std::string &nodeName, std::unique_ptr< EventContext > viewContext)=0
Method to inform the scheduler about event views.
virtual void recordOccupancy(int samplePeriod, std::function< void(OccupancySnapshot)> callback)=0
virtual StatusCode tryPopFinishedEvent(EventContext *&eventContext)=0
Try to retrieve a finished event from the scheduler.
virtual void dumpState()
Definition IScheduler.h:49
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
Sample occupancy at fixed interval (ms) Negative value to deactivate, 0 to snapshot every change Each...
Definition IScheduler.h:58
std::vector< std::vector< int > > states
Definition IScheduler.h:60
std::chrono::system_clock::time_point time
Definition IScheduler.h:59