CbmRoot
Loading...
Searching...
No Matches
CbmHistoServer.h
Go to the documentation of this file.
1/* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef FAIRMQEXHISTOSERVER
6#define FAIRMQEXHISTOSERVER
7
8#include "FairMQDevice.h"
9
10#include "THttpServer.h"
11#include "TObjArray.h"
12#include <thread>
13
14#include <memory>
15#include <string>
16
17//class FairMQExHistoCanvasDrawer;
18
19class CbmHistoServer : public FairMQDevice {
20public:
22
23
24 virtual ~CbmHistoServer();
25
26 void UpdateHttpServer();
27
28 /*
29 void SetCanvasDrawer(std::unique_ptr<FairMQExHistoCanvasDrawer> canvasDrawer)
30 {
31 fCanvasDrawer = std::move(canvasDrawer);
32 }
33*/
34
35protected:
36 virtual void InitTask();
37
38 bool ReceiveData(FairMQMessagePtr& msg, int index);
39
40 virtual void PreRun();
41
42 virtual void PostRun();
43
44private:
45 std::string fInputChannelName;
46
47 TObjArray fArrayHisto;
48
50
51 THttpServer fServer;
52
53 // std::unique_ptr<FairMQExHistoCanvasDrawer> fCanvasDrawer;
54
55 std::thread fThread;
57
58 int FindHistogram(const std::string& name);
59};
60
61#endif
virtual ~CbmHistoServer()
virtual void PostRun()
THttpServer fServer
virtual void InitTask()
TObjArray fArrayHisto
std::string fInputChannelName
std::thread fThread
virtual void PreRun()
int FindHistogram(const std::string &name)
bool ReceiveData(FairMQMessagePtr &msg, int index)