CbmRoot
CbmDigitizeBase Class Referenceabstract

Abstract base class for CBM digitisation tasks. More...

#include <CbmDigitizeBase.h>

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

Public Member Functions

 CbmDigitizeBase ()
 Constructor. More...
 
 CbmDigitizeBase (const char *name)
 Constructor with name. More...
 
virtual ~CbmDigitizeBase ()
 Destructor. More...
 
virtual Bool_t CheckOutput ()=0
 Check the output arrays. More...
 
virtual void ClearOutput ()=0
 Clear the output arrays. More...
 
virtual void FillCustomData (Double_t, Bool_t=kTRUE)
 Fill custom data into time slice. More...
 
virtual ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice)=0
 Fill data into the current time slice. More...
 
virtual ULong64_t FillTimeSlice (CbmTimeSlice *, Double_t tMax)=0
 Fill data into the current time slice. More...
 
void GetEventInfo ()
 Get event information. More...
 
Double_t GetEventTime () const
 Current event time @value Start time of current event [ns]. More...
 
virtual ULong64_t GetDaqBufferSize () const =0
 Size of DAQ buffer @value Number of data in the DAQ buffer. More...
 
virtual std::string GetDaqBufferStatus () const =0
 Status of DAQ buffer @value Status string of the DAQ buffer. More...
 
virtual Double_t GetDaqBufferTimeFirst () const =0
 Time of first datum in DAQ buffer @value Time of first datum in DAQ buffer. More...
 
virtual ECbmModuleId GetSystemId () const =0
 Detector system ID. More...
 
virtual Double_t GetDaqBufferTimeLast () const =0
 Time of last datum in DAQ buffer @value Time of last datum in DAQ buffer. More...
 
void SetCreateMatches (Bool_t choice=kTRUE)
 Set creation of links to MC. More...
 
void SetEventMode (Bool_t choice=kTRUE)
 Set event-by-event mode. More...
 
void SetProduceNoise (Bool_t choice=kTRUE)
 Set production of inter-event noise. More...
 

Protected Attributes

Bool_t fEventMode
 
Bool_t fProduceNoise
 Flag for event-by-event mode. More...
 
Bool_t fCreateMatches
 Flag for production of inter-event noise. More...
 
Int_t fCurrentInput
 Flag for creation of links to MC. More...
 
Int_t fCurrentEvent
 Number of current input. More...
 
Int_t fCurrentMCEntry
 Number of current MC event. More...
 
Double_t fCurrentEventTime
 Number of current MC entry. More...
 

Private Member Functions

 CbmDigitizeBase (const CbmDigitizeBase &)=delete
 Time of current MC event [ns]. More...
 
void operator= (const CbmDigitizeBase &)=delete
 Assignment operator forbidden. More...
 
 ClassDef (CbmDigitizeBase, 3)
 

Detailed Description

Abstract base class for CBM digitisation tasks.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Date
01 June 2018

This abstract class defines the interfaces of the digitizers to the DAQ.

Definition at line 26 of file CbmDigitizeBase.h.

Constructor & Destructor Documentation

◆ CbmDigitizeBase() [1/3]

CbmDigitizeBase::CbmDigitizeBase ( )

Constructor.

Definition at line 17 of file CbmDigitizeBase.cxx.

◆ CbmDigitizeBase() [2/3]

CbmDigitizeBase::CbmDigitizeBase ( const char *  name)

Constructor with name.

Parameters
nameTask name

Definition at line 30 of file CbmDigitizeBase.cxx.

◆ ~CbmDigitizeBase()

CbmDigitizeBase::~CbmDigitizeBase ( )
virtual

Destructor.

Definition at line 43 of file CbmDigitizeBase.cxx.

◆ CbmDigitizeBase() [3/3]

CbmDigitizeBase::CbmDigitizeBase ( const CbmDigitizeBase )
privatedelete

Time of current MC event [ns].

Copy constructor forbidden

Member Function Documentation

◆ CheckOutput()

virtual Bool_t CbmDigitizeBase::CheckOutput ( )
pure virtual

Check the output arrays.

Returns
kTRUE if output is OK

Will be called by the DAQ before filling the output tree. A typical check to be implemented is e.g. whether the output array is time-sorted.

Implemented in CbmDigitize< Digi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ ClassDef()

CbmDigitizeBase::ClassDef ( CbmDigitizeBase  ,
 
)
private

◆ ClearOutput()

virtual void CbmDigitizeBase::ClearOutput ( )
pure virtual

Clear the output arrays.

Will be called by the DAQ at the beginning of a new time slice (after a tree fill).

Implemented in CbmDigitize< Digi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ FillCustomData()

virtual void CbmDigitizeBase::FillCustomData ( Double_t  ,
Bool_t  = kTRUE 
)
inlinevirtual

Fill custom data into time slice.

Parameters
fillTimeTime until data can be filled
limitIf kTRUE, only data up to fillTime will be treated; otherwise, all.

This method allows the digitizer to implement additional functionality than writing digis and match objects. It will be called from CbmDaq.

Definition at line 68 of file CbmDigitizeBase.h.

