Project
Loading...
Searching...
No Matches
LifetimeHelpers.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef O2_FRAMEWORK_LIFETIMEHELPERS_H_
12#define O2_FRAMEWORK_LIFETIMEHELPERS_H_
13
15#include "Framework/PartRef.h"
16#include "InputRoute.h"
17
18#include <chrono>
19#include <functional>
20#include <string>
21
22namespace o2::framework
23{
24
26struct DeviceState;
27
38 static ExpirationHandler::Creator enumDrivenCreation(size_t first, size_t last, size_t step, size_t inputTimeslice, size_t maxTimeSliceId, size_t repetitions);
39
43 static ExpirationHandler::Creator timeDrivenCreation(std::vector<std::chrono::microseconds> periods, std::vector<std::chrono::seconds> intervals, std::function<bool(void)> hasTimerFired, std::function<void(uint64_t, uint64_t)> updateTimerPeriod);
44
47
56 static ExpirationHandler::Checker expireIfPresent(std::vector<InputRoute> const& schema, ConcreteDataMatcher matcher);
57
60 static ExpirationHandler::Checker expireTimed(std::chrono::microseconds period);
61
66
69 static ExpirationHandler::Checker expectCTP(std::string const& serverUrl, bool waitForCTP);
75 std::string const& prefix,
76 std::string const& overrideTimestamp,
77 std::string const& sourceChannel);
78
83 std::string const& channelName);
84
89
94
101 static ExpirationHandler::Handler enumerate(ConcreteDataMatcher const& spec, std::string const& sourceChannel,
102 int64_t orbitOffset, int64_t orbitMultiplier);
103
106 static ExpirationHandler::Handler dummy(ConcreteDataMatcher const& spec, std::string const& sourceChannel);
107};
108
109std::ostream& operator<<(std::ostream& oss, Lifetime const& val);
110
111} // namespace o2::framework
112
113#endif // O2_FRAMEWORK_LIFETIMEHELPERS_H_
std::shared_ptr< arrow::Schema > schema
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
SurfaceTrackState state
GLint first
Definition glcorearb.h:399
GLuint GLfloat * val
Definition glcorearb.h:1582
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::ostream & operator<<(std::ostream &s, ChannelType const &type)
Stream operators so that we can use ChannelType with Boost.Test.
Lifetime
Possible Lifetime of objects being exchanged by the DPL.
Definition Lifetime.h:18
Running state information of a given device.
Definition DeviceState.h:34
std::function< bool(ServiceRegistryRef, uint64_t timestamp, InputSpan const &record)> Checker
Callback type to check if the record must be expired.
std::function< void(ServiceRegistryRef, PartRef &expiredInput, data_matcher::VariableContext &variables)> Handler
Callback type to actually materialise a given record.
std::function< TimesliceSlot(ServiceRegistryRef, ChannelIndex)> Creator
static ExpirationHandler::Handler fetchFromCCDBCache(InputSpec const &spec, std::string const &prefix, std::string const &overrideTimestamp, std::string const &sourceChannel)
static ExpirationHandler::Handler dummy(ConcreteDataMatcher const &spec, std::string const &sourceChannel)
Create a dummy message with the provided ConcreteDataMatcher.
static ExpirationHandler::Handler fetchFromQARegistry()
static ExpirationHandler::Creator enumDrivenCreation(size_t first, size_t last, size_t step, size_t inputTimeslice, size_t maxTimeSliceId, size_t repetitions)
static ExpirationHandler::Handler enumerate(ConcreteDataMatcher const &spec, std::string const &sourceChannel, int64_t orbitOffset, int64_t orbitMultiplier)
Enumerate entries on every invokation.
static ExpirationHandler::Creator timeDrivenCreation(std::vector< std::chrono::microseconds > periods, std::vector< std::chrono::seconds > intervals, std::function< bool(void)> hasTimerFired, std::function< void(uint64_t, uint64_t)> updateTimerPeriod)
static ExpirationHandler::Creator dataDrivenCreation()
Callback which does nothing, waiting for data to arrive.
static ExpirationHandler::Checker expireAlways()
static ExpirationHandler::Handler fetchFromObjectRegistry()
static ExpirationHandler::Checker expectCTP(std::string const &serverUrl, bool waitForCTP)
static ExpirationHandler::Checker expireNever()
static ExpirationHandler::Creator uvDrivenCreation(int loopReason, DeviceState &state)
Callback which creates a new timeslice whenever some libuv event happens.
static ExpirationHandler::Handler fetchFromFairMQ(InputSpec const &spec, std::string const &channelName)
static ExpirationHandler::Handler doNothing()
static ExpirationHandler::Checker expireIfPresent(std::vector< InputRoute > const &schema, ConcreteDataMatcher matcher)
static ExpirationHandler::Checker expireTimed(std::chrono::microseconds period)