herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
HerwigUI.h
1// -*- C++ -*-
2//
3// HerwigUI.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_UI_H
10#define SRC_HERWIG_UI_H
11
12#include <vector>
13#include <string>
14#include <iosfwd>
15
16namespace Herwig {
17
21namespace RunMode {
22 enum Mode { ERROR, INIT, READ, BUILD, INTEGRATE, MERGEGRIDS, RUN };
23}
24
31 class HerwigUI {
32
33 public:
34
36 virtual RunMode::Mode runMode() const = 0;
37
39 virtual std::string repository() const = 0;
40
42 virtual std::string inputfile() const = 0;
43
45 virtual std::string setupfile() const = 0;
46
48 virtual bool resume() const = 0;
49
51 virtual bool tics() const = 0;
52
54 virtual std::string tag() const = 0;
55
57 virtual std::string integrationList() const = 0;
58
60 virtual const std::vector<std::string> & prependReadDirectories() const = 0;
61
63 virtual const std::vector<std::string> & appendReadDirectories() const = 0;
64
66 virtual long N() const = 0;
67
69 virtual int seed() const = 0;
70
72 virtual int jobs() const = 0;
73
75 virtual unsigned int jobSize() const = 0;
76
78 virtual unsigned int maxJobs() const = 0;
79
81 virtual void quitWithHelp() const = 0;
82
84 virtual void quit() const = 0;
85
87 virtual ~HerwigUI() {}
88
90 bool integrationJob() const {
91 return runMode() == RunMode::INTEGRATE;
92 }
93
95 virtual std::ostream& outStream() const = 0;
96
98 virtual std::ostream& errStream() const = 0;
99
101 virtual std::istream& inStream() const = 0;
102
103 };
104
105}
106
107#endif
HerwigUI is an interface to abstract the command line parameters.
Definition: HerwigUI.h:31
virtual bool tics() const =0
Require verbose progress markers.
virtual std::string integrationList() const =0
An identifier for the integration job to be handled.
virtual int seed() const =0
The seed to use.
virtual std::string setupfile() const =0
Name of the setup file to be read, to modify the repository.
bool integrationJob() const
Return true, if this is an integration job.
Definition: HerwigUI.h:90
virtual std::istream & inStream() const =0
Return the standard in stream to be used.
virtual void quit() const =0
Bail out and be quiet.
virtual const std::vector< std::string > & prependReadDirectories() const =0
Directories from which Herwig reads input files, will be prepended to the search path.
virtual std::ostream & errStream() const =0
Return the standard err stream to be used.
virtual std::string tag() const =0
A user-defined tag to append to the run name.
virtual long N() const =0
The number of events to generate.
virtual unsigned int jobSize() const =0
The number of subprocesses to integrate per integratoin job.
virtual ~HerwigUI()
Destructor.
Definition: HerwigUI.h:87
virtual std::string repository() const =0
Repository name to operate on.
virtual bool resume() const =0
Try to resume execution from an earlier interrupted run.
virtual const std::vector< std::string > & appendReadDirectories() const =0
Directories from which Herwig reads input files, will be appended to the search path.
virtual std::ostream & outStream() const =0
Return the standard out stream to be used.
virtual void quitWithHelp() const =0
Bail out and print usage information.
virtual int jobs() const =0
The number of jobs to fork.
virtual std::string inputfile() const =0
Name of the file to be read.
virtual unsigned int maxJobs() const =0
The maximum number of integration jobs.
virtual RunMode::Mode runMode() const =0
Requested Herwig run mode.
-*- C++ -*-