The Gaudi Framework
master (bdbe7744)
Toggle main menu visibility
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
13
#include <
GaudiKernel/EventContext.h
>
14
#include <
GaudiKernel/IInterface.h
>
15
#include <chrono>
16
#include <functional>
17
#include <memory>
18
#include <vector>
19
28
class
GAUDI_API
IScheduler
:
virtual
public
IInterface
{
29
public
:
31
DeclareInterfaceID
(
IScheduler
, 1, 0 );
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
58
struct
OccupancySnapshot
{
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
};
EventContext.h
IInterface.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:35
IInterface
Definition of the basic interface.
Definition
IInterface.h:225
IScheduler
General interface for algorithm scheduler.
Definition
IScheduler.h:28
IScheduler::DeclareInterfaceID
DeclareInterfaceID(IScheduler, 1, 0)
InterfaceID.
IScheduler::pushNewEvents
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...
IScheduler::freeSlots
virtual unsigned int freeSlots()=0
Get the free event processing slots.
IScheduler::pushNewEvent
virtual StatusCode pushNewEvent(EventContext *eventContext)=0
Make an event available to the scheduler.
IScheduler::popFinishedEvent
virtual StatusCode popFinishedEvent(EventContext *&eventContext)=0
Retrieve a finished event from the scheduler.
IScheduler::scheduleEventView
virtual StatusCode scheduleEventView(const EventContext *sourceContext, const std::string &nodeName, std::unique_ptr< EventContext > viewContext)=0
Method to inform the scheduler about event views.
IScheduler::recordOccupancy
virtual void recordOccupancy(int samplePeriod, std::function< void(OccupancySnapshot)> callback)=0
IScheduler::tryPopFinishedEvent
virtual StatusCode tryPopFinishedEvent(EventContext *&eventContext)=0
Try to retrieve a finished event from the scheduler.
IScheduler::dumpState
virtual void dumpState()
Definition
IScheduler.h:49
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
IScheduler::OccupancySnapshot
Sample occupancy at fixed interval (ms) Negative value to deactivate, 0 to snapshot every change Each...
Definition
IScheduler.h:58
IScheduler::OccupancySnapshot::states
std::vector< std::vector< int > > states
Definition
IScheduler.h:60
IScheduler::OccupancySnapshot::time
std::chrono::system_clock::time_point time
Definition
IScheduler.h:59
GaudiKernel
include
GaudiKernel
IScheduler.h
Generated on
for The Gaudi Framework by
1.17.0