15 #ifndef PNDTCAMUTABLECONTAINER_HH 16 #define PNDTCAMUTABLECONTAINER_HH 21 #include "TClonesArray.h" 24 #include "FairLogger.h" 25 #include "FairRootManager.h" 60 if (this->
fTCA !=
nullptr) {
72 if (
fTCA !=
nullptr) {
73 new ((*fTCA)[
fTCA->GetEntriesFast()]) T{t_element};
75 LOG(error) <<
"PndTCAMutableContainer::CreateCopy() no underlying TClonesArray";
88 if (this->
fTCA !=
nullptr) {
89 this->
fTCA->RemoveAt(t_index);
99 if (this->
fTCA !=
nullptr) {
100 this->
fTCA->Compress();
112 if (
fTCA !=
nullptr) {
113 return static_cast<T *
>(
fTCA->At(t_idx));
125 if (
fTCA !=
nullptr) {
126 return fTCA->GetEntriesFast();
virtual ~PndTCAMutableContainer()
Destroy the PndTCAOutput Container object.
void SetTCA(TClonesArray *t_tca)
Set the TClonesArray address.
TClonesArray * GetTCA()
Get the TClonesArray address.
virtual void Reset() final
Delete all elements.
virtual ssize_t GetSize() const final
Get the number of elements.
virtual T * GetElement(Int_t t_idx) const final
Get pointer to the t_idx-th element.
PndTCAMutableContainer implementation of PndMutableContainerI<T> for FairRootManager and TClonesArray...
PndTCAMutableContainer(const TString &t_foldername="", Bool_t t_persistency=kTRUE)
Construct a new PndTCAMutableContainer object.
virtual T * CreateCopy(const T &t_element)
Create a copy of t_element in the TClonesArray and return a pointer to it.
virtual void Compress()
Compress.
virtual void RemoveAt(Int_t t_index)
remove the t_index-th element