17#include "FairRootManager.h"
18#include "TClonesArray.h"
42 auto ioman = FairRootManager::Instance();
45 throw std::runtime_error(
"TCAInputConnector: No FairRootManager");
50 throw std::runtime_error((
"TCAInputConnector: No TClonesArray called " +
fBranchName +
51 " could be obtained from the FairRootManager")
56 throw std::runtime_error(
57 (
"TCAInputConnector: TClonesArray " +
fBranchName +
" does not contain elements of type " +
fClassName)
67 throw std::runtime_error(
71 const Int_t n =
fTCA->GetEntries();
73 for (Int_t i = 0; i < n; i++)
75 fV.emplace_back((T*)
fTCA->At(i));
85 throw std::runtime_error(
89 const Int_t n =
fTCA->GetEntries();
91 for (Int_t i = 0; i < n; i++)
93 fV.emplace_back(*(T*)
fTCA->At(i));
117 auto ioman = FairRootManager::Instance();
118 if (ioman ==
nullptr)
120 throw std::runtime_error(
"TCAInputConnector: No FairRootManager");
125 throw std::runtime_error(
126 (
"TCAInputConnector: TClonesArray " +
fBranchName +
" does not contain elements of type " +
fClassName)
139 const Int_t n =
fTCA->GetEntries();
141 for (Int_t i = 0; i < n; i++)
143 fV.emplace_back((T*)
fTCA->At(i));
156 const Int_t n =
fTCA->GetEntries();
158 for (Int_t i = 0; i < n; i++)
160 fV.emplace_back(*(T*)
fTCA->At(i));
184 auto ioman = FairRootManager::Instance();
185 if (ioman ==
nullptr)
187 throw std::runtime_error(
"TCAOutputConnector: No FairRootManager");
194 "s could not be provided by the FairRootManager")
203 throw std::runtime_error(
204 (
"TCAOutputConnector: TClonesArray " +
fBranchName +
" of " +
fClassName +
"s not available").Data());
213 throw std::runtime_error(
214 (
"TCAOutputConnector: TClonesArray " +
fBranchName +
" of " +
fClassName +
"s not available").Data());
216 return fTCA->GetEntries();
223 throw std::runtime_error(
224 (
"TCAOutputConnector: TClonesArray " +
fBranchName +
" of " +
fClassName +
"s not available").Data());
226 new ((*fTCA)[
fTCA->GetEntries()]) T(std::move(t));
233 throw std::runtime_error(
234 (
"TCAOutputConnector: TClonesArray " +
fBranchName +
" of " +
fClassName +
"s not available").Data());
238 new ((*fTCA)[
fTCA->GetEntries()]) T(*t);
246 throw std::runtime_error(
247 (
"TCAOutputConnector: TClonesArray " +
fBranchName +
" of " +
fClassName +
"s not available").Data());
251 new ((*fTCA)[
fTCA->GetEntries()]) T(std::move(o));
void Insert(std::vector< T > &v)
TCAOutputConnector(TString b)