FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTimebasedDataHandlerT< T > Class Template Reference

#include <FairTimebasedDataHandlerT.h>

Public Member Functions

 FairTimebasedDataHandlerT (double holdTime=10.0)
 
virtual ~FairTimebasedDataHandlerT ()
 
void FillTClonesArray (TClonesArray *inputArray, int evtIndex, double t0Event, double t0Current)
 
std::vector< std::pair< T
*, double > > & 
GetData ()
 
void SetHoldTime (double time)
 
void Reset ()
 

Protected Member Functions

void RemoveOldTracks (double currentTime)
 

Detailed Description

template<class T>
class FairTimebasedDataHandlerT< T >

Definition at line 26 of file FairTimebasedDataHandlerT.h.

Constructor & Destructor Documentation

template<class T>
FairTimebasedDataHandlerT< T >::FairTimebasedDataHandlerT ( double  holdTime = 10.0)
inline

Definition at line 29 of file FairTimebasedDataHandlerT.h.

template<class T>
virtual FairTimebasedDataHandlerT< T >::~FairTimebasedDataHandlerT ( )
inlinevirtual

Definition at line 31 of file FairTimebasedDataHandlerT.h.

Member Function Documentation

template<class T >
void FairTimebasedDataHandlerT< T >::FillTClonesArray ( TClonesArray *  inputArray,
int  evtIndex,
double  t0Event,
double  t0Current 
)
inline

Removes old data from the container and adds new data from the input TClonesArray and combines it with the event time

Parameters
inputArray: TClonesArray which holds the input data (stored class has to be of type FairHit FairMCPoint or has a GetTime() method)
evtIndex: event number determines if the TClonesArray is already in the array or needs to be filled into it
t0Event: event time in ns which is added to the relative time of the data objects
t0Current: current simulated time in ns which determines which data is removed from the container

Definition at line 66 of file FairTimebasedDataHandlerT.h.

template<class T>
std::vector<std::pair<T*, double> >& FairTimebasedDataHandlerT< T >::GetData ( )
inline

Definition at line 42 of file FairTimebasedDataHandlerT.h.

template<class T >
void FairTimebasedDataHandlerT< T >::RemoveOldTracks ( double  currentTime)
inlineprotected

Removes data which fulfills the condition (obj. relative time + event time + hold time < newT0Time)

Parameters
currentTime: time in ns which determines the events to be removed

Definition at line 92 of file FairTimebasedDataHandlerT.h.

template<class T >
void FairTimebasedDataHandlerT< T >::Reset ( )
inline

Definition at line 83 of file FairTimebasedDataHandlerT.h.

template<class T>
void FairTimebasedDataHandlerT< T >::SetHoldTime ( double  time)
inline

Determines how long data is kept in the container

Definition at line 46 of file FairTimebasedDataHandlerT.h.


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