CbmRoot
Loading...
Searching...
No Matches
QaManager.cxx
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#include "algo/qa/QaManager.h"
11
13
17
18// ---------------------------------------------------------------------------------------------------------------------
19//
20Manager::Manager(std::shared_ptr<HistogramSender> histoSender) : fpSender(histoSender) {}
21
22// ---------------------------------------------------------------------------------------------------------------------
23//
24void Manager::Init() { fpData->Init(fpSender); }
25
26// ---------------------------------------------------------------------------------------------------------------------
27//
29
30// ---------------------------------------------------------------------------------------------------------------------
31//
32void Manager::WriteHistograms(const std::string& filename, bool compress) const
33{
34 if (fpSender == nullptr) {
35 L_(info) << "Writing histograms to file: " << filename;
36 auto compression = compress ? fles::ArchiveCompression::Zstd : fles::ArchiveCompression::None;
37 DataOutputArchive archive(filename, compression);
38 archive.put(std::make_shared<StorableData>(*fpData));
39 archive.end_stream();
40 }
41}
#define L_(level)
Archive storage handler for QaData objects.
QA manager for the online data reconstruction.
Manager(std::shared_ptr< HistogramSender > histoSender=nullptr)
Constructor.
Definition QaManager.cxx:20
Class to handle QA-objects in the online reconstruction.
Definition QaData.h:27
A central class to manage the histogram storage and sending to the histogram server.
Definition QaManager.h:20
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
std::shared_ptr< HistogramSender > fpSender
Histogram sender.
Definition QaManager.h:68
std::shared_ptr< Data > fpData
Instance of QA Data.
Definition QaManager.h:69
void WriteHistograms(const std::string &filename, bool compress) const
Writes histograms.
Definition QaManager.cxx:32
fles::OutputArchive< StorableData, StorableData, fles::ArchiveType::QaDataArchive > DataOutputArchive