Project
Loading...
Searching...
No Matches
o2::tpc::GBTFrameContainer Class Reference

GBT Frame container class. More...

#include <GBTFrameContainer.h>

Public Member Functions

 GBTFrameContainer ()
 Default constructor.
 
 GBTFrameContainer (int cru, int link)
 
 GBTFrameContainer (int size, int cru, int link, int sampaVersion=-1)
 
 ~GBTFrameContainer ()
 Destructor.
 
void reset ()
 Reset function to clear container.
 
int getSize ()
 
int getNentries ()
 
void addGBTFrame (GBTFrame &frame)
 
void addGBTFrame (unsigned word3, unsigned word2, unsigned word1, unsigned word0)
 
void addGBTFrame (short s0hw0l, short s0hw1l, short s0hw2l, short s0hw3l, short s0hw0h, short s0hw1h, short s0hw2h, short s0hw3h, short s1hw0l, short s1hw1l, short s1hw2l, short s1hw3l, short s1hw0h, short s1hw1h, short s1hw2h, short s1hw3h, short s2hw0, short s2hw1, short s2hw2, short s2hw3, short s0adc, short s1adc, short s2adc, unsigned marker=0)
 
void addGBTFramesFromFile (std::string fileName)
 
void addGBTFramesFromBinaryFile (std::string fileName, std::string type="grorc", int frames=-1)
 
void setEnableAdcClockWarning (bool val)
 
void setEnableSyncPatternWarning (bool val)
 
void setEnableCompileAdcValues (bool val)
 
void setEnableStoreGBTFrames (bool val)
 
bool getData (std::vector< Digit > &container)
 
bool getData (std::vector< HalfSAMPAData > &container)
 
int getNFramesAnalyzed () const
 
GBTFrame getGBTFrame (int index) const
 
GBTFrame operator[] (int index) const
 
GBTFrameoperator[] (int index)
 
std::vector< GBTFrame >::iterator begin ()
 
std::vector< GBTFrame >::const_iterator begin () const
 
std::vector< GBTFrame >::const_iterator cbegin () const
 
std::vector< GBTFrame >::iterator end ()
 
std::vector< GBTFrame >::const_iterator end () const
 
std::vector< GBTFrame >::const_iterator cend () const
 
std::vector< GBTFrame >::reverse_iterator rbegin ()
 
std::vector< GBTFrame >::const_reverse_iterator rbegin () const
 
std::vector< GBTFrame >::const_reverse_iterator crbegin () const
 
std::vector< GBTFrame >::reverse_iterator rend ()
 
std::vector< GBTFrame >::const_reverse_iterator rend () const
 
std::vector< GBTFrame >::const_reverse_iterator crend () const
 
void setTimebin (int val)
 
int getTimebin () const
 
void reProcessAllFrames ()
 Re-Processes all frames after resetting ADC clock and sync Pattern.
 
void overwriteAdcClock (int sampa, unsigned short phase)
 

Detailed Description

GBT Frame container class.

Definition at line 47 of file GBTFrameContainer.h.

Constructor & Destructor Documentation

◆ GBTFrameContainer() [1/3]

GBTFrameContainer::GBTFrameContainer ( )

Default constructor.

Definition at line 21 of file GBTFrameContainer.cxx.

◆ GBTFrameContainer() [2/3]

GBTFrameContainer::GBTFrameContainer ( int  cru,
int  link 
)

Default constructor

Parameters
cruCRU ID
linkLink ID

Definition at line 22 of file GBTFrameContainer.cxx.

◆ GBTFrameContainer() [3/3]

GBTFrameContainer::GBTFrameContainer ( int  size,
int  cru,
int  link,
int  sampaVersion = -1 
)

Constructor

Parameters
sizeSize of GBT frame container to avoid unnecessary reallocation of memory
cruCRU ID
linkLink ID
sampaVersionSAMPA version

Definition at line 23 of file GBTFrameContainer.cxx.

◆ ~GBTFrameContainer()

GBTFrameContainer::~GBTFrameContainer ( )

Destructor.

Definition at line 47 of file GBTFrameContainer.cxx.

Member Function Documentation

◆ addGBTFrame() [1/3]

void o2::tpc::GBTFrameContainer::addGBTFrame ( GBTFrame frame)
inline

Add copy of frame to the container

Parameters
frameGBT Frame

Definition at line 290 of file GBTFrameContainer.h.

◆ addGBTFrame() [2/3]

void o2::tpc::GBTFrameContainer::addGBTFrame ( short  s0hw0l,
short  s0hw1l,
short  s0hw2l,
short  s0hw3l,
short  s0hw0h,
short  s0hw1h,
short  s0hw2h,
short  s0hw3h,
short  s1hw0l,
short  s1hw1l,
short  s1hw2l,
short  s1hw3l,
short  s1hw0h,
short  s1hw1h,
short  s1hw2h,
short  s1hw3h,
short  s2hw0,
short  s2hw1,
short  s2hw2,
short  s2hw3,
short  s0adc,
short  s1adc,
short  s2adc,
unsigned  marker = 0 
)
inline

Add frame to the container

Parameters
s0hw0lhalf-word 0 from SAMPA 0 low channel numbers
s0hw1lhalf-word 1 from SAMPA 0 low channel numbers
s0hw2lhalf-word 2 from SAMPA 0 low channel numbers
s0hw3lhalf-word 3 from SAMPA 0 low channel numbers
s0hw0hhalf-word 0 from SAMPA 0 high channel numbers
s0hw1hhalf-word 1 from SAMPA 0 high channel numbers
s0hw2hhalf-word 2 from SAMPA 0 high channel numbers
s0hw3hhalf-word 3 from SAMPA 0 high channel numbers
s1hw0lhalf-word 0 from SAMPA 1 low channel numbers
s1hw1lhalf-word 1 from SAMPA 1 low channel numbers
s1hw2lhalf-word 2 from SAMPA 1 low channel numbers
s1hw3lhalf-word 3 from SAMPA 1 low channel numbers
s1hw0hhalf-word 0 from SAMPA 1 high channel numbers
s1hw1hhalf-word 1 from SAMPA 1 high channel numbers
s1hw2hhalf-word 2 from SAMPA 1 high channel numbers
s1hw3hhalf-word 3 from SAMPA 1 high channel numbers
s2hw0half-word 0 from SAMPA 2
s2hw1half-word 1 from SAMPA 2
s2hw2half-word 2 from SAMPA 2
s2hw3half-word 3 from SAMPA 2
s0adcADC clock from SAMPA 0
s1adcADC clock from SAMPA 1
s2adcADC clock from SAMPA 2
markeradditional 16 bit marker which is not part of the actual frame

Definition at line 271 of file GBTFrameContainer.h.

◆ addGBTFrame() [3/3]

void o2::tpc::GBTFrameContainer::addGBTFrame ( unsigned  word3,
unsigned  word2,
unsigned  word1,
unsigned  word0 
)
inline

Add frame to the container

Parameters
word3Word 3 of GBT frame, contains bit [127: 96], [127:112] are not part of the actual frame
word2Word 2 of GBT frame, contains bit [ 95: 64]
word1Word 1 of GBT frame, contains bit [ 63: 32]
word0Word 0 of GBT frame, contains bit [ 31: 0]

Definition at line 260 of file GBTFrameContainer.h.

◆ addGBTFramesFromBinaryFile()

void GBTFrameContainer::addGBTFramesFromBinaryFile ( std::string  fileName,
std::string  type = "grorc",
int  frames = -1 
)

Add all frames from file to conatiner

Parameters
fileNamePath to file
typerorc type of data
framesFrames to read from file (-1 -> all)

Definition at line 92 of file GBTFrameContainer.cxx.

◆ addGBTFramesFromFile()

void GBTFrameContainer::addGBTFramesFromFile ( std::string  fileName)

Add all frames from file to conatiner

Parameters
fileNamePath to file

Definition at line 54 of file GBTFrameContainer.cxx.

◆ begin() [1/2]

std::vector< GBTFrame >::iterator o2::tpc::GBTFrameContainer::begin ( )
inline

Definition at line 172 of file GBTFrameContainer.h.

◆ begin() [2/2]

std::vector< GBTFrame >::const_iterator o2::tpc::GBTFrameContainer::begin ( ) const
inline

Definition at line 173 of file GBTFrameContainer.h.

◆ cbegin()

std::vector< GBTFrame >::const_iterator o2::tpc::GBTFrameContainer::cbegin ( ) const
inline

Definition at line 174 of file GBTFrameContainer.h.

◆ cend()

std::vector< GBTFrame >::const_iterator o2::tpc::GBTFrameContainer::cend ( ) const
inline

Definition at line 177 of file GBTFrameContainer.h.

◆ crbegin()

std::vector< GBTFrame >::const_reverse_iterator o2::tpc::GBTFrameContainer::crbegin ( ) const
inline

Definition at line 181 of file GBTFrameContainer.h.

◆ crend()

std::vector< GBTFrame >::const_reverse_iterator o2::tpc::GBTFrameContainer::crend ( ) const
inline

Definition at line 184 of file GBTFrameContainer.h.

◆ end() [1/2]

std::vector< GBTFrame >::iterator o2::tpc::GBTFrameContainer::end ( )
inline

Definition at line 175 of file GBTFrameContainer.h.

◆ end() [2/2]

std::vector< GBTFrame >::const_iterator o2::tpc::GBTFrameContainer::end ( ) const
inline

Definition at line 176 of file GBTFrameContainer.h.

◆ getData() [1/2]

bool GBTFrameContainer::getData ( std::vector< Digit > &  container)

