15class PlainTreeFiller :
public AnalysisTask {
17 PlainTreeFiller() =
default;
19 void AddBranch(
const std::string& branch_name);
23 void Finish()
override;
25 void SetOutputName(std::string file, std::string tree) {
26 file_name_ = std::move(file);
27 tree_name_ = std::move(tree);
30 void SetFieldsToIgnore(
const std::vector<std::string>& fields_to_ignore);
31 void SetFieldsToPreserve(
const std::vector<std::string>& fields_to_preserve);
33 void SetIsIgnoreDefaultFields(
bool is =
true) { is_ignore_defual_fields_ = is; }
34 void SetIsPrependLeavesWithBranchName(
bool is =
true) { is_prepend_leaves_with_branchname_ = is; }
37 TFile* file_{
nullptr};
38 TTree* plain_tree_{
nullptr};
40 std::string file_name_{
"PlainTree.root"};
41 std::string tree_name_{
"PlainTree"};
42 std::string branch_name_;
44 std::vector<float> vars_{};
45 std::vector<std::string> fields_to_ignore_{};
46 std::vector<std::string> fields_to_preserve_{};
48 bool is_ignore_defual_fields_{
false};
49 bool is_prepend_leaves_with_branchname_{
true};