@@ -364,73 +364,6 @@ void SetBranchesHelper(TTree *inputTree, TTree &outputTree,
364
364
}
365
365
} // namespace
366
366
367
- TBranch *ROOT::Internal::RDF::RBranchSet::Get (const std::string &name) const
368
- {
369
- auto it = std::find (fNames .begin (), fNames .end (), name);
370
- if (it == fNames .end ())
371
- return nullptr ;
372
- return fBranches [std::distance (fNames .begin (), it)];
373
- }
374
-
375
- bool ROOT::Internal::RDF::RBranchSet::IsCArray (const std::string &name) const
376
- {
377
- if (auto it = std::find (fNames .begin (), fNames .end (), name); it != fNames .end ())
378
- return fIsCArray [std::distance (fNames .begin (), it)];
379
- return false ;
380
- }
381
-
382
- void ROOT::Internal::RDF::RBranchSet::Insert (const std::string &name, TBranch *address, bool isCArray)
383
- {
384
- if (address == nullptr ) {
385
- throw std::logic_error (" Trying to insert a null branch address." );
386
- }
387
- if (std::find (fBranches .begin (), fBranches .end (), address) != fBranches .end ()) {
388
- throw std::logic_error (" Trying to insert a branch address that's already present." );
389
- }
390
- if (std::find (fNames .begin (), fNames .end (), name) != fNames .end ()) {
391
- throw std::logic_error (" Trying to insert a branch name that's already present." );
392
- }
393
- fNames .emplace_back (name);
394
- fBranches .emplace_back (address);
395
- fIsCArray .push_back (isCArray);
396
- }
397
-
398
- void ROOT::Internal::RDF::RBranchSet::Clear ()
399
- {
400
- fBranches .clear ();
401
- fNames .clear ();
402
- fIsCArray .clear ();
403
- }
404
-
405
- void ROOT::Internal::RDF::RBranchSet::AssertNoNullBranchAddresses ()
406
- {
407
- std::vector<TBranch *> branchesWithNullAddress;
408
- std::copy_if (fBranches .begin (), fBranches .end (), std::back_inserter (branchesWithNullAddress),
409
- [](TBranch *b) { return b->GetAddress () == nullptr ; });
410
-
411
- if (branchesWithNullAddress.empty ())
412
- return ;
413
-
414
- // otherwise build error message and throw
415
- std::vector<std::string> missingBranchNames;
416
- std::transform (branchesWithNullAddress.begin (), branchesWithNullAddress.end (),
417
- std::back_inserter (missingBranchNames), [](TBranch *b) { return b->GetName (); });
418
- std::string msg = " RDataFrame::Snapshot:" ;
419
- if (missingBranchNames.size () == 1 ) {
420
- msg += " branch " + missingBranchNames[0 ] +
421
- " is needed as it provides the size for one or more branches containing dynamically sized arrays, but "
422
- " it is" ;
423
- } else {
424
- msg += " branches " ;
425
- for (const auto &bName : missingBranchNames)
426
- msg += bName + " , " ;
427
- msg.resize (msg.size () - 2 ); // remove last ", "
428
- msg += " are needed as they provide the size of other branches containing dynamically sized arrays, but they are" ;
429
- }
430
- msg += " not part of the set of branches that are being written out." ;
431
- throw std::runtime_error (msg);
432
- }
433
-
434
367
ROOT::Internal::RDF::UntypedSnapshotTTreeHelper::UntypedSnapshotTTreeHelper (
435
368
std::string_view filename, std::string_view dirname, std::string_view treename, const ColumnNames_t &vbnames,
436
369
const ColumnNames_t &bnames, const RSnapshotOptions &options, std::vector<bool > &&isDefine,
0 commit comments