22class PlainTreeFiller :
public AnalysisTask {
24 PlainTreeFiller() =
default;
26 void AddBranch(
const std::string& branch_name);
30 void Finish()
override;
32 void SetOutputName(std::string file, std::string tree) {
33 file_name_ = std::move(file);
34 tree_name_ = std::move(tree);
37 void SetFieldsToIgnore(
const std::vector<std::string>& fields_to_ignore);
38 void SetFieldsToPreserve(
const std::vector<std::string>& fields_to_preserve);
40 void SetIsIgnoreDefaultFields(
bool is =
true) { is_ignore_defual_fields_ = is; }
41 void SetIsPrependLeavesWithBranchName(
bool is =
true) { is_prepend_leaves_with_branchname_ = is; }
44 TFile* file_{
nullptr};
45 TTree* plain_tree_{
nullptr};
47 std::string file_name_{
"PlainTree.root"};
48 std::string tree_name_{
"PlainTree"};
49 std::string branch_name_;
51 std::vector<FIB> vars_;
52 std::vector<std::string> fields_to_ignore_{};
53 std::vector<std::string> fields_to_preserve_{};
55 bool is_ignore_defual_fields_{
false};
56 bool is_prepend_leaves_with_branchname_{
true};