PandaRoot
PndMutableContainer< T > Class Template Reference

#include <PndMutableContainer.h>

Inheritance diagram for PndMutableContainer< T >:
PndMutableContainerI< T > PndContainerI< T > PndContainerBaseI

Public Member Functions

 PndMutableContainer (const TString &t_foldername="", Bool_t t_persistency=kTRUE)
 Construct a new PndMutableContainer object. More...
 
virtual ~PndMutableContainer ()
 Destroy the PndMutableContainer object. More...
 
void SetContainer (PndMutableContainerI< T > *t_container)
 Set the Output Container object. More...
 
virtual void Reset () final
 Reset data. More...
 
virtual T * CreateCopy (const T &t_data) final
 Create a copy of t_data in internal data and return ptr to it. More...
 
virtual void RemoveAt (Int_t t_index) final
 Delete object at t_index in internal data. More...
 
virtual ssize_t GetSize () const final
 Get the number of members in internal data. More...
 
virtual T * GetElement (Int_t t_index) const final
 Get the Element object at t_index. More...
 
virtual void Compress ()
 Compress. More...
 
- Public Member Functions inherited from PndMutableContainerI< T >
 PndMutableContainerI (const TString &t_foldername="", Bool_t t_persistency=kTRUE)
 Construct a new PndMutableContainerI object. More...
 
 fFolderName (t_foldername)
 
 fPersistency (t_persistency)
 
virtual ~PndMutableContainerI ()
 Destroy the PndMutableContainerI object. More...
 
virtual T const * GetConstElementPtr (Int_t t_index) const
 Get the Element object at t_index. More...
 
std::vector< T * > GetVector () const
 return vector of ptrs pointing at internal data, to be used to access data independent of underlying data container More...
 
void SetFolderName (const TString &t_foldername)
 Set the FolderName. More...
 
void SetPersistency (Bool_t t_persistency)
 Set the Persistency of the data. More...
 
const TString & GetFolderName () const
 Get the Folder Name. More...
 
Bool_t GetPersistency () const
 Get the Persistency of the data. More...
 
- Public Member Functions inherited from PndContainerI< T >
 PndContainerI ()
 Construct a new PndContainerI object. More...
 
virtual ~PndContainerI ()
 Destroy the PndContainerI object. More...
 
std::vector< T const * > GetVectorOfPtrToConst () const
 return vector of const ptrs pointing at internal data, to be used to access data independent of underlying data container More...
 
TString GetClassName () const
 
- Public Member Functions inherited from PndContainerBaseI
 PndContainerBaseI ()
 Construct a new PndContainerBaseI object. More...
 
virtual ~PndContainerBaseI ()
 Destroy the PndContainerBaseI object. More...
 
const TString & GetBranchName () const
 Get the BranchName. More...
 
void SetBranchName (const TString &t_branchname)
 Set the Branch Name. More...
 

Protected Attributes

std::unique_ptr< PndMutableContainerI< T > > fImp {nullptr}
 
- Protected Attributes inherited from PndMutableContainerI< T >
TString fFolderName {""}
 
Bool_t fPersistency {kFALSE}
 
- Protected Attributes inherited from PndContainerBaseI
TString fBranchName {""}
 

Detailed Description

template<class T>
class PndMutableContainer< T >

Definition at line 24 of file PndMutableContainer.h.

Constructor & Destructor Documentation

◆ PndMutableContainer()

template<class T >
PndMutableContainer< T >::PndMutableContainer ( const TString &  t_foldername = "",
Bool_t  t_persistency = kTRUE 
)
inline

Construct a new PndMutableContainer object.

Parameters
constTString &t_foldername : Name of folder
Bool_tt_persistency : Should date be stored to file

Definition at line 33 of file PndMutableContainer.h.

33 : PndMutableContainerI<T>(t_foldername, t_persistency) {}

◆ ~PndMutableContainer()

template<class T >
virtual PndMutableContainer< T >::~PndMutableContainer ( )
inlinevirtual

Destroy the PndMutableContainer object.

Definition at line 39 of file PndMutableContainer.h.

39 {};

Member Function Documentation

◆ Compress()

template<class T >
virtual void PndMutableContainer< T >::Compress ( )
inlinevirtual

Compress.

Reimplemented from PndMutableContainerI< T >.

Definition at line 118 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

119  {
120  if (this->fImp != nullptr) {
121  this->fImp->Compress();
122  }
123  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ CreateCopy()

template<class T >
virtual T* PndMutableContainer< T >::CreateCopy ( const T &  t_data)
inlinefinalvirtual

Create a copy of t_data in internal data and return ptr to it.

Parameters
t_data
Returns
T*

Implements PndMutableContainerI< T >.

Definition at line 67 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

68  {
69  if (this->fImp != nullptr) {
70  return this->fImp->CreateCopy(t_data);
71  }
72  return nullptr;
73  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ GetElement()

template<class T >
virtual T* PndMutableContainer< T >::GetElement ( Int_t  t_index) const
inlinefinalvirtual

Get the Element object at t_index.

Parameters
t_index
Returns
T*

Implements PndMutableContainerI< T >.

Definition at line 106 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

107  {
108  if (this->fImp != nullptr) {
109  return this->fImp->GetElement(t_index);
110  }
111  return nullptr;
112  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ GetSize()

template<class T >
virtual ssize_t PndMutableContainer< T >::GetSize ( ) const
inlinefinalvirtual

Get the number of members in internal data.

Returns
ssize_t

Implements PndContainerBaseI.

Definition at line 92 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

93  {
94  if (this->fImp != nullptr) {
95  return this->fImp->GetSize();
96  }
97  return 0;
98  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ RemoveAt()

template<class T >
virtual void PndMutableContainer< T >::RemoveAt ( Int_t  t_index)
inlinefinalvirtual

Delete object at t_index in internal data.

Parameters
t_index

Implements PndMutableContainerI< T >.

Definition at line 80 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

81  {
82  if (this->fImp != nullptr) {
83  this->fImp->RemoveAt(t_index);
84  }
85  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ Reset()

template<class T >
virtual void PndMutableContainer< T >::Reset ( )
inlinefinalvirtual

Reset data.

Should delete current data

Implements PndMutableContainerI< T >.

Definition at line 54 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

55  {
56  if (this->fImp != nullptr) {
57  this->fImp->Reset();
58  }
59  }
std::unique_ptr< PndMutableContainerI< T > > fImp

◆ SetContainer()

template<class T >
void PndMutableContainer< T >::SetContainer ( PndMutableContainerI< T > *  t_container)
inline

Set the Output Container object.

Parameters
t_container

Definition at line 46 of file PndMutableContainer.h.

References PndMutableContainer< T >::fImp.

46 { this->fImp.reset(t_container); }
std::unique_ptr< PndMutableContainerI< T > > fImp

Member Data Documentation

◆ fImp


The documentation for this class was generated from the following file: