CbmRoot
Loading...
Searching...
No Matches
cbm::services::histserv::ProgramOptions Class Reference

#include <ProgramOptions.h>

Collaboration diagram for cbm::services::histserv::ProgramOptions:
[legend]

Public Member Functions

 ProgramOptions (int argc, char *argv[])
 Standard constructor with command line arguments.
 
 ProgramOptions (const ProgramOptions &)=default
 Copy constructor forbidden.
 
ProgramOptionsoperator= (const ProgramOptions &)=default
 Assignment operator forbidden.
 
 ~ProgramOptions ()=default
 Destructor.
 
const std::string & ComChan () const
 Get interface channel name or hostname + port or whatever or ????? (FIXME: replacement of FairMQ)
 
const int32_t & ComChanZmqRcvHwm () const
 Get receive High-Water Mark for interface channel.
 
const int32_t & ComChanZmqRcvTo () const
 Get receive timeout for interface channel.
 
const uint32_t & HttpPort () const
 Get histo server http port.
 
const std::string & HistoFile () const
 Get output file name (.root format)
 
bool Overwrite () const
 Get overwrite option.
 
bool HideGuiCommands () const
 Get overwrite option.
 
bool CompressedInput () const
 Get compressed input option.
 

Private Member Functions

void ParseOptions (int argc, char *argv[])
 Get configuration file name (YAML format)
 

Private Attributes

std::string fsChanHistosIn = "tcp://127.0.0.1:56800"
 
int32_t fiHistosInZmqHwm = 1
 High-Water Mark, default keep only 1 update in buffer.
 
int32_t fiHistosInZmqRcvToMs = 10
 Timeout in ms: -1 = block, 0 = instant, val = nb ms.
 
uint32_t fuHttpServerPort = 8080
 HTTP port of the ROOT web server.
 
std::string fsHistoFileName = "histos_dump.root"
 Output file name (ROOT format)
 
bool fOverwrite = false
 Enable overwriting of existing output file.
 
bool fHideGuiCommands = false
 Hides (disables) the GUI commands for Reset/Save/Close.
 
bool fCompressedInput = false
 Enables ZSTD stream decompression is available.
 

Detailed Description

Author
Pierre-Alain Loizeau p.-a..nosp@m.loiz.nosp@m.eau@g.nosp@m.si.d.nosp@m.e
Since
26 June 2023

Program option class for the application histserv_nofairmq

Definition at line 20 of file services/histserv/app/ProgramOptions.h.

Constructor & Destructor Documentation

◆ ProgramOptions() [1/2]

cbm::services::histserv::ProgramOptions::ProgramOptions ( int argc,
char * argv[] )
inline

Standard constructor with command line arguments.

Definition at line 23 of file services/histserv/app/ProgramOptions.h.

References ParseOptions().

◆ ProgramOptions() [2/2]

cbm::services::histserv::ProgramOptions::ProgramOptions ( const ProgramOptions & )
default

Copy constructor forbidden.

◆ ~ProgramOptions()

cbm::services::histserv::ProgramOptions::~ProgramOptions ( )
default

Destructor.

Member Function Documentation

◆ ComChan()

const std::string & cbm::services::histserv::ProgramOptions::ComChan ( ) const
inlinenodiscard

Get interface channel name or hostname + port or whatever or ????? (FIXME: replacement of FairMQ)

Definition at line 35 of file services/histserv/app/ProgramOptions.h.

References fsChanHistosIn.

Referenced by cbm::services::histserv::Application::Application().

◆ ComChanZmqRcvHwm()

const int32_t & cbm::services::histserv::ProgramOptions::ComChanZmqRcvHwm ( ) const
inlinenodiscard

Get receive High-Water Mark for interface channel.

Definition at line 38 of file services/histserv/app/ProgramOptions.h.

References fiHistosInZmqHwm.

Referenced by cbm::services::histserv::Application::Application().

◆ ComChanZmqRcvTo()

const int32_t & cbm::services::histserv::ProgramOptions::ComChanZmqRcvTo ( ) const
inlinenodiscard

Get receive timeout for interface channel.

Definition at line 41 of file services/histserv/app/ProgramOptions.h.

