CbmRoot
Loading...
Searching...
No Matches
Server.h
Go to the documentation of this file.
1
/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Felix Weiglhofer [committer] */
4
#pragma once
5
6
#include <Rtypes.h>
7
#include <TNamed.h>
8
9
#include <memory>
10
11
#include "
HistogramCollection.h
"
12
#include "
RecoResultsInputArchive.h
"
13
14
class
THttpServer;
15
class
TH1;
16
class
TH1F;
17
class
TH1I;
18
19
namespace
cbm::explore
20
{
21
22
class
Server
:
public
TNamed {
23
24
public
:
25
struct
Settings
{
26
int
port
;
27
std::optional<uint32_t>
sensor
;
// optional sensor to filter on
28
std::shared_ptr<algo::RecoResultsInputArchive>
archive
;
29
std::shared_ptr<HistogramCollection>
histograms
;
30
31
// Optional second archive and histograms for comparison
32
// histograms will be divided by this one, if provided
33
std::shared_ptr<algo::RecoResultsInputArchive>
archive2
;
34
std::shared_ptr<HistogramCollection>
histograms2
;
35
};
36
37
Server
(
Settings
settings);
38
39
virtual
~Server
();
40
41
int
Run
();
42
43
// Server commands
44
void
RequestNextTS
() {
fRequestNextTS
=
true
; }
45
46
private
:
47
static
constexpr
int
SleepPerTick_ms
= 50;
48
49
// Internal state
50
THttpServer*
fServer
=
nullptr
;
51
Settings
fS
;
52
53
// Server commands
54
bool
fRequestNextTS
=
false
;
55
56
void
NextTS
();
57
58
ClassDef
(
Server
, 1);
59
};
60
61
}
// namespace cbm::explore
HistogramCollection.h
RecoResultsInputArchive.h
cbm::explore::Server
Definition
Server.h:22
cbm::explore::Server::fServer
THttpServer * fServer
Definition
Server.h:50
cbm::explore::Server::Server
Server(Settings settings)
Definition
Server.cxx:18
cbm::explore::Server::~Server
virtual ~Server()
Definition
Server.cxx:67
cbm::explore::Server::SleepPerTick_ms
static constexpr int SleepPerTick_ms
Definition
Server.h:47
cbm::explore::Server::Run
int Run()
Definition
Server.cxx:69
cbm::explore::Server::NextTS
void NextTS()
Definition
Server.cxx:97
cbm::explore::Server::fRequestNextTS
bool fRequestNextTS
Definition
Server.h:54
cbm::explore::Server::ClassDef
ClassDef(Server, 1)
cbm::explore::Server::fS
Settings fS
Definition
Server.h:51
cbm::explore::Server::RequestNextTS
void RequestNextTS()
Definition
Server.h:44
cbm::explore
Definition
services/archive_explorer/app/Application.h:11
cbm::explore::Server::Settings
Definition
Server.h:25
cbm::explore::Server::Settings::histograms2
std::shared_ptr< HistogramCollection > histograms2
Definition
Server.h:34
cbm::explore::Server::Settings::histograms
std::shared_ptr< HistogramCollection > histograms
Definition
Server.h:29
cbm::explore::Server::Settings::archive
std::shared_ptr< algo::RecoResultsInputArchive > archive
Definition
Server.h:28
cbm::explore::Server::Settings::port
int port
Definition
Server.h:26
cbm::explore::Server::Settings::sensor
std::optional< uint32_t > sensor
Definition
Server.h:27
cbm::explore::Server::Settings::archive2
std::shared_ptr< algo::RecoResultsInputArchive > archive2
Definition
Server.h:33
services
archive_explorer
lib
Server.h
Generated on Sun Dec 22 2024 23:04:18 for CbmRoot by
1.12.0