CbmRoot
CbmDigiContainer Class Referenceabstract

Abstract container for digis in CBM. More...

#include <CbmDigiContainer.h>

Inheritance diagram for CbmDigiContainer:
[legend]
Collaboration diagram for CbmDigiContainer:
[legend]

Public Member Functions

 CbmDigiContainer (const char *name="")
 Constructor. More...
 
virtual ~CbmDigiContainer ()
 Destructor. More...
 
virtual void AddDigi (boost::any, const CbmMatch *)
 
virtual Bool_t ConnectToTree ()
 Connect the container to ROOT tree branch. More...
 
virtual boost::any GetDigi (UInt_t index)=0
 Get a digi from the container. More...
 
virtual const CbmMatchGetDigiMatch (UInt_t index)=0
 Get a match object from the container. More...
 
virtual Bool_t HasMatches () const =0
 Presence of match branch. More...
 
virtual const char * GetName () const
 Name of container. More...
 
virtual ULong64_t GetNofDigis () const =0
 Get the number of digis in the container. More...
 
virtual std::string ToString () const
 String output. More...
 
 ClassDef (CbmDigiContainer, 1)
 

Detailed Description

Abstract container for digis in CBM.

Author
V. Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
11 March 2020

This abstract base class provides the access interface to containers of digi objects and their MC match objects. The choice of the actual container format (e.g. std::vector or TClonesArray) is left to the implementation of the concrete class.

Definition at line 30 of file CbmDigiContainer.h.

Constructor & Destructor Documentation

◆ CbmDigiContainer()

CbmDigiContainer::CbmDigiContainer ( const char *  name = "")
inline

Constructor.

Definition at line 34 of file CbmDigiContainer.h.

◆ ~CbmDigiContainer()

virtual CbmDigiContainer::~CbmDigiContainer ( )
inlinevirtual

Destructor.

Definition at line 38 of file CbmDigiContainer.h.

Member Function Documentation

◆ AddDigi()

virtual void CbmDigiContainer::AddDigi ( boost::any  ,
const CbmMatch  
)
inlinevirtual

@Add data to the digi container

Parameters
digiPointer to digi object
matchPointer to corresponding match object

Reimplemented in CbmDigiVector< Digi >.

Definition at line 45 of file CbmDigiContainer.h.

◆ ClassDef()

CbmDigiContainer::ClassDef ( CbmDigiContainer  ,
 
)

◆ ConnectToTree()

virtual Bool_t CbmDigiContainer::ConnectToTree ( )
inlinevirtual

Connect the container to ROOT tree branch.

Returns
kTRUE if branch was found

Reimplemented in CbmDigiVector< Digi >.

Definition at line 51 of file CbmDigiContainer.h.

◆ GetDigi()

virtual boost::any CbmDigiContainer::GetDigi ( UInt_t  index)
pure virtual

Get a digi from the container.

Parameters
indexIndex of digi
Returns
Pointer to constant digi object

The return value has to be cast to the digi class using boost::any_cast. It is in the responsibility of the implementation of the derived classes to ensure the correct data type.

Implemented in CbmDigiVector< Digi >.

◆ GetDigiMatch()

virtual const CbmMatch* CbmDigiContainer::GetDigiMatch ( UInt_t  index)
pure virtual

Get a match object from the container.

Parameters
indexIndex of digi
Returns
Pointer to constant match object

Implemented in CbmDigiVector< Digi >.

◆ GetName()

virtual const char* CbmDigiContainer::GetName ( ) const
inlinevirtual

Name of container.

Definition at line 79 of file CbmDigiContainer.h.

Referenced by CbmDigiVector< Digi >::AddDigi(), ToString(), and CbmDigiVector< Digi >::ToString().

◆ GetNofDigis()

virtual ULong64_t CbmDigiContainer::GetNofDigis ( ) const
pure virtual

Get the number of digis in the container.

Implemented in CbmDigiVector< Digi >.

Referenced by CbmEventStore::GetNofDigis(), and CbmEventStore::IsEmpty().

◆ HasMatches()

virtual Bool_t CbmDigiContainer::HasMatches ( ) const
pure virtual

Presence of match branch.

Returns
kTRUE if a match branch is connected

Implemented in CbmDigiVector< Digi >.

◆ ToString()

virtual std::string CbmDigiContainer::ToString ( ) const
inlinevirtual

String output.

Reimplemented in CbmDigiVector< Digi >.

Definition at line 87 of file CbmDigiContainer.h.

References GetName().


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