12#ifndef ALICEO2_MERGER_TEST_COMMON_H_
13#define ALICEO2_MERGER_TEST_COMMON_H_
24 return gsl::span(histo.GetArray(), histo.GetSize());
30 if (*success ==
false) {
31 LOG(fatal) <<
"Received an EndOfStream without having received the expected object";
35 if (*success ==
false) {
36 LOG(fatal) <<
"STOP transition without having received the expected object";
40 if (*success ==
false) {
41 LOG(fatal) <<
"EXIT transition without having received the expected object";
51template <
typename T,
size_t Size>
52inline std::string
to_string(gsl::span<T, Size> span)
54 std::stringstream ss{};
55 for (
size_t i = 0;
auto v : span) {
57 if (++
i != span.size()) {
61 return std::move(ss).str();
65inline std::string
to_string(
const std::array<float, Size>& arr)
75template <
typename Deleter>
76inline std::string
to_string(
const std::unique_ptr<const TH1F, Deleter>& histo_ptr)
93template <
typename Deleter>
94inline std::string
to_string(
const std::unique_ptr<
const std::vector<TObject*>, Deleter>& histos)
97 for (
size_t i = 0;
const auto& histo : *histos) {
99 res.append(
to_string(*
dynamic_cast<TH1F const*
>(histo)));
@ ExitRequested
Invoked when the device was requested to stop.
void registerCallbacksForTestFailure(framework::CallbackService &cb, std::shared_ptr< bool > success)
auto to_span(const TH1F &histo)
Defining DataPointCompositeObject explicitly as copiable.
std::string to_string(gsl::span< T, Size > span)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"