MaCh3  2.6.1
Reference Guide
Public Member Functions | Public Attributes | Private Attributes | List of all members
M3::Plotting::PlottingManager Class Reference

The main class to be used in plotting scripts. More...

#include <Utils/Plotting/PlottingManager.h>

Collaboration diagram for M3::Plotting::PlottingManager:
[legend]

Public Member Functions

 PlottingManager ()
 Construct a new PlottingManager using default plottingConfig config. More...
 
 PlottingManager (const std::string &PlottingConfigName)
 Construct a new PlottingManager using specified plottingConfig config. More...
 
void initialise ()
 initalise this PlottingManager. More...
 
 ~PlottingManager ()
 
void parseInputs (int argc, char *const *argv)
 Parse command line arguments. More...
 
void parseInputsVec (const std::vector< std::string > &argv)
 Parse vector of command line arguments. More...
 
void addUserOption ()
 Describe an option you want to add to the PlottingManager which can be read in from the command line and retrieved later with getOption(). This should be done before calling parseInputs(). More...
 
std::string getUserOption (const std::string &option)
 Retrieve a command line option you specified using addOption. More...
 
void usage () const
 Print a usage message for the current executable. More...
 
void parseFileLabels (std::string labelString, std::vector< std::string > &labelVec)
 Parse string of labels into a vector of strings. More...
 
void setOutFileName (const std::string &fileName)
 Parse and set the output file name, if extension specified, check its one root supports, if not, default to pdf. More...
 
void setExec (const std::string &execName)
 Internally set the name of the executable that manager is being used in. More...
 
template<typename T >
getOption (const std::string &option)
 Get a specific option from the config for this executable. More...
 
YAML::Node getOption (const std::string &option) const
 
const StyleManagerstyle () const
 Get the StyleManager contained within this PlottingManager, for doing style related things. More...
 
const InputManagerinput () const
 Get the InputManager contained within this PlottingManager, for doing input related things. More...
 
General getters
const std::string getFileName (int i) const
 
const std::string getFileLabel (int i) const
 
const std::string getDrawOptions () const
 
const std::string getOutputName ()
 Get the straight up output file name with no bells or whistles, just the file extension. More...
 
const std::string getOutputName (const std::string &suffix)
 Get the output name but can specify a suffix to add to the name, before the file extension. More...
 
const std::vector< std::string > getFileNames () const
 
const std::vector< std::string > getFileLabels () const
 
size_t getNFiles () const
 
bool getSplitBySample () const
 
bool getPlotRatios () const
 
bool getDrawGrid () const
 

Public Attributes

const std::string DEFAULT_TRANSLATION_CONFIG
 
const std::string DEFAULT_STYLE_CONFIG
 
const std::string DEFAULT_PLOTTING_CONFIG
 

Private Attributes

std::string _configFileName = std::string(std::getenv("MACH3")) + "/plotting/PlottingConfig.yaml"
 
YAML::Node _plottingConfig
 
YAML::Node _execOptions
 
std::vector< std::string > _fileNames
 
std::vector< std::string > _fileLabels
 
std::vector< std::string > _defaultFileLabels
 
std::string _outputName = "Plot.pdf"
 
std::string _extraDrawOptions = ""
 
bool _splitBySample = false
 
bool _plotRatios = false
 
bool _drawGrid = false
 
std::unique_ptr< StyleManager_styleMan
 
std::unique_ptr< InputManager_inputMan
 

Detailed Description

The main class to be used in plotting scripts.

When it comes to plotting, this guys in charge, the main man, the head honcho, the big cheese. If it's a plot you need, this is the guy you call. You just call him in your scripts and let him and his goons StyleManager, and InputManager worry about the details, no questions asked. This class handles all the command line inputs and manages the other managers. Intention with this class is that you should be able to create one from your custom plotting script, then from that, be able to get all manner of inputs from the InputManager contained within, and set any style options you like from the StyleManager. Also a hopefully not too distant dream is to wrap this up in python so it is usable in .py scripts to take advantage of nice existing plotting libraries for e.g. MCMC plotting.

Author
Ewan Miller

Definition at line 36 of file PlottingManager.h.

Constructor & Destructor Documentation

◆ PlottingManager() [1/2]

M3::Plotting::PlottingManager::PlottingManager ( )

