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

GBTFrame class for the TPC. More...

#include <GBTFrame.h>

Public Member Functions

 GBTFrame ()
 Default Constructor.
 
 GBTFrame (unsigned word3, unsigned word2, unsigned word1, unsigned word0)
 
 GBTFrame (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)
 
 GBTFrame (const GBTFrame &other)
 
 ~GBTFrame ()=default
 Destructor.
 
short getMarker () const
 
short getHalfWord (const short sampa, const short halfword, const short chan=0) const
 
short getAdcClock (short sampa) const
 
void setAdcClock (int sampa, int clock)
 
void setData (unsigned word3, unsigned word2, unsigned word1, unsigned word0)
 
void setData (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 getGBTFrame (unsigned &word3, unsigned &word2, unsigned &word1, unsigned &word0) const
 
std::ostream & Print (std::ostream &output) const
 

Friends

std::ostream & operator<< (std::ostream &out, const GBTFrame &f)
 

Detailed Description

GBTFrame class for the TPC.

Definition at line 63 of file GBTFrame.h.

Constructor & Destructor Documentation

◆ GBTFrame() [1/4]

o2::tpc::GBTFrame::GBTFrame ( )
inline

Default Constructor.

Definition at line 264 of file GBTFrame.h.

◆ GBTFrame() [2/4]

o2::tpc::GBTFrame::GBTFrame ( unsigned  word3,
unsigned  word2,
unsigned  word1,
unsigned  word0 
)
inline

Constructor

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 267 of file GBTFrame.h.

◆ GBTFrame() [3/4]

GBTFrame::GBTFrame ( 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 
)

Constructor

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 20 of file GBTFrame.cxx.

◆ GBTFrame() [4/4]

o2::tpc::GBTFrame::GBTFrame ( const GBTFrame other)
inlinedefault

Copy Contructor

Parameters
otherGBT Frame to be copied

◆ ~GBTFrame()

o2::tpc::GBTFrame::~GBTFrame ( )
default

Destructor.

Member Function Documentation

◆ getAdcClock()

short o2::tpc::GBTFrame::getAdcClock ( short  sampa) const
inline

Get ADC sampling clock of a SAMPA chip (4 time bits)

Parameters
sampaADC clock of this SAMPA chip (0-2, 3=0, 4=1)
Returns
requested ADC sampling clock bits

Definition at line 129 of file GBTFrame.h.

◆ getGBTFrame()

void o2::tpc::GBTFrame::getGBTFrame ( unsigned &  word3,
unsigned &  word2,
unsigned &  word1,
unsigned &  word0 
) const
inline

Get the GBT frame

Parameters
word3bit [127: 96] of GBT frame is written to this
word2bit [ 95: 64] of GBT frame is written to this
word1bit [ 63: 32] of GBT frame is written to this
word0bit [ 31: 0] of GBT frame is written to this

Definition at line 279 of file GBTFrame.h.

◆ getHalfWord()

short o2::tpc::GBTFrame::getHalfWord ( const short  sampa,
const short  halfword,
const short  chan = 0 
) const
inline

Get a half-word of a SAMPA chip (5 bit of data)

Parameters
sampahalf-word this SAMPA chip (0-2, 3=0, 4=1)
halfwordthis half-word of the SAMPA (4 are included in GBT frame)
chanwhich channels, 0 for channel 0-15, 1 for channel 16-31, ignored for SAMPA 2
Returns
requested half-word

Definition at line 124 of file GBTFrame.h.

◆ getMarker()

short o2::tpc::GBTFrame::getMarker ( ) const
inline

Get the marker of the frame

Returns
marker of the frame

Definition at line 117 of file GBTFrame.h.

◆ Print()

std::ostream & GBTFrame::Print ( std::ostream &  output) const

Print function: Print GBT frame on the output stream

Parameters
outputStream to put the GBT frame on
Returns
The output stream

Definition at line 209 of file GBTFrame.cxx.

◆ setAdcClock()

void GBTFrame::setAdcClock ( int  sampa,
int  clock 
)

Set Adc sampling clock of a SAMPA chip

Parameters
sampaADC clock of this SAMPA chip (0-2, 3=0, 4=1), -1 for all SAMPAs
clock4 sampling clock bits

Definition at line 185 of file GBTFrame.cxx.

◆ setData() [1/2]

void GBTFrame::setData ( 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 
)

Set Data

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 103 of file GBTFrame.cxx.

◆ setData() [2/2]

void o2::tpc::GBTFrame::setData ( unsigned  word3,
unsigned  word2,
unsigned  word1,
unsigned  word0 
)
inline

Set data

Parameters
otherOther GBT Frame Set data
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 254 of file GBTFrame.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const GBTFrame f 
)
friend

Definition at line 191 of file GBTFrame.h.


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