|
@@ -164,16 +164,22 @@ namespace fv_util {
|
|
|
|
|
|
std::string get_output_filename() {
|
|
|
YAML::Node output_file = root["output-file"];
|
|
|
+ YAML::Node output_dir = root["output-dir"];
|
|
|
+ YAML::Node key = root["source-file-key"];
|
|
|
+ std::string full_path = ".";
|
|
|
+ if (output_dir) {
|
|
|
+ full_path = output_dir.as<std::string>();
|
|
|
+ }
|
|
|
if (output_file) {
|
|
|
- return output_file.as<std::string>();
|
|
|
+ full_path = full_path + "/" + output_file.as<std::string>();
|
|
|
} else {
|
|
|
- YAML::Node key = root["source-file-key"];
|
|
|
if (key) {
|
|
|
- return "../hists/" + key.as<std::string>() + ".root";
|
|
|
+ full_path += "/" + key.as<std::string>() + ".root";
|
|
|
} else {
|
|
|
- return "../hists/output.root";
|
|
|
+ full_path += "/output.root";
|
|
|
}
|
|
|
}
|
|
|
+ return full_path;
|
|
|
}
|
|
|
|
|
|
std::vector<DataFileDescriptor> get_source_files() {
|