FairRoot/PandaRoot
|
A container class to store digi data during events. More...
#include <PndWriteoutBuffer.h>
Public Member Functions | |
PndWriteoutBuffer () | |
PndWriteoutBuffer (TString branchName, TString className, TString folderName, Bool_t persistance) | |
virtual | ~PndWriteoutBuffer () |
virtual void | WriteOutData (double time) |
virtual void | WriteOutAllData () |
virtual void | SaveDataToTree (Bool_t val=kTRUE) |
If SaveDataToTree is set the data is stored at the end of the buffering into the given TClonesArray. More... | |
virtual void | ActivateBuffering (Bool_t val=kTRUE) |
fActivateBuffering has to be set to kTRUE to use the buffering. Otherwise the data is directly stored in the given TClonesArray. More... | |
virtual std::vector < FairTimeStamp * > | GetRemoveOldData (double time) |
virtual std::vector < FairTimeStamp * > | GetAllData () |
virtual void | FillNewData (FairTimeStamp *data, double activeTime) |
virtual Int_t | GetNData () |
virtual void | AddNewDataToTClonesArray (FairTimeStamp *data)=0 |
store the data from the FairTimeStamp pointer in a TClonesArray (you have to cast it to your type of data) More... | |
virtual void | DeleteOldData () |
virtual double | FindTimeForData (FairTimeStamp *data)=0 |
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 More... | |
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 void | SetVerbose (Int_t val) |
Protected Member Functions | |
virtual std::vector< std::pair < double, FairTimeStamp * > > | Modify (std::pair< double, FairTimeStamp * > oldData, std::pair< double, FairTimeStamp * > newData) |
ClassDef (PndWriteoutBuffer, 1) | |
Protected Attributes | |
std::multimap< double, FairTimeStamp * > | fDeadTime_map |
TString | fBranchName |
TString | fClassName |
Bool_t | fTreeSave |
Bool_t | fActivateBuffering |
Int_t | fVerbose |
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 36 of file PndWriteoutBuffer.h.
|
inline |
Definition at line 38 of file PndWriteoutBuffer.h.
PndWriteoutBuffer::PndWriteoutBuffer | ( | TString | branchName, |
TString | className, | ||
TString | folderName, | ||
Bool_t | persistance | ||
) |
Definition at line 15 of file PndWriteoutBuffer.cxx.
References fBranchName, fClassName, and fTreeSave.
|
inlinevirtual |
Definition at line 40 of file PndWriteoutBuffer.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 46 of file PndWriteoutBuffer.h.
References fActivateBuffering, and val.
|
pure virtual |
store the data from the FairTimeStamp pointer in a TClonesArray (you have to cast it to your type of data)
Referenced by FillNewData(), and WriteOutData().
|
protected |
|
inlinevirtual |
|
pure virtual |
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer)
Referenced by FillNewData(), and GetRemoveOldData().
|
pure virtual |
add a new element in the search buffer
Referenced by FillNewData().
|
virtual |
Definition at line 79 of file PndWriteoutBuffer.cxx.
References AddNewDataToTClonesArray(), EraseDataFromDataMap(), fActivateBuffering, fDeadTime_map, FillDataMap(), FindTimeForData(), fVerbose, i, and Modify().
|
pure 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
Referenced by FillNewData().
|
virtual |
Definition at line 72 of file PndWriteoutBuffer.cxx.
References fDeadTime_map, and GetRemoveOldData().
|
inlinevirtual |
Definition at line 51 of file PndWriteoutBuffer.h.
References fDeadTime_map.
|
virtual |
Definition at line 59 of file PndWriteoutBuffer.cxx.
References EraseDataFromDataMap(), fDeadTime_map, and fVerbose.
Referenced by GetAllData(), and WriteOutData().
|
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 68 of file PndWriteoutBuffer.h.
Referenced by FillNewData().
|
inlinevirtual |
If SaveDataToTree is set the data is stored at the end of the buffering into the given TClonesArray.
Definition at line 45 of file PndWriteoutBuffer.h.
|
inlinevirtual |
Definition at line 63 of file PndWriteoutBuffer.h.
|
virtual |
Definition at line 52 of file PndWriteoutBuffer.cxx.
References fDeadTime_map, and WriteOutData().
|
virtual |
Definition at line 25 of file PndWriteoutBuffer.cxx.
References AddNewDataToTClonesArray(), fActivateBuffering, fBranchName, fTreeSave, fVerbose, GetRemoveOldData(), and i.
Referenced by WriteOutAllData().
|
protected |
Definition at line 79 of file PndWriteoutBuffer.h.
Referenced by ActivateBuffering(), FillNewData(), and WriteOutData().
|
protected |
Definition at line 76 of file PndWriteoutBuffer.h.
Referenced by DeleteOldData(), PndWriteoutBuffer(), and WriteOutData().
|
protected |
Definition at line 77 of file PndWriteoutBuffer.h.
Referenced by PndWriteoutBuffer().
|
protected |
Definition at line 74 of file PndWriteoutBuffer.h.
Referenced by FillNewData(), GetAllData(), GetNData(), GetRemoveOldData(), and WriteOutAllData().
|
protected |
Definition at line 78 of file PndWriteoutBuffer.h.
Referenced by PndWriteoutBuffer(), SaveDataToTree(), and WriteOutData().
|
protected |
Definition at line 80 of file PndWriteoutBuffer.h.
Referenced by FillNewData(), GetRemoveOldData(), SetVerbose(), and WriteOutData().