CbmRoot
Loading...
Searching...
No Matches
QaManager.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
13#include "algo/base/SubChain.h"
14#include "algo/qa/QaData.h"
15
16namespace cbm::algo::qa
17{
20 class Manager : public SubChain {
21 public:
24 Manager(std::shared_ptr<HistogramSender> histoSender = nullptr);
25
27 Manager(const Manager&) = delete;
28
30 Manager(Manager&&) = delete;
31
33 ~Manager() = default;
34
36 Manager& operator=(const Manager&) = delete;
37
40
42 std::shared_ptr<Data> GetData() const { return fpData; }
43
45 void Init();
46
49 void SendHistograms();
50
53 void SetTimesliceId(uint64_t timesliceId) { fpData->SetTimesliceId(timesliceId); }
54
61 void WriteHistograms(const std::string& filename, bool compress) const;
62
65 void SetTimesliceTimeInRun(uint64_t timesliceTime) { fpData->SetTimesliceTimeInRun(timesliceTime); }
66
67 private:
68 std::shared_ptr<HistogramSender> fpSender{nullptr};
69 std::shared_ptr<Data> fpData{std::make_shared<Data>()};
70 };
71} // namespace cbm::algo::qa
A unified data-structure to handle QA objects for the online reconstruction.
Manager & operator=(Manager &&)=delete
Move assignment operator.
void Init()
Initializes the instance and sends the histogram and canvas configuration to the server.
Definition QaManager.cxx:24
void SendHistograms()
Sends a collection of histograms to the server.
Definition QaManager.cxx:28
Manager(std::shared_ptr< HistogramSender > histoSender=nullptr)
Constructor.
Definition QaManager.cxx:20
Manager(Manager &&)=delete
Move constructor.
void SetTimesliceTimeInRun(uint64_t timesliceTime)
Sets a timeslice start time relative to run start time.
Definition QaManager.h:65
std::shared_ptr< HistogramSender > fpSender
Histogram sender.
Definition QaManager.h:68
std::shared_ptr< Data > GetData() const
Gets an instance of QA data.
Definition QaManager.h:42
std::shared_ptr< Data > fpData
Instance of QA Data.
Definition QaManager.h:69
~Manager()=default
Destructor.
void WriteHistograms(const std::string &filename, bool compress) const
Writes histograms.
Definition QaManager.cxx:32
Manager(const Manager &)=delete
Copy constructor.
Manager & operator=(const Manager &)=delete
Copy assignment operator.
void SetTimesliceId(uint64_t timesliceId)
Sets a timeslice index.
Definition QaManager.h:53