Construct a new PlottingManager using default plottingConfig config.

Returns
Constructed PlottingManager instance.

Definition at line 7 of file PlottingManager.cpp.

7  {
8  // set config file name
10 }
const std::string DEFAULT_PLOTTING_CONFIG

◆ PlottingManager() [2/2]

M3::Plotting::PlottingManager::PlottingManager ( const std::string &  PlottingConfigName)

Construct a new PlottingManager using specified plottingConfig config.

Parameters
PlottingConfigNameThe config file file defining executables specific options, and other minor manager related options.
Returns
Constructed PlottingManager instance.

Definition at line 13 of file PlottingManager.cpp.

13  {
14  // parse the config file
15  _configFileName = PlottingConfigName;
16 }

◆ ~PlottingManager()

M3::Plotting::PlottingManager::~PlottingManager ( )
inline

Definition at line 67 of file PlottingManager.h.

67  {
68  MACH3LOG_DEBUG("##### Deleting PlottingManager Instance #####");
69  }
#define MACH3LOG_DEBUG
Definition: MaCh3Logger.h:34

Member Function Documentation

◆ addUserOption()

void M3::Plotting::PlottingManager::addUserOption ( )

Describe an option you want to add to the PlottingManager which can be read in from the command line and retrieved later with getOption(). This should be done before calling parseInputs().

Todo:

Would be good to add functionality to this to allow user to add their own options.

The way I can think to do this would be have fn addUserOption() to set the options, defining the cmd line option (e.g. -x), the name of the option, and maybe some description of the option to be used in the help message

can then store these options in some map or something to be retrieved later by getUserOption()

Todo:
Implement this.

Definition at line 188 of file PlottingManager.cpp.

188  {
190 }

◆ getDrawGrid()

bool M3::Plotting::PlottingManager::getDrawGrid ( ) const
inline

Definition at line 154 of file PlottingManager.h.

◆ getDrawOptions()

const std::string M3::Plotting::PlottingManager::getDrawOptions ( ) const
inline

Definition at line 131 of file PlottingManager.h.

131 { return _extraDrawOptions; }

◆ getFileLabel()

const std::string M3::Plotting::PlottingManager::getFileLabel ( int  i) const
inline

Definition at line 129 of file PlottingManager.h.

129 { return _fileLabels[i]; }
std::vector< std::string > _fileLabels

◆ getFileLabels()

const std::vector<std::string> M3::Plotting::PlottingManager::getFileLabels ( ) const
inline

Definition at line 146 of file PlottingManager.h.

146 { return _fileLabels; }

◆ getFileName()

const std::string M3::Plotting::PlottingManager::getFileName ( int  i) const
inline

Definition at line 127 of file PlottingManager.h.

127 { return _fileNames[i]; }
std::vector< std::string > _fileNames

◆ getFileNames()

const std::vector<std::string> M3::Plotting::PlottingManager::getFileNames ( ) const
inline

Definition at line 144 of file PlottingManager.h.

144 { return _fileNames; }

◆ getNFiles()

size_t M3::Plotting::PlottingManager::getNFiles ( ) const
inline

Definition at line 148 of file PlottingManager.h.

148 { return _fileNames.size(); }

◆ getOption() [1/2]

template<typename T >
T M3::Plotting::PlottingManager::getOption ( const std::string &  option)
inline

Get a specific option from the config for this executable.

Template Parameters
Tthe type of parameter expected for this option, e.g. std::string.
Parameters
optionThe option that you want from the config.
Returns
The specified value for the option.

Definition at line 121 of file PlottingManager.h.

121 { return _execOptions[option].as<T>(); }

◆ getOption() [2/2]

YAML::Node M3::Plotting::PlottingManager::getOption ( const std::string &  option) const
inline

Definition at line 122 of file PlottingManager.h.

122 { return _execOptions[option]; }

◆ getOutputName() [1/2]

const std::string M3::Plotting::PlottingManager::getOutputName ( )
inline

Get the straight up output file name with no bells or whistles, just the file extension.

Returns
The straight up output file name.

Definition at line 136 of file PlottingManager.h.

136 { return _outputName; }

◆ getOutputName() [2/2]

const std::string M3::Plotting::PlottingManager::getOutputName ( const std::string &  suffix)

Get the output name but can specify a suffix to add to the name, before the file extension.

