Could it be at when you call _tree_pars->Branch
, pdfs[imodel]
still points to nullptr
? In this case, TTree
only sees the abstract base class TH1
which, unlike the derived classes TH1D
, TH1F
, cannot be created in memory.
1 Like