18 #ifndef PNDSTDINPUTCONTAINER_HH 19 #define PNDSTDINPUTCONTAINER_HH 26 #include "FairLogger.h" 27 #include "FairRootManager.h" 57 virtual Bool_t
Init(
const TString &t_branchname)
final 60 FairRootManager *ioman = FairRootManager::Instance();
61 if (ioman ==
nullptr) {
62 throw std::runtime_error(
"FairRootManager::Instance() returned nullptr");
64 this->fSTD = ioman->InitObjectAs<std::vector<T>
const *>(t_branchname);
65 if (this->fSTD ==
nullptr) {
69 LOG(error) <<
"PndSTDInputContainer<" << T().ClassName() <<
">::Init(" << t_branchname <<
"): No " << T().ClassName() <<
" array with name " << t_branchname <<
" found!";
73 LOG(INFO) <<
"virtual Bool_t PndSTDInputContainer::Init(const TString &t_branchname) final successful";
85 if (fSTD !=
nullptr) {
86 return &(fSTD->at(t_idx));
99 if (fSTD !=
nullptr) {
109 void SetData(std::vector<T>
const *t_container) { fSTD = t_container; }
116 std::vector<T>
const *
GetData() {
return fSTD; }
119 std::vector<T>
const *fSTD{
nullptr};