CbmRoot
Loading...
Searching...
No Matches
services/histserv/app/main.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Pierre-Alain Loizeau [committer] */
4
#include "
Application.h
"
5
#include "
ProgramOptions.h
"
6
7
#include <Logger.h>
8
9
#include <csignal>
10
11
namespace
12
{
13
volatile
sig_atomic_t signal_status = 0;
14
}
15
16
static
void
signal_handler
(
int
sig) { signal_status = sig; }
17
18
using namespace
cbm::services::histserv
;
19
20
int
main
(
int
argc,
char
* argv[])
21
{
22
std::signal(SIGINT,
signal_handler
);
23
std::signal(SIGTERM,
signal_handler
);
24
25
LOG(info) <<
"***** Histogram server without FairMQ *****"
;
26
try
{
27
ProgramOptions
opt(argc, argv);
28
Application
app(opt, &signal_status);
29
app.Exec();
30
}
31
catch
(std::exception
const
& e) {
32
LOG(error) << e.what() <<
"; terminating."
;
33
return
EXIT_FAILURE;
34
}
35
36
LOG(info) <<
"Histogram server without FairMQ: Program completed successfully; exiting."
;
37
return
EXIT_SUCCESS;
38
}
Application
Main class of the "cbmreco_fairrun" application.
Definition
reco/app/cbmreco_fairrun/Application.h:24
ProgramOptions
Program options class for the "cbmreco_fairrun" application.
Definition
reco/app/cbmreco_fairrun/ProgramOptions.h:28
cbm::services::histserv
Definition
services/histserv/app/Application.h:26
Application.h
ProgramOptions.h
main
int main(int argc, char *argv[])
Definition
services/histserv/app/main.cxx:20
signal_handler
static void signal_handler(int sig)
Definition
services/histserv/app/main.cxx:16
services
histserv
app
main.cxx
Generated on Sun Dec 22 2024 23:04:05 for CbmRoot by
1.12.0