CbmRoot
Loading...
Searching...
No Matches
ApplicationParameter Struct Reference

Class to parse and store command-line arguments. More...

#include <ApplicationParameter.h>

Public Member Functions

 ApplicationParameter (int argc, char *argv[])
 Constructor: Parses command-line arguments.
 
const std::string & GetOutput () const
 Returns the output ROOT file path.
 
const std::string & GetConfig () const
 Returns the YAML configuration file path.
 
const std::string & GetBuilddir () const
 Returns the CBMROOT build directory path.
 
const std::string & GetOption () const
 Returns the option for comparison and canvas handling.
 
const std::vector< std::string > & GetNames () const
 Returns the list of commit hashes or week numbers.
 
ETestType GetCompare () const
 Returns the selected comparison type.
 
 ApplicationParameter (int argc, char *argv[])
 Construction parses argv immediately; throws std::runtime_error on error.
 

Public Attributes

std::string qaFile
 input ROOT file
 
std::string setup
 setup tag
 
std::string outDir = "./report"
 where figures & script will go
 
std::string engine = "latex"
 html | latex | beamer
 
std::string figExt = "png"
 png | svg | pdf
 
bool ignoreSame = false
 ignore "same" results in comparison tables
 

Private Member Functions

void ParseCommandLine (int argc, char *argv[])
 Parses command-line arguments.
 
void ParseCommandLine (int argc, char *argv[])
 

Private Attributes

std::string fOutput
 A path to the output root file.
 
std::string fConfig
 A path to the YAML configuration file.
 
std::string fBuilddir
 A path to CBMROOT build directory.
 
std::string fOption
 An option to select the comparision methods and canvas handling using core::Process()
 
std::vector< std::string > fNames
 List of commit hashes or week numbers (yyyy_ww)
 
ETestType fCompare = ETestType::NotDefined
 selected comparision type
 

Detailed Description

Class to parse and store command-line arguments.

Simple wrapper for command-line parameters used by the qareport tool. Positional arguments: 1) qa-file - QA ROOT file (required) 2) setup - setup tag (required) 3) out-dir - output directory (optional; default ./report)

Optional flags: -e, –engine html | latex | beamer (default latex) –fig-ext png | svg | pdf (default png) -h, –help show usage and exit

Definition at line 22 of file qa/ApplicationParameter.h.

Constructor & Destructor Documentation

◆ ApplicationParameter() [1/2]

ApplicationParameter::ApplicationParameter ( int argc,
char * argv[] )

Constructor: Parses command-line arguments.

Definition at line 14 of file qa/ApplicationParameter.cxx.

References ParseCommandLine().

◆ ApplicationParameter() [2/2]

ApplicationParameter::ApplicationParameter ( int argc,
char * argv[] )

Construction parses argv immediately; throws std::runtime_error on error.

Member Function Documentation

◆ GetBuilddir()

const std::string & ApplicationParameter::GetBuilddir ( ) const
inline

Returns the CBMROOT build directory path.

Definition at line 41 of file qa/ApplicationParameter.h.

References fBuilddir.

Referenced by Application::Application().

◆ GetCompare()

ETestType ApplicationParameter::GetCompare ( ) const
inline

Returns the selected comparison type.

Definition at line 53 of file qa/ApplicationParameter.h.

References fCompare.

Referenced by Application::Application().

◆ GetConfig()

const std::string & ApplicationParameter::GetConfig ( ) const
inline

Returns the YAML configuration file path.

Definition at line 37 of file qa/ApplicationParameter.h.

References fConfig.

Referenced by Application::Application().

◆ GetNames()

const std::vector< std::string > & ApplicationParameter::GetNames ( ) const
inline

Returns the list of commit hashes or week numbers.

Definition at line 49 of file qa/ApplicationParameter.h.

References fNames.

Referenced by Application::Application().

◆ GetOption()

const std::string & ApplicationParameter::GetOption ( ) const
inline

Returns the option for comparison and canvas handling.

Definition at line 45 of file qa/ApplicationParameter.h.

References fOption.

Referenced by Application::Application().

◆ GetOutput()

const std::string & ApplicationParameter::GetOutput ( ) const
inline

Returns the output ROOT file path.

Definition at line 33 of file qa/ApplicationParameter.h.

References fOutput.

Referenced by Application::Application().

◆ ParseCommandLine() [1/2]

void ApplicationParameter::ParseCommandLine ( int argc,
char * argv[] )
private

Parses command-line arguments.

Definition at line 17 of file qa/ApplicationParameter.cxx.

References Commit, fBuilddir, fCompare, fConfig, fNames, fOption, fOutput, and Weekly.

Referenced by ApplicationParameter().

◆ ParseCommandLine() [2/2]

void ApplicationParameter::ParseCommandLine ( int argc,
char * argv[] )
private

Member Data Documentation

◆ engine

std::string ApplicationParameter::engine = "latex"

html | latex | beamer

Definition at line 26 of file qareport/ApplicationParameter.h.

Referenced by main().

◆ fBuilddir

std::string ApplicationParameter::fBuilddir
private

A path to CBMROOT build directory.

Definition at line 64 of file qa/ApplicationParameter.h.

Referenced by GetBuilddir(), and ParseCommandLine().

◆ fCompare

ETestType ApplicationParameter::fCompare = ETestType::NotDefined
private

selected comparision type

Definition at line 67 of file qa/ApplicationParameter.h.

Referenced by GetCompare(), and ParseCommandLine().

◆ fConfig

std::string ApplicationParameter::fConfig
private

A path to the YAML configuration file.

Definition at line 63 of file qa/ApplicationParameter.h.

Referenced by GetConfig(), and ParseCommandLine().

◆ figExt

std::string ApplicationParameter::figExt = "png"

png | svg | pdf

Definition at line 27 of file qareport/ApplicationParameter.h.

Referenced by main().

◆ fNames

std::vector<std::string> ApplicationParameter::fNames
private

List of commit hashes or week numbers (yyyy_ww)

Definition at line 66 of file qa/ApplicationParameter.h.

Referenced by GetNames(), and ParseCommandLine().

◆ fOption

std::string ApplicationParameter::fOption
private

An option to select the comparision methods and canvas handling using core::Process()

Definition at line 65 of file qa/ApplicationParameter.h.

Referenced by GetOption(), and ParseCommandLine().

◆ fOutput

std::string ApplicationParameter::fOutput
private

A path to the output root file.

Definition at line 62 of file qa/ApplicationParameter.h.

Referenced by GetOutput(), and ParseCommandLine().

◆ ignoreSame

bool ApplicationParameter::ignoreSame = false

ignore "same" results in comparison tables

Definition at line 28 of file qareport/ApplicationParameter.h.

Referenced by main().

◆ outDir

std::string ApplicationParameter::outDir = "./report"

where figures & script will go

Definition at line 25 of file qareport/ApplicationParameter.h.

Referenced by main().

◆ qaFile

std::string ApplicationParameter::qaFile

input ROOT file

Definition at line 23 of file qareport/ApplicationParameter.h.

Referenced by main().

◆ setup

std::string ApplicationParameter::setup

setup tag

Definition at line 24 of file qareport/ApplicationParameter.h.

Referenced by main().


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