CbmRoot
|
#include <CbmReadoutBuffer.h>
Public Member Functions | |
CbmReadoutBuffer () | |
CbmReadoutBuffer (TString branchName, TString folderName, Bool_t persistence=kTRUE) | |
CbmReadoutBuffer (const CbmReadoutBuffer &)=delete | |
CbmReadoutBuffer & | operator= (const CbmReadoutBuffer &)=delete |
virtual | ~CbmReadoutBuffer () |
virtual void | AddNewDataToTClonesArray (FairTimeStamp *) |
Bool_t | CheckData (Data *data) |
Bool_t | CheckInterference (Data *data1, Data *data2) |
virtual void | DeleteOldData () |
virtual void | EraseDataFromDataMap (FairTimeStamp *) |
void | Fill (UInt_t address, Data *data) |
virtual void | FillDataMap (FairTimeStamp *, double) |
virtual double | FindTimeForData (FairTimeStamp *) |
virtual Int_t | GetNData () |
virtual Int_t | Merge (Data *oldData1, Data *oldData2, std::vector< Data * > &newDataList) |
virtual void | WriteOutAllData () |
Int_t | ReadOutData (Double_t time, std::vector< Data * > &dataList) |
virtual void | WriteOutData (Double_t time) |
Protected Attributes | |
std::multimap< UInt_t, Data * > | fBuffer |
std::multimap< UInt_t, Data * >::iterator | fBufferIt |
std::multimap< UInt_t, Data * >::iterator | fOldIt |
TClonesArray * | fArray |
Bool_t | fWriteToArray |
Definition at line 27 of file CbmReadoutBuffer.h.
|
inline |
Default constructor
No output TClonesArray will be present. The buffered data have to be fetched through ReadOutData.
Definition at line 36 of file CbmReadoutBuffer.h.
|
inline |
Constructor with branch and folder name
branchName | Name of branch in output tree |
folderName | No idea what this is good for |
persistence | If kTRUE (default), the branch will appear in the output file. |
If this constructor is used, a branch with a TClonesArray will be created. Data from the buffer will be copied to this array. Note that in this case, ReadOutData will deliver no data (for the same readout time), since the buffered data are deleted after being copied to the array.
Definition at line 56 of file CbmReadoutBuffer.h.
|
delete |
|
inlinevirtual |
Destructor
Cleans up remaining data in the buffer, if present, which should not be the case if used properly.
Definition at line 86 of file CbmReadoutBuffer.h.
|
inlinevirtual |
Adding data to the TClonesArray Abstract method from FairWriteoutBuffer; not needed in this template implementation.
Definition at line 101 of file CbmReadoutBuffer.h.
|
inline |
Check data for consistency (stop time should be larger than start time)
data | Data object @value kTRUE is stop time is later than start time. |
Definition at line 111 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::Fill().
|
inline |
Check interference of two data objects
data1,data2 | Data objects @value kTRUE if objects interfere |
Interference is present if the temporal extension of the objects overlap.
Definition at line 125 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::Fill().
|
inlinevirtual |
Clear the output TClonesArray Called at the end of the event from FairRootManager
Definition at line 137 of file CbmReadoutBuffer.h.
|
inlinevirtual |
Erase data from data map Abstract method from FairWriteoutBuffer; not needed in this template implementation.
Definition at line 148 of file CbmReadoutBuffer.h.
|
inline |
Fill data into the buffer
address | Unique address |
data | Pointer to data object |
If, for the same address, other data are present in the buffer, the time intervals of old and new data will be compared. If there is no time overlap with already present data, the new data will be inserted into the buffer. Otherwise, the method Modify is called and the resulting, modified data are inserted into the buffer.
Definition at line 163 of file CbmReadoutBuffer.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmMuchDigitizeGem::AddNoiseSignal(), CbmMuchDigitizeGem::BufferSignals(), and CbmReadoutBuffer< CbmMuchSignal >::Fill().
|
inlinevirtual |
Fill data map Abstract method from FairWriteoutBuffer; not needed in this template implementation.
Definition at line 249 of file CbmReadoutBuffer.h.
|
inlinevirtual |
Active time for a given data object Abstract method from FairWriteoutBuffer; not needed in this template implementation.
Definition at line 258 of file CbmReadoutBuffer.h.
|
inlinevirtual |
Number of data in the buffer
Definition at line 266 of file CbmReadoutBuffer.h.
Referenced by CbmMuchDigitizeGem::Finish().
|
inlinevirtual |
Reimplemented in CbmMuchReadoutBuffer.
Definition at line 272 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::Fill().
|
delete |
|
inline |
Read out data from the buffer
[in] | time | Readout time. If < 0, all data will be read out. |
[out] | dataList | Vector with pointers to data objects @value Number of data objects read out |
Data interface alternative to the TClonesArray. Data from the buffer with stop time before the specified readout time will be delivered and removed from the buffer. The object ownership is passed to the consumer, who is responsible for destroying the data objects in the data vector.
Definition at line 318 of file CbmReadoutBuffer.h.
Referenced by CbmMuchDigitizeGem::ReadAndRegister().
|
inlinevirtual |
Write out all data in the buffer to the TClonesArray
All buffer data, irrespective of time, will be copied to the output array and deleted from the buffer. Called from Framework (FairRootManager)
Definition at line 302 of file CbmReadoutBuffer.h.
|
inlinevirtual |
Write out data to the TClonesArray
time | Readout time. If < 0, all data will be written out. |
All data with stop time before the readout time will be copied to the output array and deleted from the buffer. Called from Framework (FairRootManager). Note that this method has no effect if fWriteToArray is kFALSE, which is the default.
Definition at line 369 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::WriteOutAllData().
|
protected |
Definition at line 420 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::CbmReadoutBuffer(), CbmReadoutBuffer< CbmMuchSignal >::DeleteOldData(), and CbmReadoutBuffer< CbmMuchSignal >::WriteOutData().
|
protected |
Definition at line 417 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::Fill(), CbmReadoutBuffer< CbmMuchSignal >::GetNData(), CbmReadoutBuffer< CbmMuchSignal >::ReadOutData(), CbmReadoutBuffer< CbmMuchSignal >::WriteOutData(), and CbmReadoutBuffer< CbmMuchSignal >::~CbmReadoutBuffer().
|
protected |
Definition at line 418 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::Fill(), CbmReadoutBuffer< CbmMuchSignal >::ReadOutData(), CbmReadoutBuffer< CbmMuchSignal >::WriteOutData(), and CbmReadoutBuffer< CbmMuchSignal >::~CbmReadoutBuffer().
|
protected |
Definition at line 419 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::ReadOutData(), and CbmReadoutBuffer< CbmMuchSignal >::WriteOutData().
|
protected |
Definition at line 421 of file CbmReadoutBuffer.h.
Referenced by CbmReadoutBuffer< CbmMuchSignal >::WriteOutData().