References fiHistosInZmqRcvToMs.

Referenced by cbm::services::histserv::Application::Application().

◆ CompressedInput()

◆ HideGuiCommands()

bool cbm::services::histserv::ProgramOptions::HideGuiCommands ( ) const
inlinenodiscard

Get overwrite option.

Definition at line 53 of file services/histserv/app/ProgramOptions.h.

References fHideGuiCommands.

Referenced by cbm::services::histserv::Application::Application().

◆ HistoFile()

const std::string & cbm::services::histserv::ProgramOptions::HistoFile ( ) const
inlinenodiscard

◆ HttpPort()

const uint32_t & cbm::services::histserv::ProgramOptions::HttpPort ( ) const
inlinenodiscard

Get histo server http port.

Definition at line 44 of file services/histserv/app/ProgramOptions.h.

References fuHttpServerPort.

Referenced by cbm::services::histserv::Application::Application().

◆ operator=()

ProgramOptions & cbm::services::histserv::ProgramOptions::operator= ( const ProgramOptions & )
default

Assignment operator forbidden.

◆ Overwrite()

bool cbm::services::histserv::ProgramOptions::Overwrite ( ) const
inlinenodiscard

◆ ParseOptions()

void ProgramOptions::ParseOptions ( int argc,
char * argv[] )
private

Get configuration file name (YAML format)

Parse command line arguments using boost program_options

Definition at line 21 of file services/histserv/app/ProgramOptions.cxx.

References fCompressedInput, fHideGuiCommands, fiHistosInZmqHwm, fiHistosInZmqRcvToMs, fOverwrite, fsChanHistosIn, fsHistoFileName, and fuHttpServerPort.

Referenced by ProgramOptions().

Member Data Documentation

◆ fCompressedInput

bool cbm::services::histserv::ProgramOptions::fCompressedInput = false
private

Enables ZSTD stream decompression is available.

Definition at line 74 of file services/histserv/app/ProgramOptions.h.

Referenced by CompressedInput(), and ParseOptions().

◆ fHideGuiCommands

bool cbm::services::histserv::ProgramOptions::fHideGuiCommands = false
private

Hides (disables) the GUI commands for Reset/Save/Close.

Definition at line 73 of file services/histserv/app/ProgramOptions.h.

Referenced by HideGuiCommands(), and ParseOptions().

◆ fiHistosInZmqHwm

int32_t cbm::services::histserv::ProgramOptions::fiHistosInZmqHwm = 1
private

High-Water Mark, default keep only 1 update in buffer.

Definition at line 68 of file services/histserv/app/ProgramOptions.h.

Referenced by ComChanZmqRcvHwm(), and ParseOptions().

◆ fiHistosInZmqRcvToMs

int32_t cbm::services::histserv::ProgramOptions::fiHistosInZmqRcvToMs = 10
private

Timeout in ms: -1 = block, 0 = instant, val = nb ms.

Definition at line 69 of file services/histserv/app/ProgramOptions.h.

Referenced by ComChanZmqRcvTo(), and ParseOptions().

◆ fOverwrite

bool cbm::services::histserv::ProgramOptions::fOverwrite = false
private

Enable overwriting of existing output file.

Definition at line 72 of file services/histserv/app/ProgramOptions.h.

Referenced by Overwrite(), and ParseOptions().

◆ fsChanHistosIn

std::string cbm::services::histserv::ProgramOptions::fsChanHistosIn = "tcp://127.0.0.1:56800"
private

Definition at line 67 of file services/histserv/app/ProgramOptions.h.

Referenced by ComChan(), and ParseOptions().

◆ fsHistoFileName

std::string cbm::services::histserv::ProgramOptions::fsHistoFileName = "histos_dump.root"
private

Output file name (ROOT format)

Definition at line 71 of file services/histserv/app/ProgramOptions.h.

Referenced by HistoFile(), and ParseOptions().

◆ fuHttpServerPort

uint32_t cbm::services::histserv::ProgramOptions::fuHttpServerPort = 8080
private

HTTP port of the ROOT web server.

Definition at line 70 of file services/histserv/app/ProgramOptions.h.

Referenced by HttpPort(), and ParseOptions().


The documentation for this class was generated from the following files: