Project
Loading...
Searching...
No Matches
o2::emcal::TRUDataHandler Class Reference

Helper class to handle decoded TRU data during the reconstruction. More...

#include <TRUDataHandler.h>

Classes

class  PatchIndexException
 Handler of errors related to invalid trigger patch IDs. More...
 

Public Member Functions

 TRUDataHandler ()
 Constructor.
 
 ~TRUDataHandler ()=default
 Destructor.
 
void reset ()
 Reset handler.
 
void setPatch (unsigned int index, unsigned int time)
 Set reconstructed trigger patch.
 
void setFired (bool fired)
 Mark TRU as fired (containing at least one patch above threshold)
 
void setL0time (int l0time)
 Set the L0 time of the TRU.
 
void setTRUIndex (int index)
 Set the index of the TRU (in global STU indexing scheme)
 
bool isFired () const
 Check whether the TRU was fired (at least one patch above threshold)
 
int8_t getL0time () const
 
bool hasPatch (unsigned int index) const
 Check whehther the patch at the given index has fired.
 
uint8_t getPatchTime (unsigned int index) const
 Get the trigger time of the trigger patch at a given index.
 
bool hasAnyPatch () const
 Check whether the TRU has any patch fired.
 
int getTRUIndex () const
 Get the index of the TRU in global (STU) index schemes.
 
void printStream (std::ostream &stream) const
 Print TRU information to an output stream.
 

Detailed Description

Helper class to handle decoded TRU data during the reconstruction.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
April 19, 2024

The decoded TRU data contains the following information

  • Index of the TRU
  • Trigger time of the TRU
  • Fired or not
  • Index of fired patches with time the patch has fired The information is decoded in columns 96 to 105 of the FakeALTRO data. The class does not handle FastOR timesums (colums 0-96), they are handled by a separate class FastORTimeSeries.

Definition at line 42 of file TRUDataHandler.h.

Constructor & Destructor Documentation

◆ TRUDataHandler()

TRUDataHandler::TRUDataHandler ( )

Constructor.

Definition at line 17 of file TRUDataHandler.cxx.

◆ ~TRUDataHandler()

o2::emcal::TRUDataHandler::~TRUDataHandler ( )
default

Destructor.

Member Function Documentation

◆ getL0time()

int8_t o2::emcal::TRUDataHandler::getL0time ( ) const
inline

Definition at line 113 of file TRUDataHandler.h.

◆ getPatchTime()

uint8_t o2::emcal::TRUDataHandler::getPatchTime ( unsigned int  index) const
inline

Get the trigger time of the trigger patch at a given index.

Parameters
indexIndex of the trigger patch
Returns
Reconstructed patch time (UCHAR_MAX in case the patch has not fired)
Exceptions
PatchIndexExceptionin case the patch index is invalid (>= 77)

Definition at line 129 of file TRUDataHandler.h.

◆ getTRUIndex()

int o2::emcal::TRUDataHandler::getTRUIndex ( ) const
inline

Get the index of the TRU in global (STU) index schemes.

Returns
Index of the TRU

Definition at line 149 of file TRUDataHandler.h.

◆ hasAnyPatch()

bool o2::emcal::TRUDataHandler::hasAnyPatch ( ) const
inline

Check whether the TRU has any patch fired.

Returns
True if at least one fired patch was found, false otherwise

Definition at line 137 of file TRUDataHandler.h.

◆ hasPatch()

bool o2::emcal::TRUDataHandler::hasPatch ( unsigned int  index) const
inline

Check whehther the patch at the given index has fired.

Parameters
indexIndex of the patch
Returns
True if the patch has fired, false otherwise
Exceptions
PatchIndexExceptionin case the patch index is invalid (>= 77)

Definition at line 119 of file TRUDataHandler.h.

◆ isFired()

bool o2::emcal::TRUDataHandler::isFired ( ) const
inline

Check whether the TRU was fired (at least one patch above threshold)

Returns
True if the TRU was fired, false otherwise

Definition at line 111 of file TRUDataHandler.h.

◆ printStream()

void TRUDataHandler::printStream ( std::ostream &  stream) const

Print TRU information to an output stream.

Parameters
streamStream to print on

Definition at line 30 of file TRUDataHandler.cxx.

◆ reset()

void TRUDataHandler::reset ( )

Reset handler.

Definition at line 22 of file TRUDataHandler.cxx.

◆ setFired()

void o2::emcal::TRUDataHandler::setFired ( bool  fired)
inline

Mark TRU as fired (containing at least one patch above threshold)

Parameters
fired

Definition at line 99 of file TRUDataHandler.h.

◆ setL0time()

void o2::emcal::TRUDataHandler::setL0time ( int  l0time)
inline

Set the L0 time of the TRU.

Parameters
l0timeL0 time of the TRU

Definition at line 103 of file TRUDataHandler.h.

◆ setPatch()

void o2::emcal::TRUDataHandler::setPatch ( unsigned int  index,
unsigned int  time 
)
inline

Set reconstructed trigger patch.

Parameters
indexIndex of the trigger patch in the TRU
timeDecoded time of the patch
Exceptions
PatchIndexExceptionin case the patch index is invalid (>= 77)

Definition at line 91 of file TRUDataHandler.h.

◆ setTRUIndex()

void o2::emcal::TRUDataHandler::setTRUIndex ( int  index)
inline

Set the index of the TRU (in global STU indexing scheme)

Parameters
indexIndex of the TRU

Definition at line 107 of file TRUDataHandler.h.


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