14 #ifndef PNDTCAINPUTCONTAINER_HH 15 #define PNDTCAINPUTCONTAINER_HH 20 #include "TClonesArray.h" 23 #include "FairLogger.h" 24 #include "FairRootManager.h" 55 virtual Bool_t
Init(
const TString &t_branchname)
final 58 FairRootManager *ioman = FairRootManager::Instance();
59 if (ioman ==
nullptr) {
60 throw std::runtime_error(
"FairRootManager::Instance() returned nullptr");
62 this->
fTCA =
dynamic_cast<TClonesArray *
>(ioman->GetObject(t_branchname));
63 if (this->
fTCA ==
nullptr) {
67 LOG(error) <<
"PndTCAInputContainer<" << T().ClassName() <<
">::Init(" << t_branchname <<
"): No " << T().ClassName() <<
" array with name " << t_branchname <<
" found!";
82 if (
fTCA !=
nullptr) {
83 return static_cast<T *
>(
fTCA->At(t_idx));
95 if (
fTCA !=
nullptr) {
96 return fTCA->GetEntriesFast();