Extracts the digits after all 80 channels were transmitted (5*16)

Parameters
containerDigit Container to store the digits in
Returns
If true, at least one digit was added.

Definition at line 457 of file GBTFrameContainer.cxx.

◆ getData() [2/2]

bool GBTFrameContainer::getData ( std::vector< HalfSAMPAData > &  container)

Definition at line 525 of file GBTFrameContainer.cxx.

◆ getGBTFrame()

GBTFrame o2::tpc::GBTFrameContainer::getGBTFrame ( int  index) const
inline

Returns a GBT frame

Parameters
index
Returns
GBT frame

Definition at line 168 of file GBTFrameContainer.h.

◆ getNentries()

int GBTFrameContainer::getNentries ( )

Get the number of entries in the container

Returns
Number of entries in the GBT frame container

Definition at line 607 of file GBTFrameContainer.cxx.

◆ getNFramesAnalyzed()

int o2::tpc::GBTFrameContainer::getNFramesAnalyzed ( ) const
inline

Definition at line 163 of file GBTFrameContainer.h.

◆ getSize()

int o2::tpc::GBTFrameContainer::getSize ( )
inline

Get the size of the container

Returns
Size of GBT frame container

Definition at line 73 of file GBTFrameContainer.h.

◆ getTimebin()

int o2::tpc::GBTFrameContainer::getTimebin ( ) const
inline

Gets the timebin

Returns
Timebin for next digits

Definition at line 192 of file GBTFrameContainer.h.

◆ operator[]() [1/2]

GBTFrame & o2::tpc::GBTFrameContainer::operator[] ( int  index)
inline

Definition at line 170 of file GBTFrameContainer.h.

◆ operator[]() [2/2]

GBTFrame o2::tpc::GBTFrameContainer::operator[] ( int  index) const
inline

Definition at line 169 of file GBTFrameContainer.h.

◆ overwriteAdcClock()

void GBTFrameContainer::overwriteAdcClock ( int  sampa,
unsigned short  phase 
)

Overwrites the ADC clock in all stored frames with a valid sequence

Parameters
sampaADC clock of this given SAMPA, -1 for all SAMPAs
phaseDefines which (of the 4 bits) has the rising edge

Definition at line 618 of file GBTFrameContainer.cxx.

◆ rbegin() [1/2]

std::vector< GBTFrame >::reverse_iterator o2::tpc::GBTFrameContainer::rbegin ( )
inline

Definition at line 179 of file GBTFrameContainer.h.

◆ rbegin() [2/2]

std::vector< GBTFrame >::const_reverse_iterator o2::tpc::GBTFrameContainer::rbegin ( ) const
inline

Definition at line 180 of file GBTFrameContainer.h.

◆ rend() [1/2]

std::vector< GBTFrame >::reverse_iterator o2::tpc::GBTFrameContainer::rend ( )
inline

Definition at line 182 of file GBTFrameContainer.h.

◆ rend() [2/2]

std::vector< GBTFrame >::const_reverse_iterator o2::tpc::GBTFrameContainer::rend ( ) const
inline

Definition at line 183 of file GBTFrameContainer.h.

◆ reProcessAllFrames()

void GBTFrameContainer::reProcessAllFrames ( )

Re-Processes all frames after resetting ADC clock and sync Pattern.

Definition at line 279 of file GBTFrameContainer.cxx.

◆ reset()

void GBTFrameContainer::reset ( )

Reset function to clear container.

Definition at line 568 of file GBTFrameContainer.cxx.

◆ setEnableAdcClockWarning()

void o2::tpc::GBTFrameContainer::setEnableAdcClockWarning ( bool  val)
inline

Set enable the ADC clock warnings

Parameters
valSet it to true or false

Definition at line 136 of file GBTFrameContainer.h.

◆ setEnableCompileAdcValues()

void o2::tpc::GBTFrameContainer::setEnableCompileAdcValues ( bool  val)
inline

Set enable compilation of ADC values

Parameters
valSet it to true or false

Definition at line 144 of file GBTFrameContainer.h.

◆ setEnableStoreGBTFrames()

void o2::tpc::GBTFrameContainer::setEnableStoreGBTFrames ( bool  val)
inline

Option to store the inserted GBT frames

Parameters
valSet it to true or false

Definition at line 148 of file GBTFrameContainer.h.

◆ setEnableSyncPatternWarning()

void o2::tpc::GBTFrameContainer::setEnableSyncPatternWarning ( bool  val)
inline

Set enable the sync pattern position warnings

Parameters
valSet it to true or false

Definition at line 140 of file GBTFrameContainer.h.

◆ setTimebin()

void o2::tpc::GBTFrameContainer::setTimebin ( int  val)
inline

Sets the timebin

Parameters
valSet to this timebin

Definition at line 188 of file GBTFrameContainer.h.


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