![]() |
Project
|
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 |
GBTFrame & | operator[] (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) |
GBT Frame container class.
Definition at line 47 of file GBTFrameContainer.h.
GBTFrameContainer::GBTFrameContainer | ( | ) |
Default constructor.
Definition at line 21 of file GBTFrameContainer.cxx.
Default constructor
cru | CRU ID |
link | Link ID |
Definition at line 22 of file GBTFrameContainer.cxx.
Constructor
size | Size of GBT frame container to avoid unnecessary reallocation of memory |
cru | CRU ID |
link | Link ID |
sampaVersion | SAMPA version |
Definition at line 23 of file GBTFrameContainer.cxx.
GBTFrameContainer::~GBTFrameContainer | ( | ) |
Destructor.
Definition at line 47 of file GBTFrameContainer.cxx.
Add copy of frame to the container
frame | GBT Frame |
Definition at line 290 of file GBTFrameContainer.h.
|
inline |
Add frame to the container
s0hw0l | half-word 0 from SAMPA 0 low channel numbers |
s0hw1l | half-word 1 from SAMPA 0 low channel numbers |
s0hw2l | half-word 2 from SAMPA 0 low channel numbers |
s0hw3l | half-word 3 from SAMPA 0 low channel numbers |
s0hw0h | half-word 0 from SAMPA 0 high channel numbers |
s0hw1h | half-word 1 from SAMPA 0 high channel numbers |
s0hw2h | half-word 2 from SAMPA 0 high channel numbers |
s0hw3h | half-word 3 from SAMPA 0 high channel numbers |
s1hw0l | half-word 0 from SAMPA 1 low channel numbers |
s1hw1l | half-word 1 from SAMPA 1 low channel numbers |
s1hw2l | half-word 2 from SAMPA 1 low channel numbers |
s1hw3l | half-word 3 from SAMPA 1 low channel numbers |
s1hw0h | half-word 0 from SAMPA 1 high channel numbers |
s1hw1h | half-word 1 from SAMPA 1 high channel numbers |
s1hw2h | half-word 2 from SAMPA 1 high channel numbers |
s1hw3h | half-word 3 from SAMPA 1 high channel numbers |
s2hw0 | half-word 0 from SAMPA 2 |
s2hw1 | half-word 1 from SAMPA 2 |
s2hw2 | half-word 2 from SAMPA 2 |
s2hw3 | half-word 3 from SAMPA 2 |
s0adc | ADC clock from SAMPA 0 |
s1adc | ADC clock from SAMPA 1 |
s2adc | ADC clock from SAMPA 2 |
marker | additional 16 bit marker which is not part of the actual frame |
Definition at line 271 of file GBTFrameContainer.h.
|
inline |
Add frame to the container
word3 | Word 3 of GBT frame, contains bit [127: 96], [127:112] are not part of the actual frame |
word2 | Word 2 of GBT frame, contains bit [ 95: 64] |
word1 | Word 1 of GBT frame, contains bit [ 63: 32] |
word0 | Word 0 of GBT frame, contains bit [ 31: 0] |
Definition at line 260 of file GBTFrameContainer.h.
void GBTFrameContainer::addGBTFramesFromBinaryFile | ( | std::string | fileName, |
std::string | type = "grorc" , |
||
int | frames = -1 |
||
) |
Add all frames from file to conatiner
fileName | Path to file |
type | rorc type of data |
frames | Frames to read from file (-1 -> all) |
Definition at line 92 of file GBTFrameContainer.cxx.
void GBTFrameContainer::addGBTFramesFromFile | ( | std::string | fileName | ) |
Add all frames from file to conatiner
fileName | Path to file |
Definition at line 54 of file GBTFrameContainer.cxx.
|
inline |
Definition at line 172 of file GBTFrameContainer.h.
|
inline |
Definition at line 173 of file GBTFrameContainer.h.
|
inline |
Definition at line 174 of file GBTFrameContainer.h.
|
inline |
Definition at line 177 of file GBTFrameContainer.h.
|
inline |
Definition at line 181 of file GBTFrameContainer.h.
|
inline |
Definition at line 184 of file GBTFrameContainer.h.
|
inline |
Definition at line 175 of file GBTFrameContainer.h.
|
inline |
Definition at line 176 of file GBTFrameContainer.h.
bool GBTFrameContainer::getData | ( | std::vector< Digit > & | container | ) |
Extracts the digits after all 80 channels were transmitted (5*16)
container | Digit Container to store the digits in |
Definition at line 457 of file GBTFrameContainer.cxx.
bool GBTFrameContainer::getData | ( | std::vector< HalfSAMPAData > & | container | ) |
Definition at line 525 of file GBTFrameContainer.cxx.
Returns a GBT frame
index |
Definition at line 168 of file GBTFrameContainer.h.
int GBTFrameContainer::getNentries | ( | ) |
Get the number of entries in the container
Definition at line 607 of file GBTFrameContainer.cxx.
|
inline |
Definition at line 163 of file GBTFrameContainer.h.
|
inline |
Get the size of the container
Definition at line 73 of file GBTFrameContainer.h.
|
inline |
Definition at line 170 of file GBTFrameContainer.h.
Definition at line 169 of file GBTFrameContainer.h.
Overwrites the ADC clock in all stored frames with a valid sequence
sampa | ADC clock of this given SAMPA, -1 for all SAMPAs |
phase | Defines which (of the 4 bits) has the rising edge |
Definition at line 618 of file GBTFrameContainer.cxx.
|
inline |
Definition at line 179 of file GBTFrameContainer.h.
|
inline |
Definition at line 180 of file GBTFrameContainer.h.
|
inline |
Definition at line 182 of file GBTFrameContainer.h.
|
inline |
Definition at line 183 of file GBTFrameContainer.h.
void GBTFrameContainer::reProcessAllFrames | ( | ) |
Re-Processes all frames after resetting ADC clock and sync Pattern.
Definition at line 279 of file GBTFrameContainer.cxx.
void GBTFrameContainer::reset | ( | ) |
Reset function to clear container.
Definition at line 568 of file GBTFrameContainer.cxx.
|
inline |
Set enable the ADC clock warnings
val | Set it to true or false |
Definition at line 136 of file GBTFrameContainer.h.
|
inline |
Set enable compilation of ADC values
val | Set it to true or false |
Definition at line 144 of file GBTFrameContainer.h.
|
inline |
Option to store the inserted GBT frames
val | Set it to true or false |
Definition at line 148 of file GBTFrameContainer.h.
|
inline |
Set enable the sync pattern position warnings
val | Set it to true or false |
Definition at line 140 of file GBTFrameContainer.h.
Sets the timebin
val | Set to this timebin |
Definition at line 188 of file GBTFrameContainer.h.