◆ FillTimeSlice() [1/2]

virtual ULong64_t CbmDigitizeBase::FillTimeSlice ( CbmTimeSlice ,
Double_t  tMax 
)
pure virtual

Fill data into the current time slice.

Parameters
timeSlicePointer to current time slice
tMaxMaximum time stamp of data to be filled
Returns
Number of data filled into the time slice

Data with time stamp in the interval defined by the current time slice, but less than the time tMax are filled into the output arrays.

Implemented in CbmDigitize< Digi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ FillTimeSlice() [2/2]

virtual ULong64_t CbmDigitizeBase::FillTimeSlice ( CbmTimeSlice timeSlice)
pure virtual

Fill data into the current time slice.

Parameters
timeSlicePointer to current time slice
Returns
Number of data filled into the time slice

Data with time stamp in the interval defined by the current time slice are filled into the output array.

Implemented in CbmDigitize< Digi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ GetDaqBufferSize()

virtual ULong64_t CbmDigitizeBase::GetDaqBufferSize ( ) const
pure virtual

Size of DAQ buffer @value Number of data in the DAQ buffer.

Implemented in CbmDigitize< Digi >.

◆ GetDaqBufferStatus()

virtual std::string CbmDigitizeBase::GetDaqBufferStatus ( ) const
pure virtual

Status of DAQ buffer @value Status string of the DAQ buffer.

Implemented in CbmDigitize< Digi >.

◆ GetDaqBufferTimeFirst()

virtual Double_t CbmDigitizeBase::GetDaqBufferTimeFirst ( ) const
pure virtual

Time of first datum in DAQ buffer @value Time of first datum in DAQ buffer.

Implemented in CbmDigitize< Digi >.

◆ GetDaqBufferTimeLast()

virtual Double_t CbmDigitizeBase::GetDaqBufferTimeLast ( ) const
pure virtual

Time of last datum in DAQ buffer @value Time of last datum in DAQ buffer.

Implemented in CbmDigitize< Digi >.

◆ GetEventInfo()

void CbmDigitizeBase::GetEventInfo ( )

Get event information.

MC input number, entry number and event time are taken from FairEventHeader and stored in the private data members for convenience. Note that the MC entry number need not coincide with the event number, for instance if the run does not start with the first MC entry, or in the case of mixed MC inputs to digitization.

Definition at line 48 of file CbmDigitizeBase.cxx.

References fCurrentEvent, fCurrentEventTime, fCurrentInput, and fCurrentMCEntry.

Referenced by CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmTofDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmTrdDigitizer::Exec(), and CbmStsDigitize::Exec().

◆ GetEventTime()

Double_t CbmDigitizeBase::GetEventTime ( ) const
inline

Current event time @value Start time of current event [ns].

Definition at line 107 of file CbmDigitizeBase.h.

References fCurrentEventTime.

◆ GetSystemId()

virtual ECbmModuleId CbmDigitizeBase::GetSystemId ( ) const
pure virtual

Detector system ID.

Returns
Detector system ID [ECbmModuleId]

Implemented in CbmStsDigitize, CbmMuchDigitizeGem, CbmTrdDigitizer, CbmRichDigitizer, CbmTofDigitize, CbmMvdDigitizer, and CbmPsdSimpleDigitizer.

Referenced by CbmDigitize< CbmTrdDigi >::FillTimeSlice().

◆ operator=()

void CbmDigitizeBase::operator= ( const CbmDigitizeBase )
privatedelete

Assignment operator forbidden.

◆ SetCreateMatches()

void CbmDigitizeBase::SetCreateMatches ( Bool_t  choice = kTRUE)
inline

Set creation of links to MC.

Parameters
ChoiceIf kTRUE, the match objects will be created

Definition at line 143 of file CbmDigitizeBase.h.

References fCreateMatches.

Referenced by CbmDigitization::Run().

◆ SetEventMode()

void CbmDigitizeBase::SetEventMode ( Bool_t  choice = kTRUE)
inline

Set event-by-event mode.

Parameters
ChoiceIf kTRUE, the digitizer will run in event-by-event mode

Definition at line 149 of file CbmDigitizeBase.h.

References fEventMode.

Referenced by CbmDigitization::Run().

◆ SetProduceNoise()

void CbmDigitizeBase::SetProduceNoise ( Bool_t  choice = kTRUE)
inline

Set production of inter-event noise.

Parameters
ChoiceIf kTRUE, the digitizer will produce noise

Definition at line 155 of file CbmDigitizeBase.h.

References fProduceNoise.

Referenced by CbmDigitization::Run().

Member Data Documentation

◆ fCreateMatches

◆ fCurrentEvent

◆ fCurrentEventTime

◆ fCurrentInput

◆ fCurrentMCEntry

◆ fEventMode

◆ fProduceNoise

Bool_t CbmDigitizeBase::fProduceNoise
protected

Flag for event-by-event mode.

Definition at line 160 of file CbmDigitizeBase.h.

Referenced by CbmRichDigitizer::Exec(), CbmStsDigitize::InitParams(), and SetProduceNoise().


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