FairRoot
|
A container class to store digi data during events. More...
#include <FairWriteoutBuffer.h>
Public Member Functions | |
FairWriteoutBuffer () | |
FairWriteoutBuffer (TString branchName, TString className, TString folderName, Bool_t persistance) | |
virtual | ~FairWriteoutBuffer () |
virtual void | SaveDataToTree (Bool_t val=kTRUE) |
virtual void | ActivateBuffering (Bool_t val=kTRUE) |
Bool_t | IsBufferingActivated () |
virtual void | FillNewData (FairTimeStamp *data, double startTime, double activeTime) |
virtual Int_t | GetNData () |
virtual std::vector < FairTimeStamp * > | GetRemoveOldData (double time) |
virtual std::vector < FairTimeStamp * > | GetAllData () |
virtual void | SetVerbose (Int_t val) |
virtual void | DeleteOldData () |
virtual void | WriteOutData (double time) |
virtual void | WriteOutAllData () |
Protected Member Functions | |
virtual void | AddNewDataToTClonesArray (FairTimeStamp *data)=0 |
virtual double | FindTimeForData (FairTimeStamp *data)=0 |
virtual void | FillDataMap (FairTimeStamp *data, double activeTime)=0 |
add a new element in the search buffer More... | |
virtual void | EraseDataFromDataMap (FairTimeStamp *data)=0 |
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer) More... | |
virtual std::vector< std::pair < double, FairTimeStamp * > > | Modify (std::pair< double, FairTimeStamp * > oldData, std::pair< double, FairTimeStamp * >) |
virtual void | WriteOutDataDeadTimeMap (double time) |
virtual void | MoveDataFromStartTimeMapToDeadTimeMap (double time) |
virtual void | FillDataToDeadTimeMap (FairTimeStamp *data, double activeTime, double startTime) |
virtual void | PrintData (FairTimeStamp *data) |
virtual void | PrintDeadTimeMap () |
Method should be overwritten in derived classes to print the data of an object stored in the buffer. More... | |
virtual void | PrintStartTimeMap () |
Protected Attributes | |
std::multimap< double, std::pair< double, FairTimeStamp * > > | fStartTime_map |
std::multimap< double, FairTimeStamp * > | fDeadTime_map |
TString | fBranchName |
TString | fClassName |
Bool_t | fTreeSave |
Bool_t | fActivateBuffering |
Int_t | fVerbose |
FairLogger * | fLogger |
A container class to store digi data during events.
The data which should be stored in the buffer has to be derived from FairTimeStamp. It needs an operator< and a method equal if the same detector element is hit.
To use this buffer one has to derive his own buffer class from FairWriteoutBuffer and overwrite the pure virtual functions.
Definition at line 48 of file FairWriteoutBuffer.h.
|
inline |
Definition at line 51 of file FairWriteoutBuffer.h.
FairWriteoutBuffer::FairWriteoutBuffer | ( | TString | branchName, |
TString | className, | ||
TString | folderName, | ||
Bool_t | persistance | ||
) |
Definition at line 23 of file FairWriteoutBuffer.cxx.
|
inlinevirtual |
Definition at line 62 of file FairWriteoutBuffer.h.
|
inlinevirtual |
< fActivateBuffering has to be set to kTRUE to use the buffering. Otherwise the data is directly stored in the given TClonesArray.
Definition at line 69 of file FairWriteoutBuffer.h.
|
protectedpure virtual |
store the data from the FairTimeStamp pointer in a TClonesArray (you have to cast it to your type of data)
Implemented in FairTestDetectorDigiWriteoutBuffer, and MyWriteoutBuffer.
|
inlinevirtual |
Definition at line 88 of file FairWriteoutBuffer.h.
|
protectedpure virtual |
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer)
Implemented in FairTestDetectorDigiWriteoutBuffer, and MyWriteoutBuffer.
|
protectedpure virtual |
add a new element in the search buffer
Implemented in FairTestDetectorDigiWriteoutBuffer, and MyWriteoutBuffer.
|
protectedvirtual |
Definition at line 160 of file FairWriteoutBuffer.cxx.
|
virtual |
Fills a pointer to a data object into the buffer. StartTime gives the time when the data can influence later data, activeTime gives the time how long the data can influence later data. Both time data has to be given as an absolute time!
Definition at line 144 of file FairWriteoutBuffer.cxx.
|
protectedpure virtual |
if the same data object (like a pad or a pixel) is already present in the buffer, the time of this object has to be returned otherwise -1
Implemented in FairTestDetectorDigiWriteoutBuffer, and MyWriteoutBuffer.
|
virtual |
Definition at line 139 of file FairWriteoutBuffer.cxx.
|
inlinevirtual |
Definition at line 82 of file FairWriteoutBuffer.h.
|
virtual |
Definition at line 124 of file FairWriteoutBuffer.cxx.
|
inline |
Definition at line 75 of file FairWriteoutBuffer.h.
|
inlineprotectedvirtual |
Modify defines the behavior of the buffer if data should be stored which is already in the buffer. Parameters are the old data with the active time, the new data with an active time. Modify returns than a vector with the new data which should be stored.
Definition at line 113 of file FairWriteoutBuffer.h.
|
protectedvirtual |
Definition at line 246 of file FairWriteoutBuffer.cxx.
|
inlineprotectedvirtual |
Definition at line 125 of file FairWriteoutBuffer.h.
|
protectedvirtual |
Method should be overwritten in derived classes to print the data of an object stored in the buffer.
Definition at line 270 of file FairWriteoutBuffer.cxx.
|
protectedvirtual |
Definition at line 259 of file FairWriteoutBuffer.cxx.
|
inlinevirtual |
< If SaveDataToTree is set the data is stored at the end of the buffering into the given TClonesArray.
Definition at line 64 of file FairWriteoutBuffer.h.
|
inlinevirtual |
Definition at line 86 of file FairWriteoutBuffer.h.
|
virtual |
Definition at line 104 of file FairWriteoutBuffer.cxx.
|
virtual |
Definition at line 42 of file FairWriteoutBuffer.cxx.
|
protectedvirtual |
Definition at line 71 of file FairWriteoutBuffer.cxx.
|
protected |
Definition at line 138 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 135 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 136 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 133 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 140 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 132 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 137 of file FairWriteoutBuffer.h.
|
protected |
Definition at line 139 of file FairWriteoutBuffer.h.