GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGRSIServer.h
Go to the documentation of this file.
1#ifndef TGRSISERVER_H
2#define TGRSISERVER_H
3
4/** \addtogroup Sorting
5 * @{
6 */
7
8/*
9 * Author: P.C. Bender, <pcbend@gmail.com>
10 *
11 * Please indicate changes with your initials.
12 *
13 *
14 */
15
16////////////////////////////////////////////////////////////////////////////////
17///
18/// \class TGRSIServer
19///
20/// A class to allow 'things' to communicate
21/// with GRSISort in a somewhat nice convenient and
22/// friendly way.
23///
24////////////////////////////////////////////////////////////////////////////////
25
26#include "TServerSocket.h"
27#include "TMonitor.h"
28
29class TGRSIServer : public TServerSocket {
30public:
31 static TGRSIServer* instance(int port = 9099);
32 TGRSIServer(const TGRSIServer&) = default;
33 TGRSIServer(TGRSIServer&&) noexcept = default;
34 TGRSIServer& operator=(const TGRSIServer&) = default;
35 TGRSIServer& operator=(TGRSIServer&&) noexcept = default;
37
39 {
40 if(fRunning) { fRunning = false; }
41 }
42
43private:
45 explicit TGRSIServer(int port);
46 bool fRunning{false};
47
48 TMonitor* fMonitor{nullptr};
49
52
53 /// \cond CLASSIMP
54 ClassDefOverride(TGRSIServer, 0) // NOLINT(readability-else-after-return)
55 /// \endcond
56};
57/*! @} */
58#endif
TMonitor * fMonitor
Definition TGRSIServer.h:48
TGRSIServer(TGRSIServer &&) noexcept=default
void StopServer()
Definition TGRSIServer.h:38
static TGRSIServer * instance(int port=9099)
static TGRSIServer * fGRSIServer
Definition TGRSIServer.h:44
TGRSIServer(const TGRSIServer &)=default
void AcceptConnectionThread()
void MonitorConnectionsThread()
TGRSIServer(int port)