herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
HerwigCLI.h
1// -*- C++ -*-
2//
3// HerwigCLI.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef SRC_HERWIG_CLI_H
10#define SRC_HERWIG_CLI_H
11
12#include "Herwig/API/HerwigUI.h"
13#include <iostream>
14
15namespace Herwig {
16
23class HerwigCLI : public HerwigUI {
24public:
25
27 HerwigCLI(int argc, char * argv[]);
28
31
33 RunMode::Mode runMode() const { return runMode_; }
34
36 bool resume() const { return resume_; }
37
39 bool tics() const { return tics_; }
40
42 std::string tag() const { return tag_; }
43
45 std::string inputfile() const { return inputfile_; }
46
48 std::string repository() const { return repository_; }
49
51 std::string setupfile() const { return setupfile_; }
52
53 std::string integrationList() const { return integrationList_; }
54
55
56 const std::vector<std::string> &
57 prependReadDirectories() const { return prependReadDirectories_; }
58
59 const std::vector<std::string> &
60 appendReadDirectories() const { return appendReadDirectories_; }
61
62 long N() const { return N_; }
63 int seed() const { return seed_; }
64 int jobs() const { return jobs_; }
65 unsigned int jobSize() const { return jobsize_; }
66 unsigned int maxJobs() const { return maxjobs_; }
67
68 void quitWithHelp() const;
69
70 void quit() const;
71
73 virtual std::ostream& outStream() const { return std::cout; }
74
76 virtual std::ostream& errStream() const { return std::cerr; }
77
79 virtual std::istream& inStream() const { return std::cin; }
80
81private:
82
83 RunMode::Mode runMode_;
84
85 bool resume_;
86 bool tics_;
87 std::string tag_;
88
89 std::string inputfile_;
90 std::string repository_;
91 std::string setupfile_;
92
93 std::string integrationList_;
94
95 std::vector<std::string> prependReadDirectories_;
96 std::vector<std::string> appendReadDirectories_;
97
98 long N_;
99 int seed_;
100 int jobs_;
101 unsigned int jobsize_;
102 unsigned int maxjobs_;
103
104};
105
106}
107
108#endif
HerwigCLI is the default implementation of the HerwigUI interface.
Definition: HerwigCLI.h:23
void quit() const
Bail out and be quiet.
const std::vector< std::string > & appendReadDirectories() const
Directories from which Herwig reads input files, will be appended to the search path.
Definition: HerwigCLI.h:60
~HerwigCLI()
Destructor to leave a clean ThePEG::Repository behind.
int seed() const
The seed to use.
Definition: HerwigCLI.h:63
bool resume() const
Try to resume execution from an earlier interrupted run.
Definition: HerwigCLI.h:36
RunMode::Mode runMode() const
Requested Herwig run mode.
Definition: HerwigCLI.h:33
std::string tag() const
A user-defined tag to append to the run name.
Definition: HerwigCLI.h:42
const std::vector< std::string > & prependReadDirectories() const
Directories from which Herwig reads input files, will be prepended to the search path.
Definition: HerwigCLI.h:57
int jobs() const
The number of jobs to fork.
Definition: HerwigCLI.h:64
std::string setupfile() const
Name of the setup file to be read, to modify the repository.
Definition: HerwigCLI.h:51
virtual std::ostream & outStream() const
Return the standard out stream to be used.
Definition: HerwigCLI.h:73
virtual std::ostream & errStream() const
Return the standard err stream to be used.
Definition: HerwigCLI.h:76
void quitWithHelp() const
Bail out and print usage information.
virtual std::istream & inStream() const
Return the standard in stream to be used.
Definition: HerwigCLI.h:79
HerwigCLI(int argc, char *argv[])
Constructor from the arguments provided by main()
long N() const
The number of events to generate.
Definition: HerwigCLI.h:62
std::string repository() const
Repository name to operate on.
Definition: HerwigCLI.h:48
unsigned int maxJobs() const
The maximum number of integration jobs.
Definition: HerwigCLI.h:66
bool tics() const
Require verbose progress markers.
Definition: HerwigCLI.h:39
std::string integrationList() const
An identifier for the integration job to be handled.
Definition: HerwigCLI.h:53
std::string inputfile() const
Name of the file to be read.
Definition: HerwigCLI.h:45
unsigned int jobSize() const
The number of subprocesses to integrate per integratoin job.
Definition: HerwigCLI.h:65
HerwigUI is an interface to abstract the command line parameters.
Definition: HerwigUI.h:31
-*- C++ -*-