CbmRoot
Loading...
Searching...
No Matches
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.
 
 CbmDigitizeBase (const char *name)
 Constructor with name.
 
virtual ~CbmDigitizeBase ()
 Destructor.
 
virtual Bool_t CheckOutput ()=0
 Check the output arrays.
 
virtual void ClearOutput ()=0
 Clear the output arrays.
 
virtual void FillCustomData (Double_t, Bool_t=kTRUE)
 Fill custom data into time slice.
 
virtual ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice)=0
 Fill data into the current time slice.
 
virtual ULong64_t FillTimeSlice (CbmTimeSlice *, Double_t tMax)=0
 Fill data into the current time slice.
 
void GetEventInfo ()
 Get event information.
 
Double_t GetEventTime () const
 Current event time @value Start time of current event [ns].
 
virtual ULong64_t GetDaqBufferSize () const =0
 Size of DAQ buffer @value Number of data in the DAQ buffer.
 
virtual std::string GetDaqBufferStatus () const =0
 Status of DAQ buffer @value Status string of the DAQ buffer.
 
virtual Double_t GetDaqBufferTimeFirst () const =0
 Time of first datum in DAQ buffer @value Time of first datum in DAQ buffer.
 
virtual ECbmModuleId GetSystemId () const =0
 Detector system ID.
 
virtual Double_t GetLatency () const =0
 Detector system ID.
 
virtual Double_t GetDaqBufferTimeLast () const =0
 Time of last datum in DAQ buffer @value Time of last datum in DAQ buffer.
 
void SetCreateMatches (Bool_t choice=kTRUE)
 Set creation of links to MC.
 
void SetEventMode (Bool_t choice=kTRUE)
 Set event-by-event mode.
 
void SetInactiveChannelFile (const char *fileName)
 Set the file containing the list of inactive channels.
 
void SetProduceNoise (Bool_t choice=kTRUE)
 Set production of inter-event noise.
 
void SetRunStartTime (Double_t time)
 Set the run start time.
 

Protected Member Functions

virtual std::pair< size_t, bool > ReadInactiveChannels ()
 Set of inactive channels, indicated by CbmAddress.
 

Protected Attributes

Bool_t fEventMode
 
Bool_t fProduceNoise
 Flag for event-by-event mode.
 
Bool_t fCreateMatches
 Flag for production of inter-event noise.
 
Double_t fRunStartTime = 0
 Flag for creation of links to MC.
 
Int_t fCurrentInput
 Start time of run [ns].
 
Int_t fCurrentEvent
 Number of current input.
 
Int_t fCurrentMCEntry
 Number of current MC event.
 
Double_t fCurrentEventTime
 Number of current MC entry.
 
TString fInactiveChannelFileName = ""
 Time of current MC event [ns].
 
std::set< uint32_t > fInactiveChannels = {}
 Name of file with inactive channels.
 

Private Member Functions

 CbmDigitizeBase (const CbmDigitizeBase &)=delete
 Copy constructor forbidden.
 
void operator= (const CbmDigitizeBase &)=delete
 Assignment operator forbidden.
 
 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 33 of file CbmDigitizeBase.h.

Constructor & Destructor Documentation

◆ CbmDigitizeBase() [1/3]

CbmDigitizeBase::CbmDigitizeBase ( )

◆ CbmDigitizeBase() [2/3]

CbmDigitizeBase::CbmDigitizeBase ( const char * name)

Constructor with name.

Parameters
nameTask name

Definition at line 37 of file CbmDigitizeBase.cxx.

References fCreateMatches, fCurrentEvent, fCurrentEventTime, fCurrentInput, fCurrentMCEntry, fEventMode, and fProduceNoise.

◆ ~CbmDigitizeBase()

CbmDigitizeBase::~CbmDigitizeBase ( )
virtual

Destructor.

Definition at line 52 of file CbmDigitizeBase.cxx.

◆ CbmDigitizeBase() [3/3]

CbmDigitizeBase::CbmDigitizeBase ( const CbmDigitizeBase & )
privatedelete

Copy constructor forbidden.

References CbmDigitizeBase().

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< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ ClassDef()

CbmDigitizeBase::ClassDef ( CbmDigitizeBase ,
3  )
private

References CbmDigitizeBase().

◆ ClearOutput()

virtual void CbmDigitizeBase::ClearOutput ( )
pure virtual

◆ 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 75 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< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, 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< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.

◆ GetDaqBufferSize()

virtual ULong64_t CbmDigitizeBase::GetDaqBufferSize ( ) const
pure virtual

◆ GetDaqBufferStatus()

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

◆ GetDaqBufferTimeFirst()

