CbmRoot
|
Abstract base class for CBM digitisation tasks. More...
#include <CbmDigitizeBase.h>
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) | |
Abstract base class for CBM digitisation tasks.
This abstract class defines the interfaces of the digitizers to the DAQ.
Definition at line 33 of file CbmDigitizeBase.h.
CbmDigitizeBase::CbmDigitizeBase | ( | ) |
Constructor.
Definition at line 22 of file CbmDigitizeBase.cxx.
CbmDigitizeBase::CbmDigitizeBase | ( | const char * | name | ) |
|
virtual |
Destructor.
Definition at line 52 of file CbmDigitizeBase.cxx.
|
privatedelete |
Copy constructor forbidden.
|
pure virtual |
Check the output arrays.
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 >.
|
private |
|
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< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.
|
inlinevirtual |
Fill custom data into time slice.
fillTime | Time until data can be filled |
limit | If 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.
|
pure virtual |
Fill data into the current time slice.
timeSlice | Pointer to current time slice |
tMax | Maximum time stamp of data to be filled |
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 >.
|
pure virtual |
Fill data into the current time slice.
timeSlice | Pointer to current 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 >.
|
pure virtual |
Size of DAQ buffer @value Number of data in the DAQ buffer.
Implemented in CbmDigitize< Digi >, CbmDigitize< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.
|
pure virtual |
Status of DAQ buffer @value Status string of the DAQ buffer.
Implemented in CbmDigitize< Digi >, CbmDigitize< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.
|
pure virtual |
Time of first datum in DAQ buffer @value Time of first datum in DAQ buffer.
Implemented in CbmDigitize< Digi >, CbmDigitize< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.
|
pure virtual |
Time of last datum in DAQ buffer @value Time of last datum in DAQ buffer.
Implemented in CbmDigitize< Digi >, CbmDigitize< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, and CbmDigitize< CbmTrdDigi >.
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.
Referenced by CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), CbmStsDigitizePixel::Exec(), CbmTofDigitize::Exec(), and CbmTrdDigitizer::Exec().
|
inline |
Current event time @value Start time of current event [ns].
Definition at line 113 of file CbmDigitizeBase.h.
References fCurrentEventTime.
|
pure virtual |
Detector system ID.
Implemented in CbmDigitize< Digi >, CbmDigitize< CbmBmonDigi >, CbmDigitize< CbmFsdDigi >, CbmDigitize< CbmMuchDigi >, CbmDigitize< CbmMvdDigi >, CbmDigitize< CbmPsdDigi >, CbmDigitize< CbmRichDigi >, CbmDigitize< CbmStsDigi >, CbmDigitize< CbmTofDigi >, CbmDigitize< CbmTrdDigi >, and CbmMvdDigitizer.
Referenced by CbmDigitization::Run().
|
pure virtual |
Detector system ID.
Implemented in CbmBmonDigitize, CbmFsdDigitize, CbmMuchDigitizeGem, CbmMvdDigitizer, CbmPsdSimpleDigitizer, CbmRichDigitizer, CbmStsDigitize, CbmStsDigitizePixel, CbmTofDigitize, and CbmTrdDigitizer.
Referenced by CbmDigitize< Digi >::FillTimeSlice().
|
privatedelete |
Assignment operator forbidden.
|
protectedvirtual |
Set of inactive channels, indicated by CbmAddress.
Read the list of inactive channels from file
fileName | File name |
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.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), and CbmTrdDigitizer::Init().
|
inline |
Set creation of links to MC.
Choice | If kTRUE, the match objects will be created |
Definition at line 154 of file CbmDigitizeBase.h.
References fCreateMatches.
Referenced by CbmStsDigitizePixel::Init(), and CbmDigitization::Run().
|
inline |
Set event-by-event mode.
Choice | If kTRUE, the digitizer will run in event-by-event mode |
Definition at line 160 of file CbmDigitizeBase.h.
References fEventMode.
Referenced by CbmDigitization::Run().
|
inline |
Set the file containing the list of inactive channels.
fileName | Name 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.
|
inline |
Set production of inter-event noise.
Choice | If kTRUE, the digitizer will produce noise |
Definition at line 175 of file CbmDigitizeBase.h.
References fProduceNoise.
Referenced by CbmDigitization::Run().
|
inline |
Set the run start time.
Run | start time [ns] |
Definition at line 181 of file CbmDigitizeBase.h.
References fRunStartTime.
Referenced by CbmDigitization::Run().
|
protected |
Flag for production of inter-event noise.
Definition at line 187 of file CbmDigitizeBase.h.
Referenced by CbmDigitize< Digi >::ClearOutput(), CbmStsDigitize::CreateDigi(), CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmMvdDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmDigitize< Digi >::FillTimeSlice(), CbmMvdDigitizer::Finish(), CbmRichDigitizer::ProcessBuffers(), CbmDigitize< Digi >::RegisterOutput(), CbmFsdDigitize::ReleaseBuffer(), and SetCreateMatches().
|
protected |
Number of current input.
Definition at line 190 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::BufferSignals(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmTofDigitize::Exec(), CbmTrdDigitizer::Exec(), CbmMuchDigitizeGem::GenerateNoise(), GetEventInfo(), and CbmRichDigitizer::ProcessMcEvent().
|
protected |
Number of current MC entry.
Definition at line 192 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmRichDigitizer::AddEventNoise(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), CbmStsDigitizePixel::Exec(), CbmTofDigitize::Exec(), CbmTrdDigitizer::Exec(), CbmMuchDigitizeGem::GenerateNoise(), GetEventInfo(), GetEventTime(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), CbmRichDigitizer::ProcessMcEvent(), CbmRichDigitizer::ProcessPoint(), and CbmFsdDigitize::ReleaseBuffer().
|
protected |
Start time of run [ns].
Definition at line 189 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmTrdDigitizer::Exec(), GetEventInfo(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), and CbmRichDigitizer::ProcessMcEvent().
|
protected |
Number of current MC event.
Definition at line 191 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmTrdDigitizer::Exec(), GetEventInfo(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), and CbmRichDigitizer::ProcessMcEvent().
|
protected |
Definition at line 185 of file CbmDigitizeBase.h.
Referenced by CbmTofDigitize::DigitizeDirectClusterSize(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), CbmFsdDigitize::Finish(), CbmMuchDigitizeGem::Finish(), CbmRichDigitizer::Finish(), CbmStsDigitize::Finish(), CbmFsdDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and SetEventMode().
|
protected |
Time of current MC event [ns].
Definition at line 193 of file CbmDigitizeBase.h.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmStsDigitize::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), ReadInactiveChannels(), CbmStsDigitize::ReadInactiveChannels(), and SetInactiveChannelFile().
|
protected |
Name of file with inactive channels.
Definition at line 194 of file CbmDigitizeBase.h.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), CbmDigitize< Digi >::IsChannelActive(), and ReadInactiveChannels().
|
protected |
Flag for event-by-event mode.
Definition at line 186 of file CbmDigitizeBase.h.
Referenced by CbmRichDigitizer::Exec(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and SetProduceNoise().
|
protected |
Flag for creation of links to MC.
Definition at line 188 of file CbmDigitizeBase.h.
Referenced by CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), and SetRunStartTime().