14 #ifndef PNDOUTPUTCONTAINER_HH 15 #define PNDOUTPUTCONTAINER_HH 46 virtual Bool_t
Init(
const TString &t_branchname)
51 success =
TrySTD(t_branchname);
62 Bool_t
TrySTD(
const TString &t_branchname)
67 LOG(debug) <<
"No std::vector<T> branch called " << t_branchname <<
" registered with the FairRootManager.";
68 this->
fImp.reset(
nullptr);
70 LOG(debug) <<
"Found std::vector<T> branch called " << t_branchname <<
" registered with the FairRootManager. ";
81 Bool_t
TryTCA(
const TString &t_branchname)
86 LOG(debug) <<
"No TClonesArray branch called " << t_branchname <<
" registered with the FairRootManager either. !";
87 this->
fImp.reset(
nullptr);
90 LOG(debug) <<
"Found TClonesArray branch called " << t_branchname <<
" registered with the FairRootManager. ";
103 if (this->
fImp !=
nullptr) {
116 if (this->
fImp !=
nullptr) {
117 return this->
fImp->CreateCopy(t_data);
129 if (this->
fImp !=
nullptr) {
130 this->
fImp->RemoveAt(t_index);
141 if (this->
fImp !=
nullptr) {
142 return this->
fImp->GetSize();
155 if (this->
fImp !=
nullptr) {
156 return this->
fImp->GetElement(t_index);
167 if (this->
fImp !=
nullptr) {
168 this->
fImp->Compress();
173 std::unique_ptr<PndOutputContainerI<T>>
fImp{
nullptr};
virtual Bool_t Init(const TString &t_branchname)
Init internal data.
static const UInt_t success
virtual T * CreateCopy(const T &t_data) final
Create a copy of t_data in internal data and return ptr to it.
virtual ssize_t GetSize() const final
Get the number of members in internal data.
virtual T * GetElement(Int_t t_index) const final
Get the Element object at t_index.
Bool_t TrySTD(const TString &t_branchname)
Create a std::vector based outputcontainer and register/init it with the FairRootManager.
virtual void RemoveAt(Int_t t_index) final
Delete object at t_index in internal data.
PndOutputContainer(const TString &t_foldername="", Bool_t t_persistency=kTRUE)
Construct a new PndOutputContainer object.
Bool_t TryTCA(const TString &t_branchname)
Create a TClonesArray based outputcontainer and register/init it with the FairRootManager.
Input and Output Container implementation of PndOutputContainerI using an underlying std::vector<T> (...
virtual ~PndOutputContainer()
Destroy the PndOutputContainer object.
std::unique_ptr< PndOutputContainerI< T > > fImp
PndTCAOutputContainer implementation of PndOutputContainerI<T> for FairRootManager and TClonesArray...
virtual void Reset() final
Reset data.
Interface to a datacontainer to be used in PandaROOT.
virtual void Compress()
Compress.
Input and Output Container implementation of PndOutputContainerI using an underlying TClonesArray...
PndSTDOutputContainer implementation of PndOutputContainerI<T> for FairRootManager and std::vector<T>...