Parameters
suffixThe suffix to add to the file name.
Returns
Output file name with suffix added before the extension.

Output file name, including the file extension will be returned, but with specified suffix after the name but before the extension. This is useful for e.g. saving multiple LLH scan types to separate files: can specify suffix "_PriotLLH" will return OutputName_PriorLLH.ext

Definition at line 252 of file PlottingManager.cpp.

252  {
253  std::filesystem::path path(_outputName);
254  // ".root", ".pdf", etc.
255  std::string ext = path.extension().string();
256  // filename without extension
257  std::string stem = path.stem().string();
258 
259  return stem + suffix + ext;
260 }

◆ getPlotRatios()

bool M3::Plotting::PlottingManager::getPlotRatios ( ) const
inline

Definition at line 152 of file PlottingManager.h.

◆ getSplitBySample()

bool M3::Plotting::PlottingManager::getSplitBySample ( ) const
inline

Definition at line 150 of file PlottingManager.h.

◆ getUserOption()

std::string M3::Plotting::PlottingManager::getUserOption ( const std::string &  option)

Retrieve a command line option you specified using addOption.

Todo:
Implement this.

Definition at line 192 of file PlottingManager.cpp.

192  {
194  (void) option;
195  return "";
196 }

◆ initialise()

void M3::Plotting::PlottingManager::initialise ( )

initalise this PlottingManager.

  • Read the plotting config file
  • Instantiate a StyleManager using the style config file specified in the plotting config file, or if none was provided, using DEFAULT_STYLE_CONFIG.
  • Instantiate an InputManager using the translation config file specified in the plotting config file, or if none was provided, using DEFAULT_TRANSLATION_CONFIG.
  • Add all files specified in this PlottingManagers _fileNames vector to the new InputManager that was just created
    Warning
    This should always be called After parseInputs() unless you are manually specifying all input file names and config file names in your drawing application.
Todo:
should add some kind of validataConfigs() method to got through all of the specified config files and make sure that all provided options are valid and all necessary options are provided as it can be pretty annoying and difficult to identify what's going wrong when yaml just fails to find an option at runtime

Definition at line 27 of file PlottingManager.cpp.

27  {
33 
34  MACH3LOG_DEBUG("Initialising PlottingManager with plotting congif {}", _configFileName);
35  // read options from the config
36  YAML::Node managerOptions = _plottingConfig["ManagerOptions"];
37 
38  std::string translationConfig = managerOptions["translationConfig"].as<std::string>();
39  if (translationConfig == "")
40  {
41  translationConfig = DEFAULT_TRANSLATION_CONFIG;
42  MACH3LOG_DEBUG("PlottingManager: Using default translation config file name");
43  }
44 
45  MACH3LOG_DEBUG("PlottingManager: Using translation config file: {}", translationConfig);
46 
47  std::string styleConfig = managerOptions["styleConfig"].as<std::string>();
48  if (styleConfig == "")
49  {
50  styleConfig = DEFAULT_STYLE_CONFIG;
51  MACH3LOG_DEBUG("PlottingManager: Using default style config file name");
52  }
53 
54  MACH3LOG_DEBUG("PlottingManager: Using style config file: {}", styleConfig);
55 
56  // create the StyleManager
57  _styleMan = std::make_unique<StyleManager>(styleConfig);
58 
59  // create the InputManager and add all the files to it
60  _inputMan = std::make_unique<InputManager>(translationConfig, _fileNames);
61 }
#define M3OpenConfig(filename)
Macro to simplify calling LoadYaml with file and line info.
Definition: YamlHelper.h:590
const std::string DEFAULT_TRANSLATION_CONFIG
const std::string DEFAULT_STYLE_CONFIG
std::unique_ptr< InputManager > _inputMan
std::unique_ptr< StyleManager > _styleMan

◆ input()

const InputManager& M3::Plotting::PlottingManager::input ( ) const
inline

Get the InputManager contained within this PlottingManager, for doing input related things.

Definition at line 165 of file PlottingManager.h.

165 { return *_inputMan; }

◆ parseFileLabels()

void M3::Plotting::PlottingManager::parseFileLabels ( std::string  labelString,
std::vector< std::string > &  labelVec 
)

Parse string of labels into a vector of strings.

