FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTSBufferFunctional Class Reference

A class to access time ordered data in a root branch. More...

#include <FairTSBufferFunctional.h>

Inheritance diagram for FairTSBufferFunctional:

Public Member Functions

 FairTSBufferFunctional (TString branchName, TTree *sourceTree, BinaryFunctor *stopFunction, BinaryFunctor *startFunction=0)
 
virtual ~FairTSBufferFunctional ()
 
TClonesArray * GetData (Double_t stopParameter)
 
TClonesArray * GetData (Double_t startParameter, Double_t stopParameter)
 
Int_t GetBranchIndex ()
 
void SetBranchIndex (const Int_t val)
 
void SetStartFunction (BinaryFunctor *function)
 
void SetStopFunction (BinaryFunctor *function)
 
Bool_t AllDataProcessed ()
 
void Terminate ()
 
Bool_t TimeOut ()
 
Int_t FindStartIndex (Double_t startParameter)
 

Detailed Description

A class to access time ordered data in a root branch.

In the constructor of the class one has to give the branch name of the data, the tree the data is stored in and a BinaryFunctor which contains the method how the data should be extracted. Several example functors already exists. To extract the data one has to call GetData with a parameter which fits to the selected functor. GetData returns a TClonesArray which contains the data.

Be careful! The buffer runs through the time ordered data in one time direction only. This means that you cannot request data which is older than the data you have requested before.

Addition: This is not true anymore. GetData(Double_t, Double_t) is able to get also data which is older but this only works if you request a fixed time via StopTime functor. For other functors the behavior is unpredictable.

Created on: Feb 18, 201 Author: stockman

Definition at line 156 of file FairTSBufferFunctional.h.

Constructor & Destructor Documentation

FairTSBufferFunctional::FairTSBufferFunctional ( TString  branchName,
TTree *  sourceTree,
BinaryFunctor stopFunction,
BinaryFunctor startFunction = 0 
)

Definition at line 21 of file FairTSBufferFunctional.cxx.

virtual FairTSBufferFunctional::~FairTSBufferFunctional ( )
inlinevirtual

Definition at line 164 of file FairTSBufferFunctional.h.

Member Function Documentation

Bool_t FairTSBufferFunctional::AllDataProcessed ( )

Definition at line 276 of file FairTSBufferFunctional.cxx.

Int_t FairTSBufferFunctional::FindStartIndex ( Double_t  startParameter)

Definition at line 152 of file FairTSBufferFunctional.cxx.

Int_t FairTSBufferFunctional::GetBranchIndex ( )
inline

Definition at line 167 of file FairTSBufferFunctional.h.

TClonesArray * FairTSBufferFunctional::GetData ( Double_t  stopParameter)

Definition at line 47 of file FairTSBufferFunctional.cxx.

TClonesArray * FairTSBufferFunctional::GetData ( Double_t  startParameter,
Double_t  stopParameter 
)

Definition at line 136 of file FairTSBufferFunctional.cxx.

void FairTSBufferFunctional::SetBranchIndex ( const Int_t  val)
inline

Definition at line 169 of file FairTSBufferFunctional.h.

void FairTSBufferFunctional::SetStartFunction ( BinaryFunctor function)
inline

Definition at line 170 of file FairTSBufferFunctional.h.

void FairTSBufferFunctional::SetStopFunction ( BinaryFunctor function)
inline

Definition at line 171 of file FairTSBufferFunctional.h.

void FairTSBufferFunctional::Terminate ( )
inline

Definition at line 173 of file FairTSBufferFunctional.h.

Bool_t FairTSBufferFunctional::TimeOut ( )
inline

Definition at line 175 of file FairTSBufferFunctional.h.


The documentation for this class was generated from the following files: