41class GenericContainerFiller {
43 GenericContainerFiller() =
delete;
44 explicit GenericContainerFiller(std::string fileInName, std::string treeInName =
"pTree");
45 virtual ~GenericContainerFiller() =
default;
47 void SetOutputFileName(
const std::string& name) { file_out_name_ = name; }
48 void SetOutputTreeName(
const std::string& name) { tree_out_name_ = name; }
49 void SetOutputBranchName(
const std::string& name) { branch_out_name_ = name; }
51 void SetFieldsToIgnore(
const std::vector<std::string>& fields) { fields_to_ignore_ = fields; }
52 void SetFieldsToPreserve(
const std::vector<std::string>& fields) { fields_to_preserve_ = fields; }
54 void SetEntrySwitchTriggerVarName(
const std::string& name) { entry_switch_trigger_var_name_ = name; }
56 void SetNChannelsPerEntry(
int n) { n_channels_per_entry_ = n; }
58 void Run(
int nEntries = -1);
62 int Exec(
int iEntry,
int previousTriggerVar);
65 static int DetermineFieldIdByName(
const std::vector<IndexMap>& iMap,
const std::string& name);
66 static void SetAddressFICS(TBranch* branch,
const IndexMap& imap,
FICS& ficc);
67 static void SetFieldsFICS(
const std::vector<IndexMap>& imap,
AnalysisTree::Container& container,
const std::vector<FICS>& ficc);
69 std::string file_in_name_;
70 std::string tree_in_name_;
72 std::string file_out_name_{
"AnalysisTree.root"};
73 std::string tree_out_name_{
"aTree"};
74 std::string branch_out_name_{
"PlainBranch"};
76 TFile* file_in_{
nullptr};
77 TTree* tree_in_{
nullptr};
78 TFile* file_out_{
nullptr};
79 TTree* tree_out_{
nullptr};
82 AnalysisTree::GenericDetector* generic_detector_{
nullptr};
83 std::vector<IndexMap> branch_map_;
84 std::vector<FICS> branch_values_;
87 std::string entry_switch_trigger_var_name_{
""};
89 int entry_switch_trigger_id_{-1};
94 int n_channels_per_entry_{-1};
96 std::vector<std::string> fields_to_ignore_{};
97 std::vector<std::string> fields_to_preserve_{};