5#ifndef CBM_SERVICES_HISTSERV_APP_APPLICATION_H
6#define CBM_SERVICES_HISTSERV_APP_APPLICATION_H 1
10#include "THttpServer.h"
15#include <forward_list>
72 template<
class HistoDst,
class HistoSrc>
79 template<
class HistoSrc>
142 std::vector<std::pair<TNamed*, std::string>>
fvHistos = {};
145 std::vector<std::pair<TCanvas*, std::string>>
fvCanvas = {};
ROOT-free implementation of a histogram.
void operator=(const Application &)=delete
Assignment operator forbidden.
bool fbAllHistosRegistered
uint32_t fNMessages
Internal status.
bool ReadHistogram(const HistoSrc &rHist)
Read a histogram.
bool SaveHistograms()
Saves handled histograms.
bool ReceiveCanvasConfig(zmq::message_t &msg)
Receives canvas configuration.
int FindHistogram(const std::string &name)
Collects histograms of the same type from the histogram list.
ProgramOptions const & fOpt
A handler for system signals.
std::vector< std::pair< TCanvas *, std::string > > fvCanvas
Vector of Canvas pointers and folder path.
std::vector< bool > fvbCanvasReady
Application(const Application &)=delete
Copy constructor forbidden.
TObjArray fArrayHisto
Array of histograms with unique names.
std::vector< bool > fvbCanvasRegistered
volatile sig_atomic_t * fSignalStatus
Global signal status.
bool RegisterHistoConfig(const std::pair< std::string, std::string > &config)
Register a histogram config in the histogram server.
bool ReadHistogramExtendedTsId(const HistoSrc &pHistSrc, uint64_t tsIndex)
Reads a histogram slice for an extended histogram with the TS ID.
std::vector< std::pair< TNamed *, std::string > > fvHistos
Vector of Histos pointers and folder path.
bool ReceiveData(zmq::message_t &msg)
Find histogram index in the histogram array.
Application(ProgramOptions const &opt, volatile sig_atomic_t *signalStatus)
Standard constructor, initialises the application.
bool PrepareCanvas(uint32_t uCanvIdx)
Prepares canvases using received canvas configuration.
std::vector< std::pair< std::string, std::string > > fvpsCanvasConfig
bool fbAllCanvasRegistered
std::vector< bool > fvbHistoRegistered
bool ResetHistograms()
Resets handled histograms.
void Exec()
Run the application.
THttpServer * fServer
ROOT Histogram server (JSroot)
bool ReceiveConfigAndData(std::vector< zmq::message_t > &vMsg)
Receives a list of canvases and histograms.
bool RegisterHistogram(const TNamed *hist)
Register a histogram in the histogram server.
~Application()
Destructor.
bool ReceiveHistoConfig(zmq::message_t &msg)
Receives histogram configuration.
std::vector< std::pair< std::string, std::string > > fvpsHistosFolder
Vector of string with ( HistoName, FolderPath ) to configure the histogram.
std::unique_ptr< UiCmdActor > fUiCmdActor
zmq::context_t fZmqContext
Interface.
Application configuarion.
int fNofTsToStore
Number of consequent timeslices to store.