PandaRoot
PndTCAConstContainer< T > Class Template Reference

PndTCAConstContainer implementation of PndConstContainerI<T> for FairRootManager and TClonesArray. More...

#include <PndTCAConstContainer.h>

Inheritance diagram for PndTCAConstContainer< T >:
PndConstContainerI< T > PndContainerI< T > PndContainerBaseI

Public Member Functions

 PndTCAConstContainer ()
 Construct a new PndTCAConstContainer object. More...
 
virtual ~PndTCAConstContainer ()
 Destroy the PndTCAConstContainer object. More...
 
virtual T const * GetElement (Int_t t_idx) const final
 Get pointer to the t_idx-th element. More...
 
virtual ssize_t GetSize () const final
 Get the number of elements. More...
 
void SetTCA (TClonesArray *t_tca)
 Set the TClonesArray address. More...
 
TClonesArray * GetTCA ()
 Get the TClonesArray address. More...
 
- Public Member Functions inherited from PndConstContainerI< T >
 PndConstContainerI ()
 Construct a new PndConstContainerI object. More...
 
virtual T const * GetConstElementPtr (Int_t t_index) const
 Get the Element object at t_index. More...
 
std::vector< T const * > GetVector () const
 return vector of ptrs pointing at internal data, to be used to access data independent of underlying data container 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

TClonesArray * fTCA {nullptr}
 
- Protected Attributes inherited from PndContainerBaseI
TString fBranchName {""}
 

Detailed Description

template<class T>
class PndTCAConstContainer< T >

PndTCAConstContainer implementation of PndConstContainerI<T> for FairRootManager and TClonesArray.

Input data retrieved from FairRootManager is immutable (TClonesArray *)

Template Parameters
T

Definition at line 38 of file PndTCAConstContainer.h.

Constructor & Destructor Documentation

◆ PndTCAConstContainer()

template<class T>
PndTCAConstContainer< T >::PndTCAConstContainer ( )
inline

Construct a new PndTCAConstContainer object.

Definition at line 44 of file PndTCAConstContainer.h.

◆ ~PndTCAConstContainer()

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

Destroy the PndTCAConstContainer object.

Definition at line 50 of file PndTCAConstContainer.h.

50 {};

Member Function Documentation

◆ GetElement()

template<class T>
virtual T const* PndTCAConstContainer< T >::GetElement ( Int_t  t_idx) const
inlinefinalvirtual

Get pointer to the t_idx-th element.

Parameters
Int_tt_idx
Returns
T const *

Implements PndConstContainerI< T >.

Definition at line 58 of file PndTCAConstContainer.h.

59  {
60  if (fTCA != nullptr) {
61  return static_cast<T *>(fTCA->At(t_idx));
62  }
63  return nullptr;
64  }

◆ GetSize()

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

Get the number of elements.

Returns
ssize_t

Implements PndContainerBaseI.

Definition at line 71 of file PndTCAConstContainer.h.

Referenced by BSEmcMCDepositToTimebasedWaveforms< BSEmcBwEndcapDigiPar >::Exec().

72  {
73  if (fTCA != nullptr) {
74  return fTCA->GetEntriesFast();
75  }
76  return 0;
77  }

◆ GetTCA()

template<class T>
TClonesArray* PndTCAConstContainer< T >::GetTCA ( )
inline

Get the TClonesArray address.

Returns
TClonesArray *

Definition at line 91 of file PndTCAConstContainer.h.

91 { return fTCA; }

◆ SetTCA()

template<class T>
void PndTCAConstContainer< T >::SetTCA ( TClonesArray *  t_tca)
inline

Set the TClonesArray address.

Parameters
TClonesArray*t_tca

Definition at line 84 of file PndTCAConstContainer.h.

Referenced by PndProcessTask::HandledRequest(), and BSEmcMCDepositToTimebasedWaveforms< BSEmcBwEndcapDigiPar >::Init().

84 { fTCA = t_tca; }

Member Data Documentation

◆ fTCA


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