File: runner.h

package info (click to toggle)
aoflagger 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,476 kB
  • sloc: cpp: 51,868; python: 152; sh: 25; makefile: 17
file content (37 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef RUNNER_H
#define RUNNER_H

#include "options.h"

#include "../imagesets/imageset.h"

#include <boost/optional/optional.hpp>

class Runner
{
public:
	Runner(const Options& cmdLineOptions) :
		_cmdLineOptions(cmdLineOptions)
	{ }
	
	void Run();
	
private:
	struct FileOptions {
		std::string filename;
		size_t nIntervals = 1;
		size_t intervalIndex = 0;
		size_t resolvedIntStart = 0, resolvedIntEnd = 0;
		boost::optional<size_t> intervalStart, intervalEnd;
	};
	void run(const Options& options);
	void loadStrategy (class LuaThreadGroup& lua, const Options& options, const std::unique_ptr<rfiStrategy::ImageSet>& imageSet);
	
	void processFile(const Options& options, const std::string& filename, size_t threadCount);
	std::unique_ptr<rfiStrategy::ImageSet> initializeImageSet(const Options& options, FileOptions& fileOptions);
	void writeHistory(const Options& options, const std::string &filename);
	void finishStatistics(const std::string &filename, class ScriptData& scriptData, bool isMS);
	Options _cmdLineOptions;
};

#endif