virtual Double_t CbmDigitizeBase::GetDaqBufferTimeFirst ( ) const
pure virtual

◆ GetDaqBufferTimeLast()

virtual Double_t CbmDigitizeBase::GetDaqBufferTimeLast ( ) const
pure virtual

◆ 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 57 of file CbmDigitizeBase.cxx.

References fCurrentEvent, fCurrentEventTime, fCurrentInput, and fCurrentMCEntry.

◆ GetEventTime()

Double_t CbmDigitizeBase::GetEventTime ( ) const
inline

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

Definition at line 113 of file CbmDigitizeBase.h.

References fCurrentEventTime.

◆ GetLatency()

◆ GetSystemId()

virtual ECbmModuleId CbmDigitizeBase::GetSystemId ( ) const
pure virtual

◆ operator=()

void CbmDigitizeBase::operator= ( const CbmDigitizeBase & )
privatedelete

Assignment operator forbidden.

References CbmDigitizeBase().

◆ ReadInactiveChannels()

std::pair< size_t, bool > CbmDigitizeBase::ReadInactiveChannels ( )
protectedvirtual

Set of inactive channels, indicated by CbmAddress.

Read the list of inactive channels from file

Parameters
fileNameFile name
Returns
Number of channels read from file, success of file reading

Reading from the file will stop when a read error occurs. In that case, or when the file could not be opened at all, the success flag will be .false.

Reimplemented in CbmStsDigitize.

Definition at line 80 of file CbmDigitizeBase.cxx.

References fInactiveChannelFileName, and fInactiveChannels.

◆ 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 154 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 160 of file CbmDigitizeBase.h.

References fEventMode.

Referenced by CbmDigitization::Run().

◆ SetInactiveChannelFile()

void CbmDigitizeBase::SetInactiveChannelFile ( const char * fileName)
inline

Set the file containing the list of inactive channels.

Parameters
fileNameName of file

Channels are identified by their CbmAddress. The file must contain a list of addresses, one per line. Comments after the address are allowed if separated by a blank.

Definition at line 169 of file CbmDigitizeBase.h.

References fInactiveChannelFileName.

◆ 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 175 of file CbmDigitizeBase.h.

References fProduceNoise.

Referenced by CbmDigitization::Run().

◆ SetRunStartTime()

void CbmDigitizeBase::SetRunStartTime ( Double_t time)
inline

Set the run start time.

Parameters
Runstart time [ns]

Definition at line 181 of file CbmDigitizeBase.h.

References fRunStartTime.

Referenced by CbmDigitization::Run().

Member Data Documentation

◆ fCreateMatches

Bool_t CbmDigitizeBase::fCreateMatches
protected

◆ fCurrentEvent

Int_t CbmDigitizeBase::fCurrentEvent
protected

Number of current input.

Definition at line 190 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), and GetEventInfo().

◆ fCurrentEventTime

Double_t CbmDigitizeBase::fCurrentEventTime
protected

Number of current MC entry.

Definition at line 192 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), GetEventInfo(), and GetEventTime().

◆ fCurrentInput

Int_t CbmDigitizeBase::fCurrentInput
protected

Start time of run [ns].

Definition at line 189 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), and GetEventInfo().

◆ fCurrentMCEntry

Int_t CbmDigitizeBase::fCurrentMCEntry
protected

Number of current MC event.

Definition at line 191 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), and GetEventInfo().

◆ fEventMode

Bool_t CbmDigitizeBase::fEventMode
protected

Definition at line 185 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), and SetEventMode().

◆ fInactiveChannelFileName

TString CbmDigitizeBase::fInactiveChannelFileName = ""
protected

Time of current MC event [ns].

Definition at line 193 of file CbmDigitizeBase.h.

Referenced by ReadInactiveChannels(), and SetInactiveChannelFile().

◆ fInactiveChannels

std::set<uint32_t> CbmDigitizeBase::fInactiveChannels = {}
protected

Name of file with inactive channels.

Definition at line 194 of file CbmDigitizeBase.h.

Referenced by CbmDigitize< Digi >::IsChannelActive(), and ReadInactiveChannels().

◆ fProduceNoise

Bool_t CbmDigitizeBase::fProduceNoise
protected

Flag for event-by-event mode.

Definition at line 186 of file CbmDigitizeBase.h.

Referenced by CbmDigitizeBase(), CbmDigitizeBase(), and SetProduceNoise().

◆ fRunStartTime

Double_t CbmDigitizeBase::fRunStartTime = 0
protected

Flag for creation of links to MC.

Definition at line 188 of file CbmDigitizeBase.h.

Referenced by SetRunStartTime().


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