@@ -483,66 +483,6 @@ public:
483483 }
484484};
485485
486- // BarChartHelper: fills a TH1D from string/categorical columns via TH1D::Fill(const char*).
487- // FillHelper<TH1D>::Exec cannot do this: std::string has no implicit conversion to const char*,
488- // so its non-container Exec overload's decltype(Fill(x...)) SFINAEs out, and std::string is
489- // explicitly excluded from IsDataContainer (see Utils.hxx), so the container-fill overload
490- // SFINAEs out too -- FillHelper<TH1D> simply won't compile for a std::string column.
491- class R__CLING_PTRCHECK (off) BarChartHelper : public RActionImpl<BarChartHelper> {
492- std::vector<::TH1D *> fObjects ;
493-
494- public:
495- BarChartHelper (BarChartHelper &&) = default ;
496- BarChartHelper (const BarChartHelper &) = delete ;
497-
498- BarChartHelper (const std::shared_ptr<::TH1D > &h, const unsigned int nSlots) : fObjects (nSlots, nullptr )
499- {
500- fObjects [0 ] = h.get ();
501- for (unsigned int i = 1 ; i < nSlots; ++i) {
502- fObjects [i] = new ::TH1D (*fObjects [0 ]);
503- UnsetDirectoryIfPossible (fObjects [i]);
504- }
505- }
506-
507- void InitTask (TTreeReader *, unsigned int ) {}
508-
509- void Exec (unsigned int slot, const std::string &label) { fObjects [slot]->Fill (label.c_str (), 1.0 ); }
510-
511- void Exec (unsigned int slot, const ROOT ::VecOps::RVec<char > &label)
512- {
513- fObjects [slot]->Fill (std::string (label.begin (), label.end ()).c_str (), 1.0 );
514- }
515-
516- void Initialize () { /* noop */ }
517-
518- void Finalize ()
519- {
520- if (fObjects .size () > 1 ) {
521- TList l;
522- for (auto it = ++fObjects .begin (); it != fObjects .end (); ++it)
523- l.Add (*it);
524- fObjects [0 ]->Merge (&l);
525-
526- for (auto it = ++fObjects .begin (); it != fObjects .end (); ++it)
527- delete *it;
528- }
529- fObjects [0 ]->LabelsDeflate (" X" );
530- }
531-
532- ::TH1D &PartialUpdate (unsigned int slot) { return *fObjects [slot]; }
533-
534- std::string GetActionName () { return std::string (" BarChart\n " ) + fObjects [0 ]->GetName (); }
535-
536- BarChartHelper MakeNew (void *newResult, std::string_view /* variation*/ = " nominal" )
537- {
538- auto &result = *static_cast <std::shared_ptr<::TH1D > *>(newResult);
539- ResetIfPossible (result.get ());
540- UnsetDirectoryIfPossible (result.get ());
541- return BarChartHelper (result, fObjects .size ());
542- }
543- };
544-
545-
546486#ifdef R__HAS_ROOT7
547487template <typename BinContentType, bool WithWeight = false >
548488class R__CLING_PTRCHECK (off) RHistFillHelper
0 commit comments