Parameters
labelStringstring of labels of the form "label1;label2;...".
labelVecvector that the individual label strings will be placed into.

Definition at line 271 of file PlottingManager.cpp.

271  {
272  // take in a string defining labels of the form "label1;label2;...;labelN" and parse it into a
273  // vector containing the labels
274 
275  size_t end = labelString.find(";");
276  while (end != std::string::npos)
277  { // Loop until no delimiter is left in the string.
278  labelVec.push_back(labelString.substr(0, end));
279  labelString.erase(labelString.begin(), labelString.begin() + end + 1);
280  end = labelString.find(";");
281  }
282  labelVec.push_back(labelString.substr(0, end));
283 }

◆ parseInputs()

void M3::Plotting::PlottingManager::parseInputs ( int  argc,
char *const *  argv 
)

Parse command line arguments.

Parameters
argcThe number of command line arguments.
argvThe arguments themselves.

Takes in c style command line arguments and parses particular general ones that are useful for a wide variety of plotting scripts.

Please also keep these options in mind and use them in your own plotting scripts.

General cmd line interface for a plotting script will look like:

./ScriptName [options] [FileName1 FileName2 FileName3 ...]
[options]
-o <_outputName> name of the file to output plots to
-l <FileLabelStr> string of labels for each file in the format Label1;Label2;... to be parsed
by parseFileLabels(), number of labels should match exactly the number of files -c
<PlottingConfig> specify a plotting config file to be used in place of the default one
when initialising this manager -d <DrawOptions> extra draw options to be passed when making
plots, see https://root.cern/doc/master/classTHistPainter.html#HP01a for examples
-s where possible, will try to split plots made by sample
-r where possible, make ratio plots comparing the different input files
-g where possible, draw a grid on the produced plots for improved readability
-h print the help message for the current executable and exit
unnamed options are treated as files to be processed
const InputManager & input() const
Get the InputManager contained within this PlottingManager, for doing input related things.
void parseFileLabels(std::string labelString, std::vector< std::string > &labelVec)
Parse string of labels into a vector of strings.
Todo:
make this able to return any un-parsed arguments so that user can specify their own arguments for use in their plotting scripts

Definition at line 90 of file PlottingManager.cpp.

90  {
91  if (argc < 2)
92  {
93  usage();
94  MACH3LOG_ERROR("no arguments were specified :(");
95  throw MaCh3Exception(__FILE__, __LINE__);
96  }
97 
98  // parse the inputs
99  int c;
100  while ((c = getopt(argc, argv, "o:l:d:c:srgh")) != -1)
101  {
102  if (c < 0)
103  break;
104  switch (c)
105  {
106  case 'o': {
107  setOutFileName(optarg);
108  break;
109  }
110  case 's': {
111  _splitBySample = true;
112  break;
113  }
114  case 'r': {
115  _plotRatios = true;
116  break;
117  }
118  case 'g': {
119  _drawGrid = true;
120  break;
121  }
122  case 'h': {
123  usage();
124  break;
125  }
126  case 'l': {
127  parseFileLabels(optarg, _fileLabels);
128  MACH3LOG_INFO("Specified file labels: ");
129  for (std::string label : _fileLabels)
130  MACH3LOG_INFO(" {}", label);
131  break;
132  }
133  case 'c': {
134  _configFileName = optarg;
135  break;
136  }
137  case 'd': {
138  _extraDrawOptions = optarg;
139  break;
140  }
141  case '?':
142  default:
143  {
144  MACH3LOG_ERROR("Unknown or malformed option");
145  usage();
146  throw MaCh3Exception(__FILE__, __LINE__);
147  }
148  }
149  }
150 
151  MACH3LOG_INFO("Input files provided");
152  // optind is for the extra arguments that are not parsed by the program
153  for (; optind < argc; optind++)
154  {
155  _fileNames.push_back(argv[optind]);
156  MACH3LOG_INFO(argv[optind]);
157  _defaultFileLabels.push_back(argv[optind]);
158  }
159 
160  if (_splitBySample)
161  MACH3LOG_INFO("Splitting by sample");
162 
163  if (_plotRatios && _fileNames.size() == 0)
164  {
165  MACH3LOG_ERROR("you specified -r <_plotRatios> = true but didn't specify any files to compare against, was this a mistake?");
166  }
167 
168  if (_fileLabels.size() == 0)
169  {
170  MACH3LOG_INFO("No file labels specified, will just use the file names");
172  }
173 
174  if ((_fileLabels.size() != 0) && (_fileLabels.size() != _fileNames.size()))
175  {
176  MACH3LOG_ERROR("hmmm, you gave me {} labels but {} files", _fileLabels.size(), _fileNames.size());
177  }
178 
179  initialise();
180 }
#define MACH3LOG_ERROR
Definition: MaCh3Logger.h:37
#define MACH3LOG_INFO
Definition: MaCh3Logger.h:35
void initialise()
initalise this PlottingManager.
std::vector< std::string > _defaultFileLabels
void setOutFileName(const std::string &fileName)
Parse and set the output file name, if extension specified, check its one root supports,...
void usage() const
Print a usage message for the current executable.
Custom exception class used throughout MaCh3.

