EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
A container class to store digi data during events. More...
#include <EicRoot/blob/master/base/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) |
If SaveDataToTree is set the data is stored at the end of the buffering into the given TClonesArray. | |
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. | |
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 |
store the data from the FairTimeStamp pointer in a TClonesArray (you have to cast it to your type of data) | |
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 | |
virtual void | FillDataMap (FairTimeStamp *data, double activeTime)=0 |
add a new element in the search buffer | |
virtual void | EraseDataFromDataMap (FairTimeStamp *data)=0 |
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer) | |
virtual std::vector< std::pair < double, FairTimeStamp * > > | Modify (std::pair< double, FairTimeStamp * > oldData, std::pair< double, FairTimeStamp * > newData) |
virtual void | WriteOutDataDeadTimeMap (double time) |
virtual void | MoveDataFromStartTimeMapToDeadTimeMap (double time) |
virtual void | FillDataToDeadTimeMap (FairTimeStamp *data, double activeTime) |
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. | |
virtual void | PrintStartTimeMap () |
ClassDef (FairWriteoutBuffer, 1) | |
/// FairLogger | |
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 37 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 37 of file FairWriteoutBuffer.h
|
inline |
Definition at line 40 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 40 of file FairWriteoutBuffer.h
FairWriteoutBuffer::FairWriteoutBuffer | ( | TString | branchName, |
TString | className, | ||
TString | folderName, | ||
Bool_t | persistance | ||
) |
Definition at line 15 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 15 of file FairWriteoutBuffer.cxx
References fBranchName, fClassName, fTreeSave, FairRootManager::Instance(), and FairRootManager::Register().
|
inlinevirtual |
Definition at line 43 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 43 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 46 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 46 of file FairWriteoutBuffer.h
References fActivateBuffering.
|
protectedpure virtual |
store the data from the FairTimeStamp pointer in a TClonesArray (you have to cast it to your type of data)
Referenced by FillDataToDeadTimeMap(), FillNewData(), and WriteOutDataDeadTimeMap().
|
protected |
/// FairLogger
|
inlinevirtual |
Definition at line 59 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 59 of file FairWriteoutBuffer.h
References fBranchName, FairRootManager::GetTClonesArray(), and FairRootManager::Instance().
|
protectedpure virtual |
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer)
Referenced by FillDataToDeadTimeMap(), and GetRemoveOldData().
|
protectedpure virtual |
add a new element in the search buffer
Referenced by FillDataToDeadTimeMap().
|
protectedvirtual |
Definition at line 159 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 159 of file FairWriteoutBuffer.cxx
References AddNewDataToTClonesArray(), data, FairTimeStamp::equal(), EraseDataFromDataMap(), fActivateBuffering, fDeadTime_map, FillDataMap(), FindTimeForData(), fVerbose, it, Modify(), and FairTimeStamp::Print().
Referenced by MoveDataFromStartTimeMapToDeadTimeMap().
|
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 141 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 141 of file FairWriteoutBuffer.cxx
References AddNewDataToTClonesArray(), fActivateBuffering, fStartTime_map, and fVerbose.
|
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
Referenced by FillDataToDeadTimeMap().
|
virtual |
Definition at line 136 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 136 of file FairWriteoutBuffer.cxx
References fDeadTime_map, and GetRemoveOldData().
|
inlinevirtual |
Definition at line 52 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 52 of file FairWriteoutBuffer.h
References fDeadTime_map.
|
virtual |
Definition at line 120 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 120 of file FairWriteoutBuffer.cxx
References EraseDataFromDataMap(), fDeadTime_map, fVerbose, and it.
Referenced by GetAllData(), and WriteOutDataDeadTimeMap().
|
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 76 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 76 of file FairWriteoutBuffer.h
Referenced by FillDataToDeadTimeMap().
|
protectedvirtual |
Definition at line 226 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 226 of file FairWriteoutBuffer.cxx
References data, FillDataToDeadTimeMap(), and fStartTime_map.
Referenced by WriteOutAllData(), and WriteOutData().
|
inlineprotectedvirtual |
Definition at line 87 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 87 of file FairWriteoutBuffer.h
References FairTimeStamp::GetTimeStamp().
Referenced by PrintDeadTimeMap().
|
protectedvirtual |
Method should be overwritten in derived classes to print the data of an object stored in the buffer.
Definition at line 250 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 250 of file FairWriteoutBuffer.cxx
References fDeadTime_map, it, and PrintData().
Referenced by WriteOutData().
|
protectedvirtual |
Definition at line 239 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 239 of file FairWriteoutBuffer.cxx
References data, fStartTime_map, and FairTimeStamp::GetTimeStamp().
Referenced by WriteOutData().
|
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 FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 45 of file FairWriteoutBuffer.h
References fTreeSave.
|
inlinevirtual |
Definition at line 57 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 57 of file FairWriteoutBuffer.h
References fVerbose.
|
virtual |
Definition at line 99 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 99 of file FairWriteoutBuffer.cxx
References fDeadTime_map, fStartTime_map, MoveDataFromStartTimeMapToDeadTimeMap(), and WriteOutData().
|
virtual |
Definition at line 35 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 35 of file FairWriteoutBuffer.cxx
References fActivateBuffering, fBranchName, fVerbose, FairRootManager::GetTClonesArray(), FairRootManager::Instance(), MoveDataFromStartTimeMapToDeadTimeMap(), PrintDeadTimeMap(), PrintStartTimeMap(), and WriteOutDataDeadTimeMap().
Referenced by WriteOutAllData().
|
protectedvirtual |
Definition at line 66 of file FairWriteoutBuffer.cxx.
View newest version in sPHENIX GitHub at line 66 of file FairWriteoutBuffer.cxx
References AddNewDataToTClonesArray(), data, fActivateBuffering, fBranchName, fTreeSave, fVerbose, GetRemoveOldData(), FairRootManager::GetTClonesArray(), and FairRootManager::Instance().
Referenced by WriteOutData().
|
protected |
Definition at line 97 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 97 of file FairWriteoutBuffer.h
Referenced by ActivateBuffering(), FillDataToDeadTimeMap(), FillNewData(), WriteOutData(), and WriteOutDataDeadTimeMap().
|
protected |
Definition at line 94 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 94 of file FairWriteoutBuffer.h
Referenced by DeleteOldData(), FairWriteoutBuffer(), WriteOutData(), and WriteOutDataDeadTimeMap().
|
protected |
Definition at line 95 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 95 of file FairWriteoutBuffer.h
Referenced by FairWriteoutBuffer().
|
protected |
Definition at line 92 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 92 of file FairWriteoutBuffer.h
Referenced by FillDataToDeadTimeMap(), GetAllData(), GetNData(), GetRemoveOldData(), PrintDeadTimeMap(), and WriteOutAllData().
|
protected |
Definition at line 99 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 99 of file FairWriteoutBuffer.h
|
protected |
Definition at line 91 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 91 of file FairWriteoutBuffer.h
Referenced by FillNewData(), MoveDataFromStartTimeMapToDeadTimeMap(), PrintStartTimeMap(), and WriteOutAllData().
|
protected |
Definition at line 96 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 96 of file FairWriteoutBuffer.h
Referenced by FairWriteoutBuffer(), SaveDataToTree(), and WriteOutDataDeadTimeMap().
|
protected |
Definition at line 98 of file FairWriteoutBuffer.h.
View newest version in sPHENIX GitHub at line 98 of file FairWriteoutBuffer.h
Referenced by FillDataToDeadTimeMap(), FillNewData(), GetRemoveOldData(), SetVerbose(), WriteOutData(), and WriteOutDataDeadTimeMap().