8 #ifndef FairTSBufferFunctionalFunctional_H_
9 #define FairTSBufferFunctionalFunctional_H_
35 class BinaryFunctor :
public std::binary_function<FairTimeStamp*, double, bool>
58 , fSameTimeRequestCounter(0){};
72 if (fRequestTime != fOldTime) {
73 fOldTime = fRequestTime;
74 fSameTimeRequestCounter = 0;
77 }
else if (fRequestTime == fOldTime) {
78 std::cout <<
"-I- FairTSBufferFunctional StopTime has requested the same data as before: " << fRequestTime
80 fSameTimeRequestCounter++;
82 std::cout <<
"-E- FairTSBufferFunctional StopTime Functor has requested time " << fRequestTime
83 <<
" smaller than old time " << fOldTime << std::endl;
86 if (fSameTimeRequestCounter > 9) {
98 int fSameTimeRequestCounter;
123 if (aTime - fOldTime > b) {
165 TClonesArray*
GetData(Double_t stopParameter);
166 TClonesArray*
GetData(Double_t startParameter, Double_t stopParameter);
177 Bool_t stopTimeOut = fStopFunction->
TimeOut();
178 Bool_t startTimeOut = kTRUE;
179 if (fStartFunction != 0) {
180 startTimeOut = fStartFunction->
TimeOut();
188 return (stopTimeOut && startTimeOut);
194 void ReadInNextFilledEntry();
195 Int_t ReadInPreviousFilledEntry(Int_t startEntry);
196 void ReadInNextEntry();
198 void ReadInEntry(Int_t number);
199 void AbsorbDataBufferArray();
201 TClonesArray* fOutputArray;
202 TClonesArray* fBufferArray;
203 TClonesArray* fInputArray;
bool Call(FairTimeStamp *a, double b)
void SetStartFunction(BinaryFunctor *function)
virtual void ResetTimeOut()
virtual ~FairTSBufferFunctional()
Int_t FindStartIndex(Double_t startParameter)
Bool_t AllDataProcessed()
void SetBranchIndex(const Int_t val)
void SetStopFunction(BinaryFunctor *function)
Double_t GetTimeStamp() const
TClonesArray * GetData(Double_t stopParameter)
bool Call(FairTimeStamp *a, double b)
virtual bool operator()(FairTimeStamp *a, double b)
virtual bool Call(FairTimeStamp *a, double b)=0
Base class for all functors which are used in the FairTSBufferFunctional.
FairTSBufferFunctional(TString branchName, TTree *sourceTree, BinaryFunctor *stopFunction, BinaryFunctor *startFunction=0)
A class to access time ordered data in a root branch.