◆ parseInputsVec()

void M3::Plotting::PlottingManager::parseInputsVec ( const std::vector< std::string > &  argv)
inline

Parse vector of command line arguments.

This mainly just exists for the sake of the python binding.

Parameters
argvThe arguments to parse.

Definition at line 80 of file PlottingManager.h.

80  {
81  std::vector<char *> charVec;
82  MACH3LOG_DEBUG("Parsing Inputs :: was given vector:");
83  for( const std::string &arg : argv )
84  {
85  charVec.push_back( const_cast<char *>(arg.c_str()) );
86  MACH3LOG_DEBUG(" - {}", arg );
87  }
88  parseInputs(int(argv.size()), charVec.data());
89  }
void parseInputs(int argc, char *const *argv)
Parse command line arguments.

◆ setExec()

void M3::Plotting::PlottingManager::setExec ( const std::string &  execName)

Internally set the name of the executable that manager is being used in.

Parameters
execNameName of the current executable, will also need to be defined in the plotting config file.

This is used by e.g. getOption() so the PlottingManager knows where to look for the option in the plotting config file.

Definition at line 264 of file PlottingManager.cpp.

264  {
265  MACH3LOG_DEBUG("Setting internal exec name to {}", execName);
266  _execOptions = _plottingConfig[execName];
267  if (_outputName == "Plot.pdf")
268  setOutFileName(getOption<std::string>("defaultOutputName"));
269 }

◆ setOutFileName()

void M3::Plotting::PlottingManager::setOutFileName ( const std::string &  saveName)

Parse and set the output file name, if extension specified, check its one root supports, if not, default to pdf.

Parameters
fileNamethe name of the output file.

Will check the provided saveName for file extensions, if it is one of .pdf or .eps, then just use the provided string as the full output name. If no file extension is specified, append .pdf so plots will be saved as pdf. if some other file extension is specified, replace with .pdf as only .pdf and .eps support printing multiple plots to one file in root.

Definition at line 230 of file PlottingManager.cpp.

230  {
231  std::filesystem::path path(saveName);
232  if (!path.has_extension()) {
233  path.replace_extension(".pdf");
234  _outputName = path.string();
235  return;
236  }
237 
238  std::string ext = path.extension().string();
239  if (ext == ".pdf" || ext == ".ps" || ext == ".eps") {
240  _outputName = saveName;
241  return;
242  }
243 
244  MACH3LOG_WARN("file extension '{}' that you provided doesnt support multiple plots in one file", ext);
245  MACH3LOG_WARN("should be one of .pdf, .eps .ps, will use pdf");
246  _outputName = saveName + ".pdf";
247 }
#define MACH3LOG_WARN
Definition: MaCh3Logger.h:36

◆ style()

const StyleManager& M3::Plotting::PlottingManager::style ( ) const
inline

Get the StyleManager contained within this PlottingManager, for doing style related things.

Definition at line 161 of file PlottingManager.h.

161 { return *_styleMan; }

◆ usage()

void M3::Plotting::PlottingManager::usage ( ) const

Print a usage message for the current executable.

Todo:
could add some function to allow user to specify the help message for their particular script, then auto generate what the cmd line syntax looks like based on user specified options?

Definition at line 198 of file PlottingManager.cpp.

