herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
RunDirectories.h
1 // -*- C++ -*-
2 //
3 // RunDirectories.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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 HERWIG_RunDirectories_H
10 #define HERWIG_RunDirectories_H
11 //
12 // This is the declaration of the RunDirectories class.
13 //
14 
15 #include <string>
16 #include <list>
17 
18 namespace Herwig {
19 
27 
28 public:
29 
33  static void prefix(std::string p);
34 
38  static const std::string& prefix();
39 
43  static const std::string& buildStorage();
44 
48  static bool empty();
49 
53  static void pushRunId(std::string);
54 
59  static const std::string& runStorage();
60 
64  static const std::string& interfaceStorage();
65 
66 public:
67 
72 
76  operator bool() const { return !directoriesLeft.empty(); }
77 
81  bool operator!() const { return directoriesLeft.empty(); }
82 
87  std::string nextRunStorage();
88 
89 private:
90 
94  static std::string& thePrefix();
95 
99  static std::string& theBuildStorage();
100 
104  static std::list<std::string>& theRunDirectories();
105 
109  std::list<std::string> directoriesLeft;
110 
111 };
112 
113 }
114 
115 #endif /* HERWIG_RunDirectories_H */
static const std::string & buildStorage()
Return the name (and possibly create) a storage for build data.
static std::list< std::string > & theRunDirectories()
The list of run storage directories to be considered.
static const std::string & interfaceStorage()
Return the storage to be used for interface order/contract files.
static const std::string & prefix()
Return the prefix for storing details of this run.
Handle directories for external library and grid storage.
static bool empty()
Return true, if no run directories have been pushed yet.
static std::string & theBuildStorage()
The build storage.
bool operator!() const
Return true, if there are no run directories still to be considered.
static void pushRunId(std::string)
Push a run identifier onto the run directories stack.
static const std::string & runStorage()
Return (and possibly create) the top of the run directory stack to be used for storage.
static std::string & thePrefix()
The prefix for storing details of this run.
std::string nextRunStorage()
Return the next run directory to be considered and pop it from the stack.
std::list< std::string > directoriesLeft
The current run directory stack under consideration.
-*- C++ -*-
RunDirectories()
Default constructor fills the directory list to test.