@@ -56,8 +56,7 @@ void GenericContainerFiller::Init() {
5656 config_.AddBranchConfig (branchConfig);
5757
5858 for (int iV = 0 ; iV < branch_values_.size (); iV++) {
59- TBranch* branch = tree_in_->GetBranch (branch_map_.at (iV).name_ .c_str ());
60- SetAddressFICS (branch, branch_map_.at (iV), branch_values_.at (iV));
59+ SetAddressFICS (branch_map_.at (iV).name_ , branch_map_.at (iV), branch_values_.at (iV));
6160 }
6261
6362 generic_detector_ = new GenericDetector (branchConfig.GetId ());
@@ -114,14 +113,14 @@ int GenericContainerFiller::DetermineFieldIdByName(const std::vector<IndexMap>&
114113 return distance;
115114}
116115
117- void GenericContainerFiller::SetAddressFICS (TBranch* branch , const IndexMap& imap, FICS& ficc) {
118- if (imap.field_type_ == " TLeafF" ) branch-> SetAddress ( &ficc.float_ );
116+ void GenericContainerFiller::SetAddressFICS (const std::string& branchName , const IndexMap& imap, FICS& ficc) {
117+ if (imap.field_type_ == " TLeafF" ) tree_in_-> SetBranchAddress (branchName. c_str (), &ficc.float_ );
119118 else if (imap.field_type_ == " TLeafI" )
120- branch-> SetAddress ( &ficc.int_ );
119+ tree_in_-> SetBranchAddress (branchName. c_str (), &ficc.int_ );
121120 else if (imap.field_type_ == " TLeafB" )
122- branch-> SetAddress ( &ficc.char_ );
121+ tree_in_-> SetBranchAddress (branchName. c_str (), &ficc.char_ );
123122 else if (imap.field_type_ == " TLeafS" )
124- branch-> SetAddress ( &ficc.short_ );
123+ tree_in_-> SetBranchAddress (branchName. c_str (), &ficc.short_ );
125124 else
126125 throw std::runtime_error (" GenericContainerFiller::SetAddressFICS(): unsupported filed type " + imap.field_type_ );
127126}
0 commit comments