198  {
202  MACH3LOG_INFO("========================================");
203  MACH3LOG_INFO("PlottingManager usage:");
204  MACH3LOG_INFO("========================================");
205 
206  MACH3LOG_INFO("Required:");
207  MACH3LOG_INFO(" <input files> One or more input files (positional args)");
208 
209  MACH3LOG_INFO("");
210  MACH3LOG_INFO("Options:");
211  MACH3LOG_INFO(" -o <file> Output file name");
212  MACH3LOG_INFO(" -l <labels> Comma/space-separated file labels");
213  MACH3LOG_INFO(" -c <config> Configuration file name");
214  //MACH3LOG_INFO(" -d <options> Extra draw options");
215  //MACH3LOG_INFO(" -s Split by sample");
216  //MACH3LOG_INFO(" -r Plot ratios (requires multiple input files)");
217  MACH3LOG_INFO(" -g Draw grid");
218  MACH3LOG_INFO(" -h Show this help message");
219 
220  MACH3LOG_INFO("");
221  MACH3LOG_INFO("Examples:");
222  MACH3LOG_INFO(" ./plot file1.root -f FancyName");
223  MACH3LOG_INFO("========================================");
224 }

Member Data Documentation

◆ _configFileName

std::string M3::Plotting::PlottingManager::_configFileName = std::string(std::getenv("MACH3")) + "/plotting/PlottingConfig.yaml"
private

Definition at line 169 of file PlottingManager.h.

◆ _defaultFileLabels

std::vector<std::string> M3::Plotting::PlottingManager::_defaultFileLabels
private

Definition at line 178 of file PlottingManager.h.

◆ _drawGrid

bool M3::Plotting::PlottingManager::_drawGrid = false
private

Definition at line 187 of file PlottingManager.h.

◆ _execOptions

YAML::Node M3::Plotting::PlottingManager::_execOptions
private

Definition at line 173 of file PlottingManager.h.

◆ _extraDrawOptions

std::string M3::Plotting::PlottingManager::_extraDrawOptions = ""
private

Definition at line 182 of file PlottingManager.h.

◆ _fileLabels

std::vector<std::string> M3::Plotting::PlottingManager::_fileLabels
private

Definition at line 177 of file PlottingManager.h.

◆ _fileNames

std::vector<std::string> M3::Plotting::PlottingManager::_fileNames
private

Definition at line 176 of file PlottingManager.h.

◆ _inputMan

std::unique_ptr<InputManager> M3::Plotting::PlottingManager::_inputMan
private

Definition at line 191 of file PlottingManager.h.

◆ _outputName

std::string M3::Plotting::PlottingManager::_outputName = "Plot.pdf"
private

Definition at line 181 of file PlottingManager.h.

◆ _plotRatios

bool M3::Plotting::PlottingManager::_plotRatios = false
private

Definition at line 186 of file PlottingManager.h.

◆ _plottingConfig

YAML::Node M3::Plotting::PlottingManager::_plottingConfig
private

Definition at line 171 of file PlottingManager.h.

◆ _splitBySample

bool M3::Plotting::PlottingManager::_splitBySample = false
private

Definition at line 185 of file PlottingManager.h.

◆ _styleMan

std::unique_ptr<StyleManager> M3::Plotting::PlottingManager::_styleMan
private

Definition at line 190 of file PlottingManager.h.

◆ DEFAULT_PLOTTING_CONFIG

const std::string M3::Plotting::PlottingManager::DEFAULT_PLOTTING_CONFIG
Initial value:
=
std::string(std::getenv("MACH3")) +
"/plotting/PlottingConfig.yaml"

The default plotting config config to use when instantiating new PlottingManager objects.

Definition at line 49 of file PlottingManager.h.

◆ DEFAULT_STYLE_CONFIG

const std::string M3::Plotting::PlottingManager::DEFAULT_STYLE_CONFIG
Initial value:
=
std::string(std::getenv("MACH3")) +
"/plotting/StyleConfig.yaml"

The default style config config to be used by PlottingManager instances when instantiating the StyleManager.

Definition at line 44 of file PlottingManager.h.

◆ DEFAULT_TRANSLATION_CONFIG

const std::string M3::Plotting::PlottingManager::DEFAULT_TRANSLATION_CONFIG
Initial value:
=
std::string(std::getenv("MACH3")) +
"/plotting/universalTranslator.yaml"

The default translation config to be used by PlottingManager instances when instantiating the InputManager.

Definition at line 39 of file PlottingManager.h.


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