CbmRoot
Loading...
Searching...
No Matches
services/histserv/tester/ProgramOptions.h
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
5#ifndef CBM_SERVICES_HISTSERV_TESTER_PROGRAMOPTIONS_H
6#define CBM_SERVICES_HISTSERV_TESTER_PROGRAMOPTIONS_H 1
7
8#include <string>
9
11{
12
20 public:
22 ProgramOptions(int argc, char* argv[]) { ParseOptions(argc, argv); }
23
25 ProgramOptions(const ProgramOptions&) = default;
26
29
31 ~ProgramOptions() = default;
32
34 [[nodiscard]] const std::string& ComChan() const { return fsChanHistosIn; }
35
37 [[nodiscard]] const int64_t& Runtime() const { return fRunTime; }
38
40 [[nodiscard]] const int64_t& PubInterval() const { return fPubInterval; }
41
42 // /** @brief Get configuration file name (YAML format) **/
43 // [[nodiscard]] const std::string& ConfigFile() const { return fConfig; }
44
45 private:
47 void ParseOptions(int argc, char* argv[]);
48
49
50 private: // members
51 std::string fsChanHistosIn = "histogram-in";
52 int64_t fRunTime = 90;
53 int64_t fPubInterval = 5;
54 };
55
56} // namespace cbm::services::histserv_tester
57
58#endif /* CBM_SERVICES_HISTSERV_TESTER_PROGRAMOPTIONS_H */
ProgramOptions(int argc, char *argv[])
Standard constructor with command line arguments.
const std::string & ComChan() const
Get interface channel name or hostname + port or whatever or ????? (FIXME: replacement of FairMQ)
ProgramOptions(const ProgramOptions &)=default
Copy constructor forbidden.
ProgramOptions & operator=(const ProgramOptions &)=default
Assignment operator forbidden.
void ParseOptions(int argc, char *argv[])
Get configuration file name (YAML format)
const int64_t & PubInterval() const
